| Lights Out Cube | VML Lights Out Cube | Home |
The Lights Out Cube has 6 faces each containing 9 buttons, this gives a grand total of 54 buttons. Pressing a button toggles the state of pressed button and the four buttons surrounding the pressed button.
Each button has two states on or off and can be mapped to a bit and the complete Lights Out cube can be modelled by a 54 bit binary number.
Each button press is equivalent to an exclusive or (xor) operation on two numbers. A property of the xor operation is that pressing a button twice is equivalent to executing two xor operations on the cube, which will take you back to where you started.
Another fortunate property of the xor operator is a xor b = b xor a. Thus we conclude the order you press the button in is not important.
To find our solution we need to press between 0 and 54 buttons. This is equivalent to finding a 54 bit number, which is 254 or 18,014,398,509,482,000 solutions.
You can attempt a linear search through solution space. If a reasonably quick computer can test 10,000,000 combinations per second it would take approximately 30 years to find a solution. The brute force method can solve simple if you search through all the 1 button press solution first followed by the 2 button solutions and so on you can solve simple problems.
A cube has six sides, we shall arbitrarily call one face the bottom. The four adjoining faces to the bottom we shall call the middle section, leaving the one remaining face we shall call the top.