Graph Puzzles
Graph Puzzles
x x z x
z
y u
v
z y w y w
1 Eulerian Path
Given a graph, we would like to find a path with the following conditions:
• the path should begin and end at the same vertex.
z x
v y u
(a)
1
z y
w u
a b
(b)
z y
w u
a b
(c)
2
z y
w u
a b
(d)
x y
w
v z
u
(e)
3
2 Room Puzzles
1. Consider the following four room apartment with doors.
(a) Can you find a continuous line that passes through each door exactly
once?
(b) If we transform this floor plan into a graph, what should the vertices
and the edges represent? What does the graph look like?
4
2. It is said that graph theory was born in Königsberg in 1736. Located
on the Pregel river, the parts of the city were linked by seven bridges as
shown below. The citizens wondered whether they could leave home, cross
every bridge exactly once, and return home.
(a) If we transform the figure above into a graph, what does it look like?
(b) Can you find such a path for the citizens of Königsberg? If yes, draw
it. If no, explain why not.
5
3. Consider the following five room apartment.
(a) If we make this floor plan into a graph, what does it look like?
(b) Can you find a continuous line that pass through each door exactly
once? If yes, draw it. If no, explain why not.
(c) Now we are allowed to close doors of the apartment. After closing
at least how many doors we can find a continuous line that passes
through each door exactly once?
6
4. Consider the following apartment with doors.
(a) Without transforming the floor plan into a graph, can you tell whether
there is a continuous line that pass through each door exactly once?
(b) At least how many doors are needed to be closed to have a continuous
line that passes through each door exactly once?
7
5. Can you find anything in common for those Eulerian graphs, and for those
graphs that are not Eulerian? From these examples, can you summarize
the conditions needed for a graph to be Eulerian?
8. Explain why the number of people in the world who have met an odd
number of people is even.
8
3 The Art Gallery Problem
A modern gallery has the shape of a simple polygon in the plane. Stationary
guards are needed to watch the gallery.
1. Suppose the gallery has N corners and one stationary guard is enough to
watch the gallery (regardless of the exact shape of the polygon). What is
the largest possible value for N ?
2. Suppose the gallery has N corners and we need at lest two stationary
guards to watch the gallery (regardless of the exact shape of the polygon).
What is the smallest possible value for N ? Draw an example for that.
9
3. If the shape of the modern gallery is as below, what’s the maximum num-
ber of stationary guards that may be needed to watch the gallery?
10