Mandelbrot has a 2 4 -hour digital clock with a light above it.
Every minute, a computer in the clock calculates a complex number c = ( 6 1 h − 2 ) + ( 1 5 1 m − 2 ) i , where h is the hour and m is the minute. If the orbit of z n for z n + 1 = z n 2 + c with z 0 = 0 tends to infinity, the light turns green, but if the orbit is bounded, the light turns red.
For example, at 1 8 : 3 0 , c = ( 6 1 1 8 − 2 ) + ( 1 5 1 3 0 − 2 ) i = 1 , and this gives the sequence 0 , 1 , 2 , 5 , 2 6 , … , which tends to infinity, so the light on the clock would be green. But at 6 : 3 0 , c = ( 6 1 6 − 2 ) + ( 1 5 1 3 0 − 2 ) i = − 1 , and this gives the sequence 0 , − 1 , 0 , − 1 , 0 , … , which is bounded, so the light on the clock would be red.
If you were to look at the clock at a random time during the day, would the light above the clock be more likely to be green or red?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Great solution! That is how I originally did it, too.
this is beautiful!!+1!!!
I found a divergence criterion at this link . The sequence diverges if the following conditions apply (this is perhaps sufficient but not necessary):
1)
The complex
c
value has a magnitude less than or equal to 2
2)
Any sequence term has a magnitude greater than 2
The strategy is the following:
1)
Permute through all hour / minute possibilities in a day (1440 permutations)
2)
For each hour / minute permutation, run the sequence for 1000 iterations
3)
Count the number of verifiable divergences and compare this to the total number of minutes in a day
4)
If over half of the trials are provably divergent, the clock is green on average
Luckily, the sequence is provably divergent on average. Code attached below. 973 out of the 1440 minutes were green. Note that the actual number of divergences may be higher than this, and I just didn't see them because the first sequence term didn't exceed 2 within the first 1000 iterations. And there may be other sufficiency conditions for divergence that I didn't account for here. But the established lower bound is still big enough to prove average "green-ness".
import math
minute_count = 0
diverge_count = 0
#####################################################################
for h in range(0,24): # for 24 hours (0-23)
for m in range(0,60): # for 60 minutes (0-59)
H = float(h)
M = float(m)
cr = H/6.0 - 2.0
ci = M/15.0 - 2.0
c = complex(cr,ci)
if abs(c) <= 2.0: # divergence proof applies to abs(c) <= 2
z = 0.0 # initiate z sequence at 0
div = 0 # initialize divergence flag at 0
for j in range(0,1000): # allow 1000 iterations for the sequence to diverge
z = z*z + c
if abs(z) > 2.0: # apply divergence criterion
div = 1
if div == 1:
diverge_count = diverge_count + 1
minute_count = minute_count + 1
#####################################################################
print minute_count
print diverge_count
print float(diverge_count) / float(minute_count)
Nice solution! I also double-checked my answer with a computer program. If c = a + bi, by observation it appears that the sequence also diverges when b > 1 and b < -1, and when a > 1, which would account for over half of the possible time values and lead you to the correct answer, but I'm not sure how to prove these divergence conditions.
wonderfully done sir...+1!!!!
Log in to reply
Thanks. The next thing I will do is re-construct that plot given in the first solution.
Oh yeah sure!!
The points of c are in a regular grid within a rectangle of area 4. The Mandelbrot set has an area just a little over 1.5
This is not a proof (since the points of the set could conspire against us) but I think a pretty good rough estimate is that the light will be red only about 38% of the time.
Good point! Sometimes a rough estimate is all that is necessary.
Problem Loading...
Note Loading...
Set Loading...
This problem is a roundabout way of asking the following question: If we look at point c inside the box [ − 2 , 2 ] × [ − 2 i , 2 i ] , is that point more likely to lie inside or outside of the Mandelbrot set?