turning outthe lights with - sfu.cajtmulhol/math302/notes/chapter24-lightsout-blank.pdf · chapter...
TRANSCRIPT
Chapter 24: Lights Out
Turning out the lights with linear algebraTigerElectronics
LightsOut LightsOut2000
Samplegameplay
MatricModelforpuzzleRepresent the state of each light by an element of FL o I
off Oon I
Assign a matrix in Mas Fz to a configurationof lights i
Assign a toggle matnic to each move
button 3,4
Sample game play written in terms of matrices
A lit button configuration is solvable iff
I E Xi Ti j B matnie equationis ije5
for some Xi je Fz 0,1
xi is called the strategymatrix written as a vector itis calleda stretegyneckr
E Xin Xin24,324,4 Kus Kzn Ks's
5 5 matric dimension 25 vector
Ti EiB b
EqnCtx can be written as a BIG linear system
AE 5 where A E Ei Isis25equations in 25 unknowns
Solanglightsootessolungkthfarastrategyueebracymmunj
we now neet to determine the matrix A
LightsOut Matrix A Ei I ti z o Isis whereEij is togglevectorforbutton i j
I 2 3 4 5 67 g a co n iz is n is is it too1920 a 22232425
3456
78aco11
14
17too19
mis
A littletwist
we can use techniques from linear algebra to solve butarithmetic must be done in Fz
toI 0 1
ALL results in linearalgebrahold when IR is replaced by a field R
Solvinglinear systems over Fz
X t Kz Augmented
x Xz O2GtXz I matrix
Sagemath demo
In sagemath Ez is denote GFC2 called theGalois field of size 2
Example Solve the following configuration
I
Solution
Solvable Configurations i
5 is a solvable configuration AE D has a solution
Moreover
AI _5 is solvable foreal I cHIS A is invertibledetA to
For 5 5 lights out detA
For example is
How many configurations are solvable
I solvableThe dimensionof ColA is rankA so there are
lookA I solvable configurationsout of 225configurhas
Theorem The probability a random configuration is solvable is223225 44
The nullspace of A solutions to AE 8 has dimension
nullityA RankNullitytheorem
sonulA span
o
J d d d de
Optimal solution
If I and I are two strategy vectors for configuration To theirAI D Aj
O It Naka
are four different ways to solve b Pickthe onethathastheleast number of 1 s that is theoptimal solution
Lightchasing A wayto solve with some memorization