Puzzle time
-
Yes that is the answer. From reversibility it follows.
(assuming you meant 'all on' not 'all off')
-
@jon-nyc said in Puzzle time:
Like Ax I wrote code to play a bit but after 36 bulbs ran for a full day I gave up on the brute force method.
Just out of curiosity, I ran a simulation for 36 bulbs on a MacBook Air (1.6 GHz Intel Core i5). It took 10 minutes and 36 seconds to reach the "all on" state at the 22,839,252,821st iteration. I implemented my simulator using Go.
What did you use to implement and run your simulation?
-
yes yes. there are fewer than 100*2^100 states.
-
Ax I was exaggerating but I used python on the Mac
-
Nice puzzle!
Let's analyze this some more.
Every state is in a cycle that has a length n. We just established that the set of states is the disjoint union of all cycles.
Let's consider a histogram of cycle lengths. For instance, "000....000" is in a cycle of length one, hence we add one to the bin for cycles of length 1.
What kind of shape will the histogram have? And the extra Nassim Taleb Black Swan question is: does it have a "fat tail"?
-
I graphed out some early ones, they do not. THey're in the general shape of a normal curve (not saying they're normal).
-
No we’re not. I graphed out the sum of lightbulbs that were on in each state change (every toggle changes the sum by +-1) so it moves around in a jerky continuous fashion). That formed a narrow bell curve.
When I say early ones, I did it to the completion of the cycle, or even multiple cycles for smaller n. I did also graph them for n=100 but just for the first few million ticks.