All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > General
Lights Out! (Posted on 2003-11-02) Difficulty: 4 of 5
Imagine there is a 5x5 grid of lights, and only the middle light in the grid is on.

The lights are wired such that when you flip the switch for one light (from on to off or off to on) the others right next to it (not diagonally) flip as well.

Using this weird wiring of lights, what is the fewest number of switch changes it takes to turn all the lights off, and which lights should you switch? (Assume all the switches work in the manner explained, and there is 1 switch for each of the lights.)

See The Solution Submitted by Gamer    
Rating: 4.0000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
re(3): Brute Force | Comment 22 of 27 |
(In reply to re(2): Brute Force by Charlie)

Looked at another way, any configuration that has a solution also has a solution based on exclusively ORing it with any one of three null configurations of clicks.

The following are shown in part of the solution description, off of the main URL for this puzzle . Clicking on any of these three sets has no net effect on the lights:


c-c-c....cc-cc....-ccc-
c-c-c....-----....c-c-c
-----....cc-cc....cc-cc
c-c-c....-----....c-c-c
c-c-c....cc-cc....-ccc-

Note that each is the exclusive OR of the other two.

So for example, the first (leftmost) transformation shown above, applied to the first solution in my Brute Force post, produces the third solution shown in that post. The second (middle) transformation turns my first solution into my fourth solution, and the last (rightmost) transformation converts my first into my second solution. (By exclusively oring and considering the c's as 1's)

These null transformations will convert any set of clicks into an equivalent but different set, so indeed only 1/4 of the states are attainable.
  Posted by Charlie on 2003-11-04 00:39:10
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (5)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information