Algebra

[color=#999999]This activity belongs to the [i]GeoGebra book[/i] [url=https://www.geogebra.org/m/JexnDJpt]Lights Out (Games with solutions)[/url].[br][br][/color]Your goal is to turn off all the lights. The difficulty is that when you click on any square, in addition to its state, it changes the state of its adjacent squares.[br][br]You can find more information about this game in [url=https://www.geogebra.org/m/fy3pacbm]this article[/url] (June 2002) of Suma magazine (Spanish magazine on the teaching and learning of mathematics).
Each box in the first row has a letter. Subsequent rows follow from the first, so there must be a relationship between them. Let's see: [u]the box occupied by the letter [i]a[/i][/u] (which can be 1 or 0, that is, it can be selected or not) [u]must remain illuminated[/u]. Which means that if I call the state of the cell immediately below it [i]x[/i], then [i]a[/i] + [i]b[/i] + [i]x[/i] must be an odd number. That is, “[i]a[/i] + [i]b[/i] + [i]x[/i] is congruent to 1 modulo 2”.[br][br]This notation can be simplified if we agree that, henceforth, all operations are carried out with algebra modulo 2 (in whose arithmetic 1+1=0).In this way we can write [i]x = a + b[/i] + 1 (check: [i]a + b + [/i]([i]a + b[/i] + 1) = 1).[br][br]In the same way, [u]to irretrievably illuminate the square occupied by the letter [i]b[/i][/u], the letter [i]y[/i] must take a value such that [i]a + b + c + y[/i] results in “1”. From which it follows that the value of [i]y[/i] must be precisely[i] a + b + c[/i] + 1.[br][br]Thus, the rest of the boxes can be completed in a few seconds.[br][br]Ah, but now [i]I need the last row to be lit as well[/i]! To do this, a sixth "virtual" row is added whose state, following the same method, is the one shown in the previous figure.[br][br]Well, the fifth row is already illuminated, but now the sixth row that I added is "excess". This row was added to force the fifth to light, but it did not appear in the original square. Therefore, none of these "virtual boxes" can be selected. Well, nothing, you have to eliminate them, delete them, [i]annul[/i] them:[color=#999999][br][br][math]\begin{matrix}b+c+e+1=0\\a+b+c=0\\a+b+d+e=0\\c+d+e=0\\a+c+d+1=0\end{matrix}[/math][br][br][/color]From which it follows that two of the variables (for example d and e) are free (they can take any value, 0 or 1, so there are 4 possibilities) and the other three depend on them, as shown by the black box in the figure.[color=#999999][br][br]Author of the construction of GeoGebra: [color=#999999][url=https://www.geogebra.org/u/rafael]Rafael Losada[/url][/color][/color]

Information: Algebra