the
Five-Room puzzle
If you have not
yet seen my main information page about the Five Room puzzle, I suggest
that you click
here and read it first. This
page builds on the information from that page and goes into much more
detail.
The
Five Room Puzzle
Why it cannot be solved
and
How
to cheat to get an answer
This page regards
the "Five Room Puzzle" that can be found at
www.mazes.com/fiverooms.html
(or if that
link doesn't work, at this secondary address:
http://www.MAZES.com/fiverooms.html
If you are not
acquainted with that puzzle, I suggest you read the original puzzle
page (above) before you read this page, which is a reply to a student
who was exasperated with that puzzle. You might want to attempt to
solve it before you read my explanation and other versions of the
puzzle, below.
Suggestion - keep
reading even if you get confused
This quick
introductory note is to let you know that there will be some things in
this reply that you might not understand. If that happens, please keep
reading, because I will actually explain this puzzle with several
variations. So, even if you don't understand one section, you might
understand the next, then you might come back to the confusion section
and understand it better the second time.
An e-mail from a
perplexed puzzler
A student wrote to
me to tell me that my
"5
room puzzle is driving (her) crazy!"
She went on to
tell me that she had
"probably
drawn (my) little 'house' hundreds of times"
and she
"STILL
can't figure out the solution. What is it?!?"
Here is the e-mail
that I wrote to her, modified slightly for web publication, including a
review of the original puzzle.
The reason that
you can't find a solution is because you are doing it on paper. This
puzzle cannot be solved in two dimensions (in other words, it cannot be
solved on one side of a flat surface).
You might stop
here and try to solve the puzzle again, because the paragraph above is
a big HINT about what you might have to do in order to solve the
puzzle. More on that further below. (And to add to that hint, it also
cannot be solved on the surface of a sphere, or anything topologically
equivalent to a sphere. Don't worry if you don't know what topology is,
many students don't learn about topology until high school or college.
I learned about it in my senior year of high school, I think.)
Let's
come back to regular 2-D space for awhile, and ...
Create the first
version of the puzzle on Paper:
Let me try to
explain why it can't be done by having you create the puzzle on paper
and looking at it.
Let's think about
the house as a diagram with six rooms. What? You say, the house only
has five rooms?
The outside of the
house counts as one room, the walls of which are the four walls of the
house. If you were to draw the house on a very-elastic balloon, you
could stretch and shrink parts of the balloon and turn it into a room
inside the house with one of the other rooms on the outside, but that's
something that's hard to explain, other that to say that you will learn
about when your teacher tells you about "topology". (How
to see this sixth room: 1) Draw
the diagram in such a way that the walls of the house are at the very
edges of the paper. 2) Fold over the very edges so only the walls are
folded around to the back of the paper. 3) Look at the back of the
paper and you see a room that has nine doors.)
Here's what I want
you to do:
1.
Draw a picture of the house on paper
2.
Put a dot in the middle of each room, and put one dot somewhere outside
the house.
3.
Draw lines from each dot to each door and put a number on (or next to)
the dot counting those lines
As you can see, I
ended up with 5 lines coming out of each dot in three of the rooms, 4
lines coming out of the dot in two of the rooms, and 9 lines coming out
of the dot that is "inside" the "outside room" of the diagram. In other
words, four of the numbers are odd.
In essence, we
have two related puzzles.
- the original
"start inside any room and go through every doorway exactly once" and
- or a revised
"start on any dot and follow every line exactly once"
In order to prove
to you why we cannot solve the 5 room puzzle, I am going to use the
second version of the puzzle which, with numbers, can be somewhat
mathematical.
The
second puzzle, with slightly more involved instructions:
I've (almost) erased the walls so that we can emphasize the paths.
- Start on any
dot
- How to follow a
line from that dot to the next dot:
- subtract
one from the number on that dot and write down the new number there
(for example, change 5 to 4)
- erase the
line leading from that dot to the next dot (or just cross out the line
so you know you used it)
- subtract
one from the number on that next dot and write down the new number
(the new numbers represent how many lines are still available to be
used touching that vertex)
- Keep repeating
step 2 until the new number is zero (because all paths are now erased,
and you can't leave the dot, you're stranded.
You will probably
quickly notice that no matter what happens, you will eventually end up
at a point with no paths left, and still have somewhere else that you
cannot get to. One of the times I tried to do this, I started in the
top right room and ended up in the top left room (where the arrow is
pointing here), and I had no way to get to the last line that was
between the two remaining 1's. (If I had started on one of the 4's, I
would have ended up with two separate lines that I couldn't get to.
The
third puzzle only has numbers:
Now, let's look at
it as another kind of puzzle, one in which we ONLY look at the numbers.
This puzzle has
fairly simple instructions. First, let's set it up:
- Put five
pennies on top of each of the three circles with 5 on them
- Put four
pennies on top of each of the two circles that have the 4 on them
- Put nine
pennies on top of the 9 circle
Now, here are the directions
for this third puzzle:
- Start on any
pile of coins by putting your finger there.
- We are going to
jump from pile to pile, but each time we jump, we are going to remove
two pennies.
- Remove a
penny when you move away from the pile you are leaving
- Remove a
penny when you arrive on the new pile
- Keep jumping
from pile to pile until the pile you jump to has only one penny on it
(which you take away when you land there.
Or here's an even easier
set of directions to do the same thing:
- Start on any
pile. Remove one penny from that pile.
- Jump to any
other pile that has two or more pennies on it and remove two pennies
from that pile.
Keep repeating step two until there are no piles with two or more
pennies on it.
- Finally, when
there are no more larger piles left, jump to any pile that has just one
penny on it, remove that penny and STOP. The game is over.
If you started on an odd pile, you ended up on another odd pile. If you
started on an even pile, I don't know where you ended up. You could
have ended up back where you started, or on one of the odd piles.
Even though this
puzzle is much simpler, we can still see why it is impossible to solve,
because we always have to remove an even number of pennies for every
step except for the first and last steps. Since there are four odd
numbers, we can never get to all zeroes, because we can only subtract 1
twice. Two of the 1's will always be left.
By now, you know
that this puzzle is impossible to solve in two dimensions, whether you
do it as doors in a house, lines on a diagram, or pennies in piles.
The Mathematician
Euler was the one who created a line diagram to prove that a different
(but similar) puzzle known as the Bridges of Konigsberg could not be
solved. Our line diagram for the second version of the puzzle (above)
is similar to the diagram that he used to prove that the Bridges puzzle
was unsolvable.
He proved that
this kind of puzzle can ONLY be solved if it has either zero or two odd
vertexes. (Can you look at that diagram and tell me why you could never
have one odd vertex? If you're not sure, try to draw a diagram that has
an odd number of odd vertices. I bet you can't do it). Our puzzle has
four odd vertexes (your math teacher might prefer you to use the word
vertices?). If a line diagram has zero odd vertices, you can start on
any vertex and when you finish, you will end up back at that same
vertex. If you have two odd vertexes, you must start on one of the odd
vertexes and you will end on the other odd vertex (if you want to solve
it, that is). Part of his proof was based on the observation was that
each time you went through a room, you reduced the number of doors in
that room by two.
In fact, that
gives me an idea to illustrate the numbers example. Let's imagine the
first puzzle again. Start with all the doors open. As you go through a
door, close it behind you. With this example, each time you go through
a room, you close two doors, one as you enter the room and one as you
leave the room. Eventually, you enter a room, close the door behind
you, and find yourself in a room with all doors closed. In this case,
the piles of pennies illustrate open doors in the room.
There is another
variation of this puzzle that Euler used to prove that this type of
puzzle. It was an actual puzzle that was attempted by boyfriends and
girlfriends in Russia, in a town with two islands in a river that
divided the town. Let's look at a simple map of that town:
The object of this
variation of the puzzle is to start anywhere in the town and cross
every bridge exactly once (without flying or swimming). In other words,
you can only walk around this town, which was known as Konigsberg,
which is why this puzzle is called the "Bridges of Konigsberg" puzzle.
If you wanted to
turn this into a Euler-style diagram, put a vertex on each side of the
river and one on each island, and count the number of bridges that
reach that piece of land. You will have a three on each of the four
vertexes, and if you remember, Euler proved that you can only solve a
line puzzle like this if there are no more than two odd numbers. Here
is one way to draw those vertices:
No matter what you
do, we cannot start anywhere and cross every bridge. As Euler
explained, we have to start on an odd number, then each time we cross
two bridges, we have reduced the number between those two bridges by
two.
Let's review,
again, the reason you can't solve this variation of the puzzle. We
start at any number and reduce it by one. Then we reduce every
succeeding number by two (as we cross a bridge to that piece of land
then leave that piece of land again, using two bridges in the process).
Finally, when we get to a piece of land that only has a one on it, we
reduce that number to zero and stop, because we can't subtract two from
one (no negative numbers in this puzzle), and there are two other 1's
that can't be reached. Basically, the only numbers that permanently
change to even are the place where you start and the place where you
finish. All the other odd numbers simply change from 3 to 1 or from 5
to 3 to 1.
Back to that
number variation of the puzzle:
Or to summarize
that number variation we had.
- Start on any
odd number, subtract 1 from it to make it even
- Go to any
number greater than 1 and subtract 2 from it
- Keep repeating
step 2 until there are no numbers greater than 1 left
- Go to one of
the remaining 1's and subtract 1 from it, leaving zero (and QUIT)
You can do this
with any number of pennies (or bean counters or whatever).
- Start with any
numbers of piles of counters.
- Put any number
of counters in each pile (make sure there are an even number of odd
numbers, if that makes sense)
- Write down the
starting number for each pile
- Follow these
rules for the game (similar to above)
- Take one
counter away from your starting pile.
- Keep taking
two counters away from any pile that has two or more counters in it
until there are no piles with two or more counters on them
- Take one
counter away from your ending pile.
- If you start
with more than two odd piles, you will end with some untouched
counters.
- If you started
with two odd piles, and if you started by removing one counter from an
odd pile, you solved the puzzle, but if you started on an even pile,
you ended up with two counters left at the end.
OK ... I've proved
to you why the puzzle is impossible to solve, so how can you solve it?
As I indicated above, you have to think three dimensionally.
Let's look at the
bridges of Konigsberg puzzle again. We could cheat with this puzzle by
building a "Chunnel" ... which is the name that some people call that
tunnel between France and England that goes under the English Channel.
If you add a "chunnel" to the city of Konigsberg, you are changing the
numbers on the shores of the river to 4's, because 3 bridges and the
chunnel come out on the shore. This underground bridge reduces the
puzzle to a diagram with two odd numbers, a solvable puzzle if you
start on one island and end on the other. The puzzle is still not
solveable if you start on either shore because those are now even
numbers.
The thin lines
show the approximate route of the underground tunnel between the two
sides of the river. That is one way to cheat with the Bridges of
Konigsberg puzzle. You could also solve this puzzle by drawing it onto
a cylinder (such as the core of a roll of paper towels). Drawing the
diagram onto a cylinder allows you to continue the line from one shore
around the tube to the other shore, another way of going UNDER the
diagram.
Can you think of a
similar way to cheat with the five room puzzle?
A hint for
cheating with the five-room puzzle:
Think three
dimensionally. Just like we used the third dimension on the bridges
puzzle (we went UNDER the river), can you use the third dimension in
the house puzzle (like going under the house? or simpler would be to go
UNDER the first floor of the house?)
With that much of
a hint, you should be able to cheat and build an answer to the puzzle.
Just build a house with a basement underneath.
See that middle
room in the one row that has five doors in it? Let's call it the
kitchen and put a trap door in the floor that goes into the basement.
You know the type, there's a rope in the piece of wood, you pull up on
it, and you jump down through the hole in the floor. That takes care of
an extra door in the kitchen. It's a door in the floor.
But how do we get
out of the basement?
Have you seen the
old Judy Garland movie "Wizard of Oz"? I bet you have. Remember the
doors on the ground that lifted out so they could get into the
basement. Let's put one of those on the outside.
What have we done?
The kitchen now has six doors, counting the trap door under the rug as
a door, and the outside now has ten doors, the way to escape from the
basement. But we've added a seventh room to the puzzle, a basement that
has two doors, neither of which are on the first floor (though one is
in the first floor, in the kitchen floor). Now you have a solveable
puzzle. Just start in one of the rooms that still has 5 rooms, and you
can solve the puzzle. (You will end up in the other room that still has
5 doors.)
BUT ... your
teacher probably won't let you do that, so let's come up with a way of
cheating that your teacher almost has to accept (if you were doing it
as a class assignment).
A
more elegant way to cheat?
Can you think of
something that some people keep on their counter (something to eat,
sort of bready like, hard on the outside, soft on the inside) that you
could draw the five room puzzle on and be able to solve the puzzle? YEP
... try drawing the puzzle on a misshapen BAGEL (one where the hole is
closer to one side than the other). Draw it such that the hole in the
bagel is in the middle of the middle room (the kitchen) that has five
doors in it. (You could draw it onto a doughnut, but the icing might
make it hard to write clearly.)
Basically, by the
rules of topology, the inside of the kitchen is also outside the house,
because you can get from the inside of the kitchen to the outside of
the house without crossing any lines, by going through the hole,
drawing your line around the back side of the bagel back around to the
front.
Now, I bet you can
solve the puzzle. At some point, you will draw a line into that kitchen
room and keep drawing the line down through the hole of the bagel out
to the outside of the bagel. Eventually, you should be able to finish
and go through every door. Hope this helps a bit. And if you want to
know more about topology, ask your math teacher to show you a mobius
strip and a mobius bottle. A mobius strip is a piece of paper that only
has one side. A mobius bottle is a container that has only one surface
(it can only be imagined in three dimensions).
This article was
prepared by John Knoderer, the webmaster at www.MAZES.com, the founder
of www.GodLovesEveryone.org. If you would like to reach him, just
assemble his e-mail address from the word "webmaster", the required @
symbol, and the name of one of his domains, without the www.
And if you
appreciated the help that you got from this page, we urge you to make a
gift to one of our web organizations. (We are setting up a non-profit
organization, so eventually, gifts will be tax-deductible). You can use
PayPal to send an electronic check by using this link:
|