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

 Lamps in a row (Posted on 2010-09-03)
There are n ≥ 2 lamps L1, L2, ..., Ln in a row. Each of them is
either on or off. Initially L1 is on and all of the others are off.
Each second the state of each lamp changes as follows:

if the lamp and its neighbors (L1 and Ln have one neighbor,
any other lamp has two neighbors) are in the same state,
then it is switched off; otherwise, it is switched on.

Prove or disprove that all of the lamps will eventually be switched off
if and only if n is a power of two.

Note: This is a problem that I modified from one proposed but not used at
the 47th IMO in Slovenia 2006.

 No Solution Yet Submitted by Bractals No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 solution | Comment 1 of 11
First, let us examine n=2 (21):
1|0 <- initial state [phase 0]
-+-
1|1 <- a phase n/2, the pattern becomes
-+-    a mirror image ; the pattern on the
0|0    right is the same as the initial state

Then, let us examine n=4 (22):
10|00 <- initial state
11|00
--+--
01|10 <- at phase n/2, the pattern becomes
11|11    a mirror image; the pattern on the
--+--    right is the same as the initial state
00|00

Then, let us examine n=8 (23):
1000|0000 <- initial state
1100|0000
0110|0000
1111|0000
----+----
0001|1000 <- at phase n/2, the pattern becomes
0011|1100    a mirror image; the pattern on the
0110|0110    right is the same as the initial
1111|1111    state
----+----
0000|0000

As can be observed, the top left 'sector' of the next power of 2 is identical to the top four sectors of the power of 2 that precedes it. Each, at phase n/2, becomes mirror images of the 'sector' vertically adjacent; and then at phase n all lamps are off.
Thus, for all powers of 2, the lamps will all be in an off state at phase n.

 Posted by Dej Mar on 2010-09-03 04:01:12

 Search: Search body:
Forums (0)