MATH 2730 Benjamin V.C. Collins James A. Swenson
Traveling Salesman Problem Image: Padberg-Rinaldi, 1987: 532 cities http://www.tsp.gatech.edu/data/usa/tours.html
Walks in a graph Let G = (V, E) be a graph. A walk in G is a non-empty list of vertices in which each vertex is adjacent to the next: W = (v 0, v 1,..., v l ) such that v 0 v 1 v l. The number l N is the length of W (even though W contains l + 1 vertices).
Walks from a to b The walk W = (v 0, v 1,..., v l ) is called an (a, b)-walk provided a = v 0 and b = v l. Example In the graph below, W = (r, w, u, t, u, s) is an (r, s)-walk.
New walks from old The reversal of the walk W = (v 0, v 1,..., v l ) is W 1 = (v l,..., v 1, v 0 ). Let W 1 = (v 0, v 1,..., v l ) and W 2 = (w 0, w 1,..., w k ) be walks. If v l = w 0, then we can define the concatenation W 1 + W 2 = (v 0, v 1,..., v l, w 1,..., w k ), which is a walk of length l + k.
Paths in a graph A path is a walk in which no vertex is repeated. An (a, b)-path is a path that begins at a and ends at b. Example In the graph below, W 1 = (r, w, u, t, u, s) is a walk, but not a path; W 2 = (w, r, u, s, t, v) and W 3 = (s) are paths.
Why vertices, and not edges? Proposition Let P be a walk in the graph G. If P is a path, then P does not use any edge of G more than once. Proof. We prove the contrapositive. Let P be a walk in G. Suppose that P uses the edge {u, v} at least twice. Then wlog, P = u v u v... or P = u v v u.... In each case, u is repeated in P. Thus P is not a path.
Path graphs If V = {v 1,..., v n } and E = {{v k, v k+1 } : 1 k < n}, then (V, E) is called a path graph and denoted by P n. The longest walk in P n has length n 1. P 6
Some pairs of vertices are connected Let G = (V, E) be a graph, and let u, v V. We say u is connected to v provided there is a (u, v)-path in G. Example s is connected to t. s is not connected to w. Is s connected to s?
as a relation Theorem If G = (V, E) is a graph, then is connected to is an equivalence relation on V. Proof. Define R = {(u, v) V V : u is connected to v}. First, let a V. There is an (a, a)-path in G; namely, (a). Thus ara, so R is reflexive. Now suppose a, b V and arb. Then G contains an (a, b)-path P. Now G contains a (b, a)-path; namely, P 1. Thus bra, so R is symmetric. Finally, let a, b, c V such that arb and brc. Then G contains an (a, b)-path P 1 and a (b, c)-path P 2. The concatenation P 1 + P 2 is an (a, c)-walk in G. Then, for some reason by a lemma, G contains an (a, c)-path. Hence arc, so R is transitive.
Walks yield paths Lemma Let G = (V, E) be a graph, and let x, y V. If there is an (x, y)-walk in G, then there is an (x, y)-path in G. Proof. Suppose G contains an (x, y)-walk. By the Well-Ordering Principle, there exists an (x, y)-walk P of minimal length in G. Sftsoc that P is not a path. Let u be a vertex that is repeated in P. Delete a portion of P between two copies of u, including one of the two copies. The result is an (x, y)-walk P in G that is shorter than P, but this is impossible. Thus G contains an (x, y)-path; namely, P. P = (x,..., v j, u, v k,..., y)
Components With this lemma, we have finished the proof that is-connected-to is an equivalence relation on V. This means that the vertices of G form equivalence classes: if a V, then [a] = {v V : a is connected to v}. Let G = (V, E) be a graph and let a V. Then [a] V is an equivalence class for the is-connected-to relation, and the induced subgraph G[[a]] is called a component of G.
Connected graphs Let G = (V, E) be a graph. We say G is connected provided that any two vertices of G are connected. Proposition A graph G is connected if and only if G has exactly one component.
Disconnection Let G = (V, E) be a graph. We say v V is a cut vertex provided that G v has more components than G. We say e E is a cut edge provided that G e has more components than G. Example The graph shown has one cut vertex and one cut edge.
How many pieces can you make? Theorem If G is a connected graph and e = {x, y} is a cut edge in G, then H = G e has two components; namely, H[[x]] and H[[y]]. Proof. (See proof in textbook.) Remark If G is a connected graph and v is a cut vertex in G, then the number of components in G may be any number between 2 and d(v).
paths Let G be a graph. A path P in G is called provided that P contains every vertex of G. Sir William Rowan Hamilton (1805-1865) http://www-history.mcs.st-and.ac.uk/biographies/hamilton.html
Knight s Tour http://en.wikipedia.org/wiki/rules of chess http://www-history.mcs.st-and.ac.uk/biographies/euler.html
A knight s tour found by Euler (1758) E. Sandifer, http://www.maa.org/editorial/euler/how Euler Did It 30 Knights tour.pdf
5 5 knight s tour Proposition A knight s tour exists on a 5 5 chessboard. Proof. a 5 b 5 c 5 d 5 e 5 a 4 b 4 c 4 d 4 e 4 There is a path in the graph shown; namely, a 3 b 3 c 3 d 3 e 3 a 2 b 2 c 2 d 2 e 2 P = (c 3, e 4, c 5, a 4, b 2, d 1, e 3, d 5, b 4, a 2, c 1, e 2, d 4, b 5, a 3, b 1, d 2, c 4, e 5, d 3, e 1, c 2, a 1, b 3, a 5 ). a 1 b 1 c 1 d 1 e 1
4 4 knight s tour? Theorem There is no knight s tour on a 4 4 chessboard. Proof. Sftsoc that P is a knight s tour on a 4 4 chessboard. Color the board in various ways, as shown. P must alternate between black and white squares. Sftsoc that P also alternates blue and yellow squares. Then wlog every square visited is blue/white or yellow/black, so the bottom-right square is not visited. So P does not alternate blue and yellow squares. However, it is impossible to move from one yellow square to another. Since there are 4 squares with each pair of colors, the squares of P must be yellow and blue as follows: (y, b, y, b, y, b, y, b, b, y, b, y, b, y, b, y). Likewise, the squares must be red and green in the pattern (r, g, r, g, r, g, r, g, g, r, g, r, g, r, g, r). Now the 8 th and 9 th squares in P are blue/green.
That was a lot of work. Remark It is usually fairly easy to show that G has a path (if it does), but extremely difficult to show that G does not have a path (even if it doesn t).