On a \(5\times5\) “Lights Out” board, it turns out that there is a simple rule to turn the whole board off regardless of which lights are on at the start:
Chase down. Start at the top row. For each light in that row that is turned on, press the button directly below it so that it turns off. Move to the next row and repeat. This turns off rows one by one; only the bottom row may be left with lights being on.
Fix the bottom. Find your bottom row in the table and press on the top row the pattern shown to the right. Then chase down again. Repeat until everything is off.
Lights on bottom row | Press on top row | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
# | 1 | 2 | 3 | 4 | 5 | 1 | 2 | 3 | 4 | 5 |
1 | ON | OFF | OFF | OFF | ON | ON | ON | OFF | OFF | OFF |
2 | OFF | ON | ON | OFF | OFF | ON | OFF | ON | OFF | OFF |
3 | OFF | OFF | ON | ON | OFF | OFF | OFF | ON | ON | OFF |
4 | ON | OFF | ON | ON | OFF | OFF | ON | OFF | ON | OFF |
Can you explain why this works?