Problem 6
There are lamps in a circle, where and . At step , if is lit, switch , otherwise do nothing. Initially all lamps are on. Show that (a) there is a positive integer such that after steps all lamps are on again; (b) if , take ; (c) if , take .
Step 3 of 5: Prove the universal return
In plain words
Reversibility on the all-on orbit gives part (a), even if the map is not inverted on every state.
Detailed analysis
Apply the recurrence backward to the particular orbit starting at the all-one vector. The same prefix-sum calculation reconstructs a unique predecessor on this orbit at every round; hence the orbit is a cycle, not a transient. Since there are finitely many states, some positive r returns u, giving M(n)=nr plus the appropriate partial pass.