An experimental traffic light has three lights: red ($R$), yellow ($A$), and green ($V$).
Every minute, the state of the next minute is calculated like this:
- $R$ is turned on if and only if $A$ was turned off.
- $A$ is turned on if and only if $V$ was turned on.
- $V$ is turned on if and only if $R$ was turned on.
Initial state (minute 0):
$$ (R,A,V)=(0,0,0), $$
where 0 = off and 1 = on.
At what minute are all three turned off again for the first time after minute 0?
Didactic closure of the level
If you detect the correct invariant, the problem is solved without exploring long sequences.