| Thread Closed |
The Lamplighter's Manor |
Share Thread | Thread Tools |
| Nov6-08, 08:57 PM | #1 |
|
|
The Lamplighter's Manor
The Lamplighter's manor is 9 room house, which can be represented as 3x3 grid. Each room has a single lamp.
When a lamp is lit, the lamps in each of the adjacent rooms light up if they are unlit, and darken if they are lit. Likewise, when a lamp is extinguished, the lamps in each of the adjacent rooms darken if they are lit, and light up if they are unlit. This does not include the rooms in diagonal, only those directly to the North, South, West and East, where it applies. We are allowed to light or darken any room, at any given time. Suppose the manor starts with all of its lights off, expect for the one in the very middle, in the second row and second column. What sequence(s) of action gets us to a fully lit manor? Here an action is to be understood as either lighting or darkening a room. |
| Nov7-08, 08:25 AM | #2 |
|
|
Not sure if it's the shortest path, but I got it in 10 steps:
Spoiler
M, NW, SE, NE, SW, M, N, W, S, E
DaveE |
| Nov7-08, 08:45 AM | #3 |
|
|
Hi davee123,
Spoiler
Correct! There is a shorter path though, reexamine your solution and you may find it.
|
| Nov7-08, 02:17 PM | #4 |
|
|
The Lamplighter's Manor
Ahh, yes. I had just done that one by hand, sort of guessing. Just wrote a program to figure out the shortest path-- one of the shortest is:
Spoiler
S, SE, NW, W, E, SW, N, NE
What surprised me was that no matter the starting orientation, no other orientation is more than 9 moves away-- and there's always only ONE that's 9 moves away. In the case of starting with everything off except the middle, the furthest away is having everything off except the 4 corners. DaveE |
| Nov7-08, 02:55 PM | #5 |
|
|
In fact,
Spoiler
It's the shortest path.
|
| Nov7-08, 03:10 PM | #6 |
|
|
Although your solution is correct, I don't think you've figured out the trick.
The Lamplighter's mansion is made up of 36 rooms, representable by a 6x6 grid. The same rules apply. The lights in the NW and NE corners are lit, and all others are off. How do you get to a fully lit mansion? Don't try this by hand! |
| Nov7-08, 04:09 PM | #7 |
|
|
the three-by-three version of this used to be on the Merlin:
![]() Except it would start with a random configuration of lights. Just random trivia. |
| Nov7-08, 05:06 PM | #8 |
|
|
DaveE |
| Nov7-08, 06:35 PM | #9 |
|
|
Spoiler
There are more than 16 variants to your solution. Far more.
![]() Good luck with your approach. The trick I'm referring to though has more to do with the analysis at the outset rather than any particular algorithm. It's really neat and easy (not computationally easy though). What I said in spoilers is a hint. |
| Nov7-08, 11:15 PM | #10 |
|
|
[QUOTE=Werg22;1947751]
Spoiler
There are more than 16 variants to your solution. Far more.
More than 16? I can't seem to find any more than 16 variants of the solution I posted, unless you're talking about solutions that don't involve solely reflection or rotation of the one I posted, which there could very well be tons of. From what I can see, for the solution I posted, there are 4 general rotations, and 2 points along the way where a layout is symmetrical along a given axis and can be reflected. Hence, the variants on my solution would be 4*2*2 = 16:
Spoiler
S, SE, NW, W, E, SW, N, NE S, SE, NW, W, N, SW, E, NE S, SW, NE, E, N, SE, W, NW S, SW, NE, E, W, SE, N, NW W, SW, NE, N, S, NW, E, SE W, SW, NE, N, E, NW, S, SE W, NW, SE, S, E, SW, N, NE W, NW, SE, S, N, SW, E, NE N, NW, SE, E, W, NE, S, SW N, NW, SE, E, S, NE, W, SW N, NE, SW, W, S, NW, E, SE N, NE, SW, W, E, NW, S, SE E, NE, SW, S, N, SE, W, NW E, NE, SW, S, W, SE, N, NW E, SE, NW, N, W, NE, S, SW E, SE, NW, N, S, NE, W, SW Did I miss a rotation/reflection point? DaveE |
| Nov8-08, 12:57 AM | #11 |
|
|
Spoiler
S, NW, NE, E, N, W, SE, SW also works.
|
| Nov8-08, 10:29 AM | #12 |
|
|
DaveE |
| Nov8-08, 11:03 AM | #13 |
|
|
Does it not work though? Try it.
![]() I reemphasize "the". All the solutions are really essentially the same. |
| Nov8-08, 09:45 PM | #14 |
|
|
Maybe I've made this too difficult. Here's a helpful hint:
Spoiler
Any rearrangement of the moves in your solution works. This why all solutions are essentially the same, they are all permutations of a same set of moves. There are in fact 8! possible solutions if you take order into account. What if you represent a lit lamp with a 1, and an unlit one with a 0? How can you represent the effect of an action with respect to the 0's and 1's, mathematically what is it equivalent to?
|
| Nov14-08, 01:42 PM | #15 |
|
|
No progress?
No other takers? |
| Nov14-08, 03:00 PM | #16 |
|
|
And the answer should be described as:
Spoiler
Using all lamps except the middle one
|
| Nov17-08, 03:12 PM | #17 |
|
|
DaveE |
| Thread Closed |
| Thread Tools | |