play and relax: games for kids games
  Cut the knot: learn to enjoy mathematics
A math books store at a unique math study site. Learn to enjoy mathematics.
Google
Web CTK
Try our no ads browsing

Best sites for teachers
Sites for teachers
Sites for parents
Terms of use
Awards

Interactive Activities
CTK Exchange
CTK Insights - a blog

Games & Puzzles
What Is What
Arithmetic/Algebra
Geometry
Probability
Outline Mathematics
Make an Identity
Book Reviews
Eye Opener
Analog Gadgets
Inventor's Paradox
Did you know?...
Proofs
Math as Language
Things Impossible
Visual Illusions
My Logo
Math Poll
Cut The Knot!
MSET99 Talk
Other Math sites
Front Page
Movie shortcuts
Personal info
Privacy Policy

Guest book
News sites

Recommend this site

Best sites for teachers
Sites for teachers
Sites for parents

Education & Parenting

Manifesto: what CTK is about Buying a book is a commitment to learning Table of content Try our no ads browsing Things you can find on CTK Chronology of updates Email to Cut The Knot Recommend this page

Mini Lights Out

There are several variants of Merlin's Magic Square puzzle. It is called "Mini Lights Out" to distinguish it from the 5×5 puzzle, which we'll present elsewhere. The one below is played on a 4×4 board wrapped on a torus. That is, the uppermost and lowermost rows are considered neighbors and likewise the leftmost and rightmost columns are considered neighbors. The task is to switch all the buttons off. Each button is embedded into a neighborhood of five buttons according to the 4-connectedness rules. A button's neighborhood includes the button itself and its vertical and horizontal neighbors. All neighborhoods on the torus consist of five buttons. When a button is pressed, all the buttons in its neighborhood are affected and change their states.

 
Buy this applet
What if applet does not run?

The Theory

Copyright © 1996-2008 Alexander Bogomolny

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

As in Merlin's Magic Square, we use linear algebra to represent the problem. Given an ordering of the buttons, a configuration of buttons is associated with a 16-vector v = (v1 v2 ... v16)T, where vi = 1 if the ith button is lit and vi = 0, otherwise. 16-vectors are also used to describe a strategy, or a sequence of button presses. s = (s1 s2 ... s16)T, where si = 1 if the ith button is pressed and si = 0, otherwise. Clearly it is never needed to press the same button twice as two button presses cancel each other's effects. The ordering of the presses is also inessential.

Applying a strategy s to an originally unlit board is equivalent to multiplying a certain 16×16 matrix A by s. The vector As shows the resulting configuration. Also, due to the binary nature of the setup, the strategy for turning off a given set of lights is identical to the strategy for turning those same lights on from an unlit board. Therefore, given an initial configuration v, our goal is to find a strategy vector s so that As = v (mod 2).

Note that if s has a single 1 with the rest being 0, As has 1s corresponding to the neighborhood of the associated button. (This is actually the definition of the matrix A.) As a matter of fact that can be checked experimentally, if s has 1s in the neighborhood of a button with 0s elsewhere, As has a single 1 corresponding to this button. The algebraic implications of this is that As = v is equivalent to s = Av, or A2 = I, the identity matrix. This also means that the problem has a unique solution (strategy) Av for any starting configuration v.

We note that because of the specific size of this puzzle, the neighborhoods of two distinct buttons will always intersect in either 0 or 2 buttons. We now give the following

Definition

  1. Two buttons are said to be disjoint if their neighborhoods are disjoint.
  2. The count of a button is the number of buttons in its neighborhood that are currently turned on.
  3. The parity of a button is the parity of its count.

Suppose a button has a current count of n. Pressing that button will change its count to 5 - n, and thus change its parity. Pressing a disjoint button will not change the original button's count or its parity. Pressing a non-disjoint button will make the original button's count either n + 2, n - 2, or n, depending on whether the buttons common to both neighborhoods were, respectively, originally both off, both on, or one on and one off. Thus the original button's parity will not be changed by pressing a non-disjoint button. This leads to the following

Theorem 1

  The parity of a button is changed if and only if that button is pressed.

Combining Theorem 1 and the fact that every starting configuration is solvable, we get an easily implemented method to solve the Mini Lights Out game. Clearly, at the end of the game each button must have parity 0. By Theorem 1, this parity can only be changed by pressing that button. Thus we merely press those buttons whose parity is one.

References

  1. J. Missigman, R. Weida, An Easy Solution to Mini Lights Out, Mathematics Magazine, Vol. 74, No. 1. (Feb., 2001), pp. 57-59.

Copyright © 1996-2008 Alexander Bogomolny

29628800Page copy protected against web site content infringement by Copyscape


Search:
Keywords:


Latest on CTK Exchange
try this puzzle ?/?? + ?/?? + ?/? ...
Posted by albert1950
1 messages
09:11 AM, Aug-12-08

Monty Hall Problem
Posted by linkdon
75 messages
12:48 PM, Aug-05-08

Arbelos : 1) Geometrical Construc ...
Posted by Sundar Krishnan
12 messages
06:29 AM, Aug-12-08

concerning pi
Posted by Lloyd Marks
2 messages
10:51 AM, Aug-15-08

Mistake on the page (an aside, Be ...
Posted by Max
4 messages
10:28 AM, Feb-28-08

New Dissection Of Square Into Six ...
Posted by Bui Quang Tuan
4 messages
07:19 AM, Aug-20-08

You can drill a square hole
Posted by Giorgis
2 messages
08:36 AM, Aug-18-08