Explore BrainMass

Sequential Ambiguity

On Monday, May 26th/03, I posted the following question to which a solution was provided by Remus Nicoara, PhD (IP). I thank Remus for his assistance and solution. I'm interested in knowing what the solution would look like if for each term, the y elements are randomly determined.

Original Question
In a specific sequence that I am to create, a1 has the elements x1 and y1, a2 has the elements x2 and y2, a3 has the elements x3 and y3, The relationship between each term cannot be bijective, however has a bounded range of finite whole numbers. I am to create a rule such that f(x1,y2)=x2 and f(x2,y3) = x3. The rule must be such that after the sequence has been created, if I am given x3,y3,x2 and y1, then x1 and y2 can be determined i.e. y2 = g(x2,x3)

Remus Nicoara's solution

I will use the notation x_n for x sub n.
Let's define y1 to be any positive integer, y_(n+1)=y_n + 1 (for instance y_n is 2,3,4,5,...) and x1=1, then define:
x_n=x_(n-1)+100 modulo y_n (so f(x,y)=x+100 mod y). (Just in case you do not know, x modulo y, or x mod y, means the remainder of the division of x by y.)
So x2=x1+100 mod y2=101 mod 2 = 1, x3=x2+100 mod y3=101 mod 3 = 2, y4=102 mod 4 = 2, y5=102 mod 5 = 2, y6=102 mod 6 = 0, y7=100 mod 7 = 2, y8=102 mod 8 = 6, y9=106 mod 9 = 7 and so on.
Then f is not bijective because different numbers can have the same value modulo yn, but it has finite range because any number mod y_n takes values between 0 and y_n - 1.
Also, if x3,y3,x2,y1 are given we may first determine y2 as the average of y1 and y3 (or just substract 1 from y3) and then we may find x1=x2-100 mod y2 = 2-100 mod 3 =-98 mod 3 = 1(we are sure that this is x1 because x1 was at most y1, more generally xn is at most yn because it is the reminder of a division by yn, and yn is less than 100...when yn becomes bigger then 100 then the sequence becomes constant so everything is still ok).

So all conditions are satisfied!