Recreational Mathematics - Welcome | Union University

Post on 12-Sep-2021

2 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

Transcript

S O L V I N G L I G H T S O U T

B Y : A L I T H O M A S

Recreational Mathematics:

An Introduction:

  5 x 5 array of lights

  Object of the game:   Turn off all of the lights in

the fewest amount of moves given lights that are turned on in a specific configuration.

Lights Out

How to Play:

  The state of a light is affected by pressing the light.

  Pressing any light affects the state of the lights horizontally and vertically adjacent to the selected light.

Lights Out

W I N

U S I N G L I N E A R A L G E B R A

Let’s Solve Lights Out

A

Three Matrices are Used to Solve Lights Out:

To Begin:

1. Place original light configuration into a matrix. This is the first matrix .

• Place a 1 into the matrix if the light is on.

• Place a 0 in the matrix if the light is off.

The Strategy:

•  The matrix is the solution to solving a game of Lights Out.

•  There is a 1 if the button is to be pushed, and 0 otherwise.

•  Pressing any button changes .

•  These changes can be accounted for, and this is the origin of the strategy matrix.

•  is the representation of the changes needed to solve the game.

•  The strategy matrix tells the user what buttons must be pressed in order to win the game.

•  The size of the matrix is 25 x 1, the same as .

Matrix A:

• View the matrix row by row.

Matrix A:

•  25 x 25

• Originates from the relationship that the lights have with each other.

A =

Solving Lights Out

 To find a strategy to turn all of the lights off, solve .

 This equation develops by beginning with all of the lights out and discovering a strategy that generates .

To Find :

• Solve .

• Configuration is winnable if it belongs to the column space of matrix A.

• Perform all calculations modulo 2.

• Since A is symmetric, the column space is equal to the row space.

• The row space of matrix A is orthogonal to the null space of matrix A.

• To determine a basis for the null space of A, perform Gauss-Jordan elimination on A.

• There are two rows of zeros in the reduced row-echelon form of matrix A (The rank is 23).

• Thus, if is orthogonal to the basis for the null space of A, then it is in the row space of A and, consequently, the column space of A.

• Therefore, light configurations exist that cannot be solved.

Determining :

• Using a Computer Algebra System, such as Mathematica, solve for the strategy matrix.

•  Java Game

Pressing the blue buttons in any order will win the game.

U S I N G L I N E A R A L G E B R A

Let’s Solve Lights Out on a Torus

An Introduction:

  4 x 4 array of lights

  Object of the game:   Turn off all of the lights in

the fewest amount of moves given lights that are turned on in a specific configuration.

Lights Out on a Torus

http://www.math.cornell.edu/~mec/2008-2009/HoHonLeung/Torus.png

How to Play:

  The state of a light is affected the same.

  Now, the 1st and 4th columns are “adjacent.”

  The 1st and 4th rows are also “adjacent.”

Lights Out on a Torus

WINNER!

To Begin:

1. Place original light configuration into a matrix. This is the first matrix .

• Place a 1 into the matrix if the light is on.

• Place a 0 in the matrix if the light is off.

The Strategy:

•  A game of Lights Out on a torus is solved using the same methods used in the original Lights Out.

• The difference lies in matrix A.

Matrix A:

•  16 x 16

• Originates from the relationship that the lights have with each other.

To Find :

•  Solve .

• Recall, that is winnable if it belongs to the column space of matrix A.

 Remember that belonging to the column space is equivalent to being orthogonal to the null space.

 Perform Gauss-Jordan elimination on A.

 The matrix A row reduces completely. There are no rows of zeros and thus, no null space. The rank is 16.

 Every light configuration is winnable.

Determining :

• Using a Computer Algebra System, such as Mathematica, solve for the strategy matrix.

•  Java Game

•  Pressing those buttons in any order will win the game.

1.   A n d e r s o n , M a r l o w a n d F e i l , T o d d . “ T u r n i n g L i g h t s O u t w i t h L i n e a r A l g e b r a . ” M a t h e m a t i c s M a g a z i n e V o l . 7 1 , N o . 4 ( 1 9 9 8 ) : 3 0 0 - 3 0 3 .

2.   “ J a v a s c r i p t L i g h t s O u t K e y c h a i n . ” 2 0 0 2 . 2 D e c . 2 0 0 9 . < h t t p : / / w w w . h a a r . c l a r a . c o . u k / L i g h t s / J S / l o u t k e y . h t m l > .

3.   “ L i g h t s O u t . ” 1 9 9 6 . 2 D e c . 2 0 0 9 . < h t t p : / /w w w . w h i t m a n . e d u / m a t h e m a t i c s / l i g h t s _ o u t / > .

4.   G r o s s m a n , S t a n l e y I . “ E l e m e n t a r y L i n e a r A l g e b r a . ” F i f t h E d i t i o n . S a u n d e r s C o l l e g e P u b l i s h i n g : P h i l a d e l p h i a . 1 9 9 4 .

References

top related