You are on page 1of 3

1 G13GRA Introductory Graph Theory Notes 6. Walks, trails, paths, cycles Denition 6.1 a.

A walk of length n(n 0) is a sequence of n edges and n + 1 vertices: v0 , (e1 ), v1 , (e2 ), . . . , (en ), vn (from v0 to vn ). The walk connects v0 and vn . b. A walk is a trail if no edge occurs more than once (though vertices may be repeated). c. A trail/walk in which v0 = vn is closed. d. A path is a trail in which no vertex is repeated except possibly the initial and end points. e. A closed path is called a cycle . f. A cycle of length 3 is called a triangle. Theorem 6.1. If v = w, then every walk connecting v and w contains a subsequence which is a path connecting v and w. Proof: [By induction on the length n of the walk]. I.H: Suppose the result holds for all walks of length 1, 2, . . . , n 1. Let W be a walk of length n connecting v and w (say v = v0 , v1 . . . , vn = w) with vi not necessarily all distinct. If the vertices are distinct, then we have a path, completing the proof of the Theorem in this case. Incidentally, this also also takes care of n = 1. If the vertices of W are not all distinct, then i < j such that vi = vj . It follows that the walk v0 , v1 , . . . , vi , vj+1 , . . . , vn connects v and w and has length n 1. By I.H. this walk contains a path and hence so does W . Denition 6.2 Two vertices are called connected if they are joined by a path. Remark. A graph G is connected if and only if, given any two vertices v and w in G, there is a path in G joining them. Theorem 6.2 Every closed trail (of length n 2) containing a given vertex (resp. edge) has a subsequence which is a cycle containing that vertex (resp. edge). Proof. I.H.: Suppose the result holds for all closed trails in G of lengths 0, . . . , n 1. Let T = {v0 , . . . , vn = v0 } be a closed trail of length n. If all the vertices of T are distinct, then T is a cycle and the result is proved. (This also takes care of the case n = 2, 3.) If not, there exist vertices vi , vj with 1 < i < j n with vi = vj . Then v0 , v1 , . . . , vi , vj+1 , . . . , vn = v0

2 and vi , vi+1 , . . . , vj1 vj = vi are both closed trails in G, have length < n, and at least one must contain the specied vertex (resp. exactly one contains the specied edge). By I.H. these closed trails will contain a cycle and the relevant one contains the specied vertex (resp. edge). Corollary. If a closed walk has odd length, then it contains a cycle of odd length (an odd cycle). Theorem 6.3 A graph G is bipartite if and only if it contains no odd cycles. Proof. () Suppose G is bipartite and that V (G) = A B with A B = . Then on any cycle, vertices must come alternatively from A and B. But a cycle ends on the same set from where it began and hence the length must be even. () [Proof by induction on the number of edges n]. Suppose G has no odd cycles. If n = 0 then G is a null graph and hence bipartite. Suppose that G has n 1 edges and choose one, say vw. Now consider G = G vw. Then G has fewer than n edges and has no odd cycles. Hence, by I.H., G is bipartite. Colour the vertices of G accordingly, with colour sets A and B. Now restore vw: Case 1: v A, w B (or vice versa) in the colouring of G . Then, vw can be restored directly. Case 2: v and w in the same colour-set, say A. If v and w were connected in G by a path, this path would necessarily have even length. Adding vw would then give a cycle in G of odd length. This is a contradiction, so v and w are not connected by a path in G .
A a v b c w B A| f g B d e

So, the set of vertices of G to which v is connected (by paths) does not contain w. Take the subset of G to which w belongs, with the paths from w and interchange the colours of these colour-sets - then w B and v A and so vw can be restored.

3 Theorem 6.4 A graph in which every vertex has degree at least 2 contains a cycle. Proof: We may assume G to be simple. Let P be a path of maximum length G and let the vertices on P be v0 , v1 , . . . , vk .
P v0 v 1 .................... vk

vk is not terminal (d(vk ) 2) so vk is joined to some vertex w = vk1 . If w P , then P vk w is a path of greater length than P . This is a contradiction, so vk is joined to some vi P (i = k 1). Then vk , vk1 , . . . , vi , vk is a closed trail and by Theorem 6.2, the graph contains a cycle. Theorem 6.5 If the degree of every vertex of a simple graph is even and positive, then the graph can be decomposed into a union of edgedisjoint cycles. Proof [Induction on m = |E(G)|] The result is clear for a graph with 3 edges (or a cycle with n vertices). Suppose m > 3 and, without loss of generality, assume that G is connected. By Theorem 6.4, G contains a cycle C0 , say. Delete from G the edges of C0 and any vertex that then becomes isolated. The remaining graph G C0 has fewer edges than G and every vertex in G C0 is even and positive. Hence, by I.H., G C0 can be decomposed into edge-disjoint cycles C1 , . . . , Cs . Hence, G = C0 C1 . . . Cs .

You might also like