Monday, March 06, 2006

Assignment (Binary String vs. IFS)

This assignment was stated as follows:

Consider the chaotic iteration x(n+1)=f(x(n)), where f(x) = 4x(1-x), and initial condition x(0)= 0.3. Is the sequence of numbers x(n) for n=0,1,2,3,4, . . . random or deterministic? Now consider the function h(x) defined by h(x)=0 for x<0.5>h(x)=1 for x>=0.5, and also consider the sequence of bits y(n)=h(x(n)), where x(n) comes from the chaotic iteration above. Is the sequence y(n) deterministic or random? Here are two sequences of bits, each 1000 steps long. One sequence comes from a chaotic iteration for a certain choice of intial condition, the other is random (or is it?). Can you tell the difference? Which is which?
As for the first part of the assignment, to find whether the sequence was random or deterministic I used Mathematica to make a plot of the system, this it what it looked like:
This leads me to believe that it was not deterministic. There doesn't exactly look as if there is much rhyme or reason to where the points are mapped to. Some spots on the graph look as if there is a pattern trying to emerge (i.e. the white spots along between .6 and .8 along the horizontal), but I'm not convinced that it shows the IFS to be deterministic.

As for the second part of this problem, we were to determine whether a mapping of this IFS onto a binary string would be deterministic or random and to find the difference between a random string and a string mapped from an IFS with a specific initial condition.

This was fairly difficult for me, but to do this I used Mathematica to help me determine which was which. First I copied our 2 given binary strings into separate lists in Mathematica.
  • List a) had 510 zeros and 490 ones
  • List b) had 495 zeros and 505 ones
This was not very helpful in finding which was the "random" string and which was produced through the IFS, since both are so close to 50% zeros and 50% ones, which would be what you might think the random string would have to be. I next created a function in Mathematica equal to the function given above and began guessing initial conditions to start with and iterating 1000 times, then mapping the list using the parameters given for h(x). Finally I subtracted this list from each of our given binary strings, and stopped once Mathematica gave a list of all zeros.

This is what the input and output looked like: {v4 being List b) from problem 2}

Thus, List a) is the coin flip, and List b) is x(n+1) = f(x(n)) with initial condition x(0) = 0.3
I can't say that I think this IFS mapped to a binary string using h(x) is deterministic. The outcome is very close to 50% of each number which is very close to the probability of a random number generator spitting out either 1 or 0.

0 Comments:

Post a Comment

<< Home