We found that we could solve any \(3 \times 3\) Lights out puzzle, with or without a dimmer, in our previous post Solving Lights Out! In today’s post, we will find how to solve the \(5\times 5\) Light’s Out puzzle.
If you are looking for the solution to a specific \(5 \times 5\) Lights Out! game, you can have you computer give you the solution by using the solver!
Last time, we were able to give a method for solving any puzzle by showing how to change only one light at a time. We could, then, individually turn off any one light until all the lights were out. In the \(5 \times 5\) case, we will take a similar, but slightly different approach. Here, our goal will be to start with any board. We will then define an perform some action that will lead to turning a specific light off. We will then continue to turn lights off. When turning off lights, we may have to turn some other light on, but we will work in such a way that we won’t turn on any previously turned off lights. In doing this, we will be able to decrease the maximum number of lights on, hopefully, to 0 lights.
The first piece we will turn off is the center piece. Since we haven’t turned any other lights off yet, we could just press this and be done. However, it will be helpful later if we describe a way to turn this off without changing any other light. In order to do this, we would press the buttons as described in the table below.
We now move out from the center to the surrounding lights. In particular, we will focus on the light in the second row second column of the entire board. This light can also be turned off without affecting any other light. The corresponding lights we will need to hit for this are given in the table below.
Therefore, if we start with the picture on the left below, we can turn that light off without affecting any other lights. Through symmetry, we can do the same for the other lights in the corner of this middle circle. Therefore, the maximum number of lights left on is given by the right picture.
Middle circle and Corners
For the next lights, we will continue by reducing lights. However, we won’t do so necessarily without changing other lights. To begin with, suppose that we want to turn off the light in second row third column (in the picture below) we can press the button in the first row and third column. Note that this will change the lights in the first row second through fourth column, but it will not affect any of the lights we previously turned off. In order to turn the corners off, we can just press the corner buttons. Again this will affect other lights, but none of the lights we turned off in the center or middle circle. Our new maximum lights on is given below on the right.
Our goal will now be to shift the lights over to upper left. To do this, we will start at the bottom right of the board turning off lights reducing the number of lights on. For the first case, we will start with the light in the fourth row and fifth column (shown below). In order to turn this one off, we will press the buttons as given in the following table.
By rotating this we can also turn off the light in the fifth row fourth column. This will leave us with a maximum number of lights as given in the picture below on the right.
We will now move in further and turn off the light in the third row fifth column. Here we will press the buttons as given in the table below.
If we started with only the goal light on, we will end with the picture given second picture on the right. Note that, the light in the first row is one we haven’t turned off yet, but the light in the second row is. However, if we look back to our middle corner case, we can turn this light off using the table we provided in that situation. Again, through symmetry, we can show also turn off the light in the fifth row and third column. This will give us a maximum number of lights as given below.
Right and Bottom
In order to turn the light in the right column off, we will use the following table. Symmetrically, we can use a similar table in order to turn of the light in the bottom row.
The next light we will work on is the light in the first row fourth column. In order to turn this light off without affecting the others, we will press the lights in the following table. Through symmetry, we can also turn off the light in the fourth row first column.
The next step will be to turn off the light in the first row third column. In order to do this, we press the buttons in the first row first column and first row second column. By symmetry, we can also turn off the light in the third row first column.
We have now reduced the board as far as I have been able to do so. I have not found a satisfactory proof that you can go no further, but I believe this to likely be the case. What this means is that we have four options as to where we can finish. For the two lights we have left, they can either be on or off. If we cannot simplify any further, then each of these four cases (given below) cannot be obtained from the others through the pressing of buttons. Since having all lights off is one of the options, we get that if we are at this point, and any lights are on, then the board is unsolvable. If you are arbitrarily choosing lights to be on or off, this can happen. On the other hand, the game as given in Lights Out! is generated by pressing random buttons, so using the process given above, you will always end up with an empty board. In any case, we can follow the above process to either find a solution, or to show that no solution exists.
We are now equipped with the information we need to either solve any \(5 \times 5\) lights game, or at least to show that there is no solution. I hope you enjoyed working through the problem and seeing the solution. If you did, be sure to like the post below and share it on Social Media.