Home > Riddles > The traffic light that it reprograma only

The traffic light that it reprograma only

Pure logicLevel 1/5

Under its everyday appearance, this problem is an exercise in logical precision. It all depends on distinguishing between what changes state and what, despite these changes, continues to impose a firm limit.

An experimental traffic light has three lights: red \(R\), yellow \(A\) and green \(V\). Each light is worth 1 if it is on and 0 if it is off.

Each minute is updated with this rule: the red one takes the value of \(\neg A\) (that is, the opposite of \(A\): if \(A=0\), it goes to 1; if \(A=1\), it goes to 0), the yellow takes the previous value of \(V\), and the green takes the previous value of \(R\). If you start at \((R,A,V)=(0,0,0)\), at what minute does that exact same state first appear again?

Hints

Show hints
  1. Don't try to follow it 'by eye' for too long: the possible states are finite and the system ends up entering a cycle.
  2. Write the initial state as an on/off triple and apply the rules minute by minute.
  3. As soon as a previous state reappears, you already know all the future behavior.

Solution

Show full solution

Answer: minute 6. Rules:

$$ R_{t+1}=\neg A_t,\quad A_{t+1}=V_t,\quad V_{t+1}=R_t. $$ With initial state $(R,A,V)=(0,0,0)$: - $t=0$: $(0,0,0)$ - $t=1$: $(1,0,0)$ - $t=2$: $(1,0,1)$ - $t=3$: $(1,1,1)$ - $t=4$: $(0,1,1)$ - $t=5$: $(0,1,0)$ - $t=6$: $(0,0,0)$ The first repetition of the “all off” state after startup occurs at $t=6$. $$

Related riddles

Keep practicing

If you enjoyed this one, try more pure-logic riddles, explore this theme, browse the full archive, or read the riddle-solving guide.

← Previous: Ten tokens and the black impossible · Next: Mutilated board and dominoes →