Standard Lights Out of grids
Definition 2.1
We begin with some definition for grids Lights Out Games, and note that the following arithmetic only works in module . First, we give some notation of position vectors and movement vectors.
The movement matrix records all the movement we do to the Lights Out buttons.
Clearly, is a subspace of .
For each solution, we can calculate the moves, which is the number of nonzero entries in module 2. Thus we define the function : by
10
and the best solution for each position vector :
Among all the solvable position vectors, we can get the best solution, i.e., the minimal solution of Lights Out and denote by
Example 2.2
Consider a grids Lights Out game. There are four movement vectors,
as follows (see fig.3.):
Fig.3. On the left side, the "P" marks the button pressed, and the right side shows the movement
affect to the grids.
Thus the movement matrix is
11
Then every position vector is considered solvable.
For example,
is a linear combination of the movement vectors.
Definition 2.3
12 Theorem 2.5
If , then every position vector is solvable, and the corresponding solution set is a singleton.
Proof. From the Rank-nullity Theorem we know that
Now as thus . So every position vector, which is in , belongs to and therefore solvable. Assume there are two solution vectors, . From Proposition 2.4(b) we know that
However, it is possible that the null space is nontrivial. In such situation, we can calculate the number of solutions.
Theorem 2.7
If the nullity of is , then there are distinct solvable position vectors, and each corresponds to solution vectors. Furthermore, for each solvable position vector , if is a solution vector to it, then
13
Proof. From the nullity we know that . By Proposition 2.4 (a), for each solvable position vector , there are solution vectors, i.e.
, and We know that on grid, each button can either be pressed or not, which implies there are ways of button pressing. Then there are
distinct solvable position vectors.
From Theorem 2.7 we can conclude that in order to get the minimal solution, it is necessary to find the basis of the null space first. Here we'll first give some properties of the solvable solution set.
Definition 2.8
A matrix is symmetric if or equivalently, for A Lights Out game is symmetric if the movement matrix is symmetric.
A matrix is reflexive if for all A Lights Out game is reflexive if the movement matrix is reflexive.
Remark. The standard Lights Out games are all symmetric and reflexive.
There are few solvability test theorems to those games.
Theorem 2.9
In a symmetric game, a position vector is solvable if and only if for each , where denotes the dot product.
Proof. Assume Since is symmetric, , i.e. . Conversely, suppose for all .Then
14
, therefore is solvable.
Corollary 2.10
In a reflexive, symmetric game, the position vector with all entries , is solvable.
Proof. Let be the position vector. Suppose , on module , leaves all the diagonal terms (See the following example for details.) Then by Theorem 2.9, is solvable.
Now we give some inspection about the solution set. By Theorem 2.7, for each solvable vector , the corresponding solution set is
15
, where . Similarly, . Then
is another solution vector to the same position vector, with the entry changed to . Therefore if we assume with the entry , then set of columns with some nonzero entries by and the set of columns with all the entries equals to zero by . Then:
16
To calculate the minimal solution, we assume that for a solvable vector , there is a solution such that inequality, and sum over all the inequalities gives the result:
17
From Lemma 2.11, for each nonempty column, the column consists equal amount of 0 and 1. Changing the summation from rows to columns leads to:
gives an upper bound for the best solution of each solvable position vector . As all the solvable vectors follow the inequality,
Example 2.13
Here we calculate the minimal solution for Lights Out game. The movement matrix is
18 The null space matrix is
There are empty columns and nonempty columns. From Theorem 2.12,
Example 2.14
Here we do the calculation for Lights Out as well. The movement matrix is
19 And the null space matrix:
There are no empty columns and nonempty columns. From Theorem 2.12,
Remark. The other Lights Out puzzle of different size can be done similarly.
However, on the size of , and many others, the null space is empty. Thus from Theorem 2.5, the minimal moves is the number of grids:
20 respectively.
Lights Out cube
The version is similar to a standard Lights Out game, but played on a cube.
Whereas the standard Lights Out has edges, the cube does not. Each button always has neighbors, thus each button press changes lights.
We can define the order of number as in fig.4:
Fig.4.
21
The movement matrix of Lights Out Cube is shown in block matrix form
where
22
23
Now for the null space, there is a basis as shown in the rows of :
Therefore the cube has vectors in the null space.
From the basis we can see that in the null space matrix , there will be empty columns and nonempty columns. Thus by Theorem 2.12:
24
25