|
|
|
|
|
by tromp
1652 days ago
|
|
Using diagonals decomposes the puzzle into 2 disjoint puzzles according to the black and white squares in a checkerboard pattern. One puzzle can be marked as _ A _ B
C _ D _
_ E _ F
B _ G _
If we denote the corresponding buttons in lowercase, we have the equation A 1 0 1 1 0 1 0 a
B 0 1 0 1 1 0 0 b
C 1 0 1 0 1 0 1 c
D = 1 1 0 1 1 1 0 d
E 0 1 1 1 1 0 1 e
F 1 0 0 1 0 1 1 f
G 0 0 1 0 1 1 1 g
Where A=1 if and only if light A needs to change.This matrix over GF(2) is not invertible; its rank is only 5, so the lights cannot be changed arbitrarily.
By Gaussian elimination, one finds that button f does the same as buttons a b e together, and button g the same as b c d together. This reduces the equation to A 0 1 1 1 1 a
B 0 1 0 1 1 b
C = 1 1 0 1 1 c
D 0 0 0 1 0 d
E 0 0 0 0 1 e
and the solution comes out as e = E
d = D
c = A B
b = B D E
a = B C
Solving for the remaining buttons yields e = E
d = D
c = A B
b = B D E
a = B C
|
|
> This reduces the equation to
We instead just ignore buttons f and g, and invert the equation
to Showing which buttons to press in terms of exclusive-or of wrong lights, e.g. press button a if exactly one of lights B and D is wrong.