Download presentation
Presentation is loading. Please wait.
Published byMyron Hampton Modified over 9 years ago
1
1 Graph Theory: Solved and Unsolved Problems Roger House Scientific Café Coffee Catz Sebastopol, CA 2010 April 22 Copyright © 2010 Roger House
2
2 What we're going to talk about Graphs –What's a graph? –What's a graph good for? Graph problems –The Königsberg bridge problem –The planarity problem –The Traveling Salesman Problem (TSP)
3
3 What's a graph?
4
4 Remember these graphs?
5
5 And these?
6
6 And graphs you can eat
7
7 None of these graphs are the kinds of graphs we're interested in at the moment
8
8 A different kind of graph We're going to deal with much different kinds of graphs, namely, mathematical graphs.
9
9 Definition of a graph Definition: A graph G consists of a finite nonempty set V of vertices together with a set E of unordered pairs of distinct vertices of V. The pair e = {u,v} of vertices in E is called an edge of G.
10
10 There will be a quiz on the definition
11
11 There will be a quiz on the definition But not on the one above
12
12 There will be a quiz on the definition But not on the one above On the one below
13
13 A friendlier definition A graph is dots connected by lines.
14
14 Fancy terminology The dots are called vertices. (Or points, or nodes, or...)
15
15 Fancy terminology The dots are called vertices. (Or points, or nodes, or...) The lines are called edges. (The graph above has 7 vertices and 9 edges.)
16
16 Fancy terminology The dots are called vertices. (Or points, or nodes, or...) The lines are called edges. (The graph above has 7 vertices and 9 edges.) Two vertices connected by an edge are adjacent.
17
17 Fancy terminology The dots are called vertices. (Or points, or nodes, or...) The lines are called edges. (The graph above has 7 vertices and 9 edges.) Two vertices connected by an edge are adjacent. An edge is incident with its two vertices.
18
18 Fancy terminology The dots are called vertices. (Or points, or nodes, or...) The lines are called edges. (The graph above has 7 vertices and 9 edges.) Two vertices connected by an edge are adjacent. An edge is incident with its two vertices. The degree of a vertex is the number of edges incident with the vertex.
19
19 Complete graphs
20
20 Bipartite graphs
21
21 More graphs
22
22 Yet more graphs
23
23 What's a graph good for?
24
Road network graph 24 The vertices in G are intersections, protection points, and entrance points.
25
Modeling an electrical circuit
26
26
27
27 #include structure
28
28 Function call graph
29
29 Unix family tree
30
30 Are there enough graphs? # vertices # graphs 1 1 2 2 3 4
31
31 Are there enough graphs? # vertices #graphs 1 1 2 2 3 4 4 11
32
32 Are there enough graphs? # vertices #graphs 1 1 2 2 3 4 4 11 5 34
33
33 Are there enough graphs? # vertices #graphs 1 1 2 2 3 4 4 11 5 34 6 156
34
34 Are there enough graphs? # vertices #graphs 1 1 2 2 3 4 4 11 5 34 6 156 7 1044
35
35 Are there enough graphs? # vertices #graphs 1 1 2 2 3 4 4 11 5 34 6 156 7 1044 8 12,346
36
36 Are there enough graphs? # vertices #graphs 1 1 2 2 3 4 4 11 5 34 6 156 7 1044 8 12,346 9 274,668
37
37 Are there enough graphs? # vertices #graphs 1 1 2 2 3 4 4 11 5 34 6 156 7 1044 8 12,346 9 274,668 10 12,005,168
38
38 The Königsberg bridge problem
39
39 What's the problem? Where: Königsberg, Prussia (now Kaliningrad, Russia) When: Early 1700's What: How to start at one place, cross each bridge exactly once, and end up back where you started from
40
40 Abstracting a bit
41
41 More abstraction
42
42 The essence of the problem
43
43 A graph problem Pick any vertex V as a start vertex.
44
44 A graph problem Pick any vertex V as a start vertex. Pick any edge incident to V which has not yet been traveled, and travel along it to another vertex, marking the edge as traveled.
45
45 A graph problem Pick any vertex V as a start vertex. Pick any edge incident to V which has not yet been traveled, and travel along it to another vertex, marking the edge as traveled. Keep traveling from vertex to vertex along untraveled edges, marking the edges as traveled, until you return to V and all edges have been traveled exactly once.
46
46 Euler to the rescue Leonhard Euler (1707-1783), a Swiss mathematician discovered everything.
47
47 Euler to the rescue Leonhard Euler (1707-1783), a Swiss mathematician discovered everything. Well, almost everything.
48
48 Euler to the rescue In 1735 Euler proved that the problem has no solution.
49
49 Euler to the rescue In 1735 Euler proved that the problem has no solution. He proved more: If a connected graph has a closed eulerian circuit, then the degree of every vertex is even.
50
50 Are the degrees all even?
51
51 Say we add a couple of bridges
52
52 Now is there an eulerian circuit? The degree of each vertex is even
53
53 Now is there an eulerian circuit? The degree of each vertex is even So Euler's theorem tells us there is an eulerian circuit, right?
54
54 Now is there an eulerian circuit? The degree of each vertex is even So Euler's theorem tells us there is an eulerian circuit, right? NO! NO! NO!
55
55 Avoid logical pitfalls “A implies B” does NOT mean that “B implies A” So the fact that all the vertex degrees are even does not tell us that an eulerian circuit exists. But one might exist anyway.
56
56 Can you find an eulerian circuit?
57
57 Here's one 1 2 3 4 5 6 7 8 9
58
58 Hierholzer to the rescue Carl Hierholzer (1840-1871), a German mathematician, published a paper in 1873 proving the converse of Euler's theorem:
59
59 Hierholzer to the rescue Carl Hierholzer (1840-1871), a German mathematician, published a paper in 1873 proving the converse of Euler's theorem: If the degree of every vertex of a connected graph is even, then the graph has a closed eulerian circuit.
60
60 Hierholzer to the rescue So now it's really easy to tell if a graph has a closed eulerian circuit or not.
61
61 Hierholzer to the rescue So now it's really easy to tell if a graph has a closed eulerian circuit or not. Just look at the degree of every vertex.
62
62 Hierholzer to the rescue So now it's really easy to tell if a graph has a closed eulerian circuit or not. Just look at the degree of every vertex. If all the degrees are even then a closed eulerain circuit exists. If one or more vertices has odd degree, then no eulerian circuit exist.
63
63 You call that “rescue”? So, once we know a closed eulerian circuit exists, how do we find it?
64
64 You call that “rescue”? So, once we know a closed eulerian circuit exists, how do we find it? Hierholzer's theorem tells us nothing about how to find a closed eulerian circuit.
65
65 You call that “rescue”? So, once we know a closed eulerian circuit exists, how do we find it? Hierholzer's theorem tells us nothing about how to find a closed eulerian circuit. We can be assured that at least one exists, but we don't have a clue how to find one.
66
66 Some terminology If more than one edge connects distinct vertices u and v, then we have a multigraph.
67
67 Some terminology If more than one edge connects distinct vertices u and v, then we have a multigraph. The Königsberg Bridges graph is a multigraph.
68
68 Some terminology If there is at most one edge between any two distinct vertices, we have a simple graph.
69
69 Some terminology If there is at most one edge between any two distinct vertices, we have a simple graph. From now we consider only simple graphs.
70
70 The planarity problem Some graphs are planar, which means they can be drawn in a “nice” way
71
71 Some planar graphs
72
72 Definition of a planar graph A graph is planar if it can be drawn in the plane in such a way that
73
73 Definition of a planar graph A graph is planar if it can be drawn in the plane in such a way that – Each vertex is a distinct point in the plane
74
74 Definition of a planar graph A graph is planar if it can be drawn in the plane in such a way that – Each vertex is a distinct point in the plane – Edges do not cross – in fact, two edges touch if and only if they have a common vertex, in which case they touch only at that vertex
75
75 Definition of a planar graph A graph is planar if it can be drawn in the plane in such a way that – Each vertex is a distinct point in the plane – Edges do not cross – in fact, two edges touch if and only if they have a common vertex, in which case they touch only at that vertex – An edge does not touch any vertices except the two at its endpoints
76
76 Some planar graphs again
77
77 Is this graph (K 4 ) planar?
78
78 Yes, K 4 is planar
79
79 A bit nicer drawing
80
80 Is this graph (K 5 -e) planar? A B C D E
81
81 Redraw K 5 -e, swapping C and D A B C D E A B D C E
82
82 Yes, K 5 -e is planar A B D C E A B D C E
83
83 Is this graph (K 5 ) planar? A B C D E
84
84 No, K 5 is not planar A B C D E A B C D E
85
85 Not so fast How do we know K 5 is nonplanar?
86
86 Not so fast How do we know K 5 is nonplanar? Just because we have nonplanar drawings of it does not mean that no planar drawing exists.
87
87 Not so fast Maybe we just haven't been clever enough to find a planar drawing.
88
88 Not so fast Maybe we just haven't been clever enough to find a planar drawing. Trust me, K 5 is nonplanar
89
89 Is this graph (K 3,3 ) planar? This graph is also called the Utility Graph. Think of connecting three utilities, gas, water, and electric, to three houses without any of the lines crossing. Can it be done?
90
90 No, K 3,3 is not planar
91
91 Not so fast (again) Again, you should be asking, “How do we know K 3,3 is nonplanar?”
92
92 Not so fast (again) Again, you should be asking, “How do we know K 3,3 is nonplanar?” Again, you'll just have to trust me on this.
93
93 Not so fast (again) Again, you should be asking, “How do we know K 3,3 is nonplanar?” Again, you'll just have to trust me on this. Or, look at Dots and Lines by Richard J. Trudeau.
94
94 How to tell if a graph is planar? At this point we know that K 5 and K 3,3 are nonplanar (that is, if you trust me) But, in general, given any old graph, how to tell if it is planar or nonplanar? For example...
95
95 Which of these is planar?
96
96 Which of these is planar? None of these graphs is planar. How do we know? How can we be sure? Let's carefully examine the first one...
97
97 Petersen's graph After Julius Petersen (1839-1910), a Danish mathematician, who pre- sented it in 1898 (although it had already been published in 1886). Donald Knuth says the Petersen graph is "a remarkable config- uration that serves as a counter- example to many optimistic predictions about what might be true for graphs in general."
98
98 K 3,3 is hiding in Petersen's graph
99
99 K 3,3 is hiding in Petersen's graph
100
100 K 3,3 is hiding in Petersen's graph
101
101 K 3,3 is hiding in Petersen's graph
102
102 K 3,3 is hiding in Petersen's graph
103
103 K 3,3 is hiding in Petersen's graph
104
104 K 3,3 is hiding in Petersen's graph
105
105 So? We have shown that K 3,3 is “contained” in Petersen's graph.
106
106 So? We have shown that K 3,3 is “contained” in Petersen's graph. So what?
107
107 So? We have shown that K 3,3 is “contained” in Petersen's graph. So what? So, that proves that Petersen's graph is nonplanar.
108
108 How so? Say that Petersen's graph is planar.
109
109 How so? Say that Petersen's graph is planar. Then we can draw it with no edge crossings.
110
110 How so? Say that Petersen's graph is planar. Then we can draw it with no edge crossings. Now, remove the four vertices and six edges as we did above, and what have we got?
111
111 How so? A planar drawing of K 3,3.
112
112 How so? A planar drawing of K 3,3. BUT, K 3,3 is nonplanar, so a planar drawing does not exist, so we have a contra-diction.
113
113 How so? A planar drawing of K 3,3. But, K 3,3 is nonplanar, so a planar drawing does not exist, so we have a contra- diction. Thus the original assumption that Petersen's graph is planar is false.
114
114 A test for nonplanarity We can generalize the above proof that Petersen's graph is nonplanar:
115
115 A test for nonplanarity We can generalize the above proof that Petersen's graph is nonplanar: If a graph G “contains” a nonplanar graph, then G is nonplanar also.
116
116 A test for nonplanarity We can generalize the above proof that Petersen's graph is nonplanar: If a graph G “contains” a nonplanar graph, then G is nonplanar also. But, it gets even better...
117
117 Kuratowski to the rescue In 1930 Kuratowski (1896-1980) proved: A graph is planar if and only if it does not “contain” K 3,3 or K 5.
118
118 Kuratowski to the rescue So every nonplanar graph “contains” K 3,3 or K 5.
119
119 Kuratowski to the rescue So every nonplanar graph “contains” K 3,3 or K 5. And no planar graph contains K 3,3 or K 5.
120
120 K 3,3 and K 5
121
121 Now prove these are nonplanar
122
122 The Traveling Salesman Problem A salesman's territory covers the city he lives in and 4 other cities.
123
123 The Traveling Salesman Problem A salesman's territory covers the city he lives in and 4 other cities. The salesman starts from his city and visits one of the other cities, and from that city he visits a third city, etc., until he arrives back home, having visited each of the 5 cities exacty once.
124
124 The Traveling Salesman Problem A salesman's territory covers the city he lives in and 4 other cities. The salesman starts from his city and visits one of the other cities, and from that city he visits a third city, etc., until he arrives back home, having visited each of the 5 cities exacty once. How to pick a shortest tour?
125
125 What is the shortest tour? 403 A B C D E 300 632 447 47 2 608 640 25 0 44 7
126
126 Shortest tour = ABDCE (1855) 403 A B C D E 300 632 447 47 2 608 640 25 0 44 7
127
127 How to find the shortest tour? Here's one way to do it: list all possible tours add up the edge distances for each tour pick the tour with smallest total distance
128
128 Try ABCDE 403 A B C D E 300 632 447 47 2 608 640 25 0 44 7 300 472 250 447 1916
129
129 Lengths of all tours ABCDE: 1916 ACBDE: 2378 ABCED: 2101 ACBED: 2595 ABDCE: 1855 ADBCE: 2410 ABDEC: 2009 ADBEC: 2534 ABECD: 2073 AEBCD: 2442 ABEDC: 2041 AEBDC: 2349
130
130 Tours sorted by length ABDCE: 1855 AEBDC: 2349 ABCDE: 1916 ACBDE: 2378 ABDEC: 2009 ADBCE: 2410 ABEDC: 2041 AEBCD: 2442 ABECD: 2073 ADBEC: 2534 ABCED: 2101 ACBED: 2595
131
131 Longest tour = ACBED (2595) 403 A B C D E 300 632 447 47 2 608 640 25 0 44 7
132
132 How many tours are there? n # edges = n(n-1)/2 # tours = (n-1)!/2 ------------------------------------------------------------ 5 10 12 6 15 60 7 21 360 8 28 2,520 9 36 20,160 10 45 181,440 15 105 43,589,145,600 20 190 60,822,550,204,416,000 25 300 310,224,200,866,619,719,680,000
133
133 How long to check all the tours? Fastest computer today does 360*10 12 operations per second.
134
134 How long to check all the tours? Fastest computer today does 360*10 12 operations per second. Round this up to 1000*10 12 = 10 15 operations per second.
135
135 How long to check all the tours? Fastest computer today does 360*10 12 operations per second. Round this up to 1000*10 12 = 10 15 operations per second. Assume 10 15 tours can be checked in 1 second.
136
136 How long to check all the tours? How long will it take to check 310,224,200,866,619,719,680,000 tours?
137
137 How long to check all the tours? How long will it take to check 310,224,200,866,619,719,680,000 tours? 310,224,200,866,619,719,680,000 / 10 15
138
138 How long to check all the tours? How long will it take to check 310,224,200,866,619,719,680,000 tours? 310,224,200,866,619,719,680,000 / 10 15 = 310,224,201 seconds
139
139 How long to check all the tours? How long will it take to check 310,224,200,866,619,719,680,000 tours? 310,224,200,866,619,719,680,000 / 10 15 = 310,224,201 seconds = 9.837 years
140
140 How long to check all the tours? How long will it take to check 310,224,200,866,619,719,680,000 tours? 310,224,200,866,619,719,680,000 / 10 15 = 310,224,201 seconds = 9.837 years = 9 years, 10 months
141
141 Bad news Obviously the method we have used to solve the TSP is no good at all for rather small problems, e.g., 25 cities.
142
142 Bad news Obviously the method we have used to solve the TSP is no good at all for rather small problems, e.g., 25 cities. We want an efficient procedure, which means a process that does not grow exponentially with the number of cities.
143
143 Bad news Obviously the method we have used to solve the TSP is no good at all for rather small problems, e.g., 25 cities. We want an efficient procedure, which means a process that does not grow exponentially with the number of cities. Here's the bad news: No such procedure is known.
144
144 Bad news Obviously the method we have used to solve the TSP is no good at all for rather small problems, e.g., 25 cities. We want an efficient procedure, which means a process that does not grow exponentially with the number of cities. Here's the bad news: No such procedure is known. Finding an efficient procedure for solving TSP in general is an unsolved problem
145
145 Good news However, this does not mean that we can't handle 25 cities.
146
146 Good news However, this does not mean that we can't handle 25 cities. There are clever algorithms which make it possible to handle very large cases.
147
147 Good news However, this does not mean that we can't handle 25 cities. There are clever algorithms which make it possible to handle very large cases. For example, consider this figure from a book by David Applegate, Robert Bixby, Vasek Chvatal and William Cook:
148
148 A large solved tour 13,509 towns in the US with pop. > 500
149
149 Bad news, again Despite success on various practical cases, from a mathematical point of view, the problem of finding an efficient process for solving the Traveling Salesman Problem is unsolved.
150
150 Good news, again According to David Hilbert (1862-1943): “As long as a branch of science offers an abundance of problems, so long is it alive; a lack of problems foreshadows extinction or the cessation of independent development.”
151
151 Good news, again According to David Hilbert (1862-1943): “As long as a branch of science offers an abundance of problems, so long is it alive; a lack of problems foreshadows extinction or the cessation of independent development.” According to the Everly Brothers: “Problems, problems, problems all day long”
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.