Lamppost Toggle Cycle on a Square
Four lampposts sit at the corners of a square, labeled $A, B, C, D$ in clockwise order. All four lamps start on. A walker moves clockwise around the square, visiting one lamppost per step. The toggle rule is:
- When the walker arrives at a lamppost, if the lamp at the **previous** lamppost is currently **on**, toggle the current lamp (flip its state).
- If the previous lamp is **off**, do nothing to the current lamp.
The walker starts at lamp $A$ (before taking any steps).
(a) Model this system as a finite deterministic dynamical system. Describe the state space (lamp states plus walker position).
(b) Starting from all lamps on with the walker at $A$, compute the lamp configuration after $N$ steps as an explicit function of $N$. Give the configuration for each step in the first period.
(c) Prove the process is eventually periodic and find the minimal period.
Open the full interactive solver, hints, and worked solution →