Graph Theory. 1 Graphs and Subgraphs

Size: px
Start display at page:

Download "Graph Theory. 1 Graphs and Subgraphs"

Transcription

1 1 Graphs and Subgraphs Graph Theory Definition 1.1. A multigraph or just graph is an ordered pair G = (V, E) consisting of a nonempty vertex set V of vertices and an edge set E of edges such that each edge e E is assigned to an unordered pair {u, v} with u, v V (possibly u = v), written e = uv. Let e = uv be an edge. We say that the edge e is incident with the vertices u, v, or say that u, v are adjacent by e. We call u, v the endpoints of e. If u = v, we call e a loop at the vertex u. Let G = (V, E) be a multigraph. If the graph G is clear in the context, we usually write V = V (G) and E = E(G). Sometimes the vertices of V are called nodes or sites; edges of E are called links or bonds. A graph G = (V, E) can be represented by a picture as follows: for each vertex v of V we draw a solid dot (sometimes we also draw a small circle), and for each edge x incident with two vertices u, v we draw a line between u and v. Then the multigraph G is represented by a picture with dots and lines. If there are more than one edge between two vertices, the edges are called multiple edges. A walk of length k on a multigraph G is a sequence W = v 0 e 1 v 1 e 2... v k 1 e k v k of vertices and edges (not necessarily distinct) such that each e i is an edge incident with vertices v i 1 and v i, 1 i k. The vertex v 0 is called the initial vertex and v k the terminal vertex. If v 0 = v k, W is called a closed walk. A trail is a walk whose edges are distinct. A path is a walk whose vertices and edges are distinct, except the intial and terminal vertices. For instance, in Figure 1, the vertex-edge sequence v 2 e 9 v 4 e 8 v 3 e 6 v 5 is a path, but not closed. The sequence v 4 e 8 v 3 e 6 v 5 e 7 v 3 e 2 v 2 is a trail, but not closed. The sequence v 4 e 8 v 3 e 6 v 5 e 7 v 3 e 3 v 6 e 5 v 5 e 7 v 3 e 6 v 5 e 12 v 4 is a closed walk. The closed paths v 1 e 1 v 2 e 2 v 3 e 8 v 4 e 10 v 1, v 3 e 6 v 5 e 7 v 3, and the loop v 6 e 4 v 6 are all cycles. 1

2 v 1 e e 11 1 e v 10 v v e 9 e e e 8 e e v e 7 v Figure 1: A graph with multiple edges and loops A graph H is called a subgraph of a graph G if V (H) V (G) and E(H) E(G). A graph is said to be connected if there is a path between each pair of two vertices; otherwise it is said to be disconnected. A maximal connected subgraph of G is called a component; the number of connected components of G is denoted by c(g). A cycle in a graph G is a connected a subgraph having degree 2 at every vertex; the number edges of a cycle is called its length. A loop is an edge whose two endpoints are identical. A loop forms a cycle of length one. Definition 1.2. A graph is said to be simple if there are no loops and no multiple edges between two distinct vertices. A simple graph can be viewed as an irreflexive and symmetric binary relation on its vertex set. Let G = (V, E) be a graph with the vertex set V = {v 1, v 2,..., v n } and the edge set E = {e 1, e 2,..., e m }. The adjacency matrix of G is an n n matrix A(G) = [a ij ], whose (i, j)-entry is a ij = number of edges between v i and v j ; and the incidence matrix of G is an n m matrix M(G) = [b ij ], whose (i, j)-entry is { 1 if vi is incident with e b ij = j, 0 if v i is not incident with e j. The degree of a vertex v in a graph G is an integer deg G (v) = number of edges incident with v 6 (loops are counted twice). e e

3 Proposition 1.3. Every graph G has the relation deg G (v) = 2 E(G). v V (G) Proof. Since each edge contributes 2 in the sum of degrees of vertices, it is clear that the sum of degrees of vertices is twice of the number of edges. An isomorphism from a graph G 1 = (V 1, E 1 ) to a graph G 2 = (V 2, E 2 ) is a pair of bijections φ : V 1 V 2, ψ : E 1 E 2 such that for each edge e E 1 and vertices u, v V, the edge e is incident with u, v iff the edge φ(e) is incident with vertices φ(u), φ(v), i.e., e = uv ψ(e) = φ(u)φ(v). When such a pair of bijections exist, G 1 and G 2 are said to be isomorphic. Isomorphic graphs have the same number of vertices, the same number of edges, and the same degree sequences. For instance, the graphs G 1 and G 2 in Figure 2 are isomorphic; and an isomorphism φ is given by φ(u 1 ) = u 2, φ(u 2 ) = v 1, φ(u 3 ) = v 2, φ(v 1 ) = u 1, φ(v 2 ) = v 3, φ(v 3 ) = u 3. u1 u2 u 3 u 2 u 1 v 1 u 3 v 3 v v v 1 (a) G v 2 (b) G 2 Figure 2: The graphs G 1 and G 2 are isomorphic. A complete graph is a graph such that every pair of two distinct vertices are adjacent. We denote by K n the complete graph with n vertices. 3

4 A graph G = (V, E) is called bipartite if the vertex set V can be partitioned into two disjoint nonempty subsets V 1, V 2 such that each edge of G is between a vertex of V 1 and a vertex of V 2. If every pair of vertices between V 1 and V 2 is an edge of G, then G is called a complete bipartite graph. The complete bipartite graph with m vertices in V 1 and n vertices in V 2 is denoted by K m,n. Proposition 1.4. A graph G is bipartite if and only if every cycle of G has even length. Proof. If G is bipartite, then every edge of G is between two disjoint nonempty sets V 1 and V 2. It follows that the sequence of any cycle is alternating between V 1 and V 2. So the length of any cycle must be even. Conversely, if every cycle of G has even length, we show that G is bipartite. Without loss of generality, we may assume that G is connected. Let d(u, v) denote the length of a shortest path between two vertices u and v. Fix a vertex v 0. Let V 1 V 2 = {w V (G) : d(v 0, w) is odd}, = {w V (G) : d(v 0, w) is even}. We claim that there is no edge whose end vertices belonging to V 1. Given two vertices u, v V 1. Let P (v 0, u) be a shortest path from v 0 to u, and Q(v 0, v) a shortest path from v 0 to v. Let v 0, v 1,..., v k be the common vertices on the paths P (v 0, u) and Q(v 0, v), starting from v 0. Since P (v 0, u) and Q(v 0, v) are shortest paths, the subpath P (v 0, v k ) of P (v 0, u) from v 0 to v k must be shortest; so is the subpath Q(v 0, v k ) of Q(v 0, v) from v 0 to v k. Then P (v 0, v k ) and Q(v 0, v k ) have the same length. Let P (v k, u) denote the subpath of P (v 0, u) from v k to u, and Q(v k, v) the subpath of Q(v 0, v) from v k to v. It follows that the length of P (v k, u) and Q(v k, v) have the same parity; that is, both are even or both are odd. Now suppose there is an edge e adjacent with vertices u, v. Let P 1 (v k, v) denote the reversed path of P (v k, v), from v to v k. Then the closed path P (v k, u)ep 1 (v k, v) is a cycle of odd length, a contradiction. Hence there is no edge inside V 1. Likewise, there is no edge inside V 2. Therefore G is bipartite. 4

5 2 Euler Trail Problem A trail in a graph G is called an Euler trail if it uses every edge exactly once. A closed Euler path is called an Euler tour. Theorem 2.1. A connected graph has an Euler tour iff the degree of every vertex is even. Proof. Let G be a connected graph. : Let W = v 0 e 1 v 1 e 2 v 2 e n v n be an Euler tour with v 0 = v n. Fix a vertex v V (G). Let v appear in W as v i1,..., v ik. If v v 0 = v n, then deg(v) = 2k. If v = v 0 = v i1 = v ik = v n with k 2, then deg(v) = 2(k 1). This can also be argued as follows: When one travels along the Euler tour and passes by a vertex v, the person must come towards v through one edge and depart from v through another edge. So the number of times coming towards v is the same as the number times departing from v. Thus the degree of G at v must be even. : Let G have even degree at all vertices. Consider a longest trail P, whose vertex-edge sequence is P = v 0 e 1 v 1 e 2 v 2 v n 1 e n v n. (a) We claim that v 0 = v n. Suppose v 0 v n. Let G be the graph obtained from G by removing all edges of P. If v n appears k times in the subtrail P 1 = v 0 e 1 v 1 e n 1 v n 1 e n without terminal vertex, then the degree of v n will be reduced by 2k when the edges of P 1 are removed (including one side of the possible loop e n if v n 1 = v n ), and the degree of v n will be further reduced by 1 when the edge e n is removed at v n. So the degree of v n in P is 2k + 1. Thus the degree of v n in G is an odd number. This means that there is at least one edge e in G adjacent to v n, say, v n ev. Hence we can construct a longer trail v 0 e 1 v 1 e n v n ev, which is a contradiction. (b) We claim that the longest trial uses every edge of G. Suppose there is an edge e which is not used in a longest path P. If u or v is some v i, say, v = v i, then uev(v i )e i+1 v i+1 e n v n (v 0 )e 1 v 1 e i v i 5

6 v 0 v 8 v 12 v 7 v 1 v 10 v 3 v 6 v 9 v 13 v 5 v 2 v 4 v 11 Figure 3: A longest path in G that is not closed. is a longer trail, which is a contradiction. If neither u nor v is in the trial P, there is a shortest path ue 1u 1 e 2 e mu m from u to P, where u m = v j for some j. It is clear that ue 1u 1 e 2 e mu m does not contain any edge of v 0 e 1 v 1 e 2 v 2 e n v n. Thus ue 1u 1 e 2 e mu m e j+1 v j+1 e j+2 e n v n (v 0 )e 1 v 1 e j v j is a longer trail, which is again a contradiction. u u v v v 4 v 4 v 8 v 8 v 9 v 7 v 0 v1 v 2 v 3 v6 v 5 v 9 v 7 v 0 v1 v 2 v 3 v6 v 5 (a) (b) Figure 4: A longest trail in G that uv is not used. Corollary 2.2. A connected graph G has an Euler trail if and only if all vertices have even degree or there are exactly two vertices of odd degree. Proof. Let G be a graph with an Euler trail starting at u and ending at v. If u = v, the Euler trail is an Euler tour. By Theorem 2.1, all vertices have even degrees. If u v, add a new edge e between u and v to G to have a new graph 6

7 G. Then the Euler trail in G becomes an Euler tour in G with the added edge. It follows from Theorem 2.1 that every vertex of G has even degree. Thus G has exactly two vertices u and v with odd degree. Conversely, if G has even degree for every vertex, then it has an Euler tour by Theorem 2.1. Let G be a graph having exactly two vertices u and v of odd degree. We add a new edge e between u and v to G to get a graph G. Then G has even degree for all its vertices. Thus G has an Euler tour by Theorem 2.1. Remove the edge e from the Euler tour for G. We obtain an Euler path for G. There is an algorithms to find an Euler tour or Euler trail in a graph. Theorem 2.3. (Fleury s Algorithm) Input: Graph G = (V, E). Output: Euler tour or Euler trail; no Euler trail. STEP 1. If there are vertices of odd degree, choose such a vertex v; otherwise, choose any vertex v. Set SEQ = v. STEP 2. If there is no edge remaining at the terminal vertex v of SEQ, then STOP. (There is an Euler trail. If v is the same as the initial vertex of SEQ, it is an Euler tour.) STEP 3. If there is exactly one edge e from v to another vertex w, then remove ve and go to STEP 5. STEP 4. If there are more than one edges remaining at v, choose one of these edges, say an edge e from v to w, in such a way that the removal of e will not disconnect the remaining graph, then remove e and go to STEP 5. If such an edge can not be selected, STOP. (There is no Euler tour or Euler trail.) STEP 5. Add ew to the end of SEQ, replace v by w, and return to STEP 2. Example 2.1. The vertex-edge sequence of an Euler trail for the graph in Figure 5 is given as SEQ = v 3 e 3 v 4 e 4 v 5 e 5 v 6 e 6 v 7 e 7 v 8 e 8 v 1 e 1 v 2 e 2 v 3 e 12 v 9 e 14 v 4 e 16 v 6 e 15 v 9 e 10 v 2 e 9 v 8 e 11 v 9 e 13 v 7. 7

8 v 2 e v e v e 1 14 v 1 e 9 e 11 e 10 e 12 e e 4 v 9 e 16 v 5 e 8 e 13 e 15 e 5 3 Quotient Graphs e 7 v 8 v e6 7 v 6 Figure 5: A graph with an Euler trail. Let G = (V, E) be a graph. Let be an equivalence relation on V. The quotient graph of G with respect to is a graph whose vertex set is the quotient set V/ and two equivalence classes [u], [v] form an edge iff uv forms an edge in G. Example 3.1. Let G = (V, E), where V = {v 1, v 2,..., v 8 }, E is defined by v i v j E i j 3. See Figure 6 (a). Let be a relation on V defined by v i v j 5 (i j). Then is an equivalence relation. The quotient graph G/ is demonstrated in Figure 6 (b). Example 3.2. Let G = (V, E), where V = {v 1, v 2,..., v 8 }, E is defined by v i v j E 3 i j 5. See Figure 7 (a). Let be a relation on V defined by v i R 2 v j 6 (i j). Then is an equivalence relation, and the quotient graph G/ is given in Figure 7 (b). 8

9 v 4 v 5 v 2 v 7 v 3 v 6 v 2 v 7 v v 1 6 v 3 v 8 v 1 v 8 (a) G v 4 v 5 (b) G/ Figure 6: The construction of a quotient graph v 4 v 5 v 4 v 5 v 3 v 6 v 2 v 7 v 3 v 6 v 1 v 8 (a) G v v7 v 2 v 8 1 (b) G/ 4 Hamilton Cycle Problem Figure 7: The construction of a quotient graph A cycle in a graph is called a Hamilton cycle (or Hamilton tour) if it visits every vertex of the graph exactly once. A graph with a Hamilton cycle is called a Hamilton graph. A Hamilton path is a path, but not closed, that visits every vertex exactly once. So far there is no simple necessary and sufficient condition for a graph to be a Hamilton graph. Theorem 4.1. Let G be a simple graph with V (G) = n 3. If for each pair of non-adjacent vertices u, v V, deg G (u) + deg G (v) n, (1) 9

10 then G has a Hamilton cycle. Proof. Suppose the theorem is not true for some n 3. Fix such an n. Let G be a counterexample with E(G) as large as possible. Note that G is a subgraph of K n which contains obviously Hamilton cycles, and G K n. Adjoin one edge of K n that is not contained in G to the the graph G; we obtain a graph G which still satisfies obviously the degree condition (1). By the choice of G, such a graph G would have a Hamilton cycle. This means that G must already have a Hamilton path with the vertex sequence, say, v 1 v 2... v n. Since G has no Hamilton cycles, the vertices v 1 and v n are not adjacent in G. We then have deg G (v 1 ) + deg G (v n ) n. Let V 1, V 2 {v 2,..., v n 1 } be defined by V 1 V 2 = {v i : (v 1, v i ) E(G)}, = {v i : (v i 1, v n ) E(G)} {v i 1 : (v i 1, v n ) E(G)}. Then V 1 = deg G (v 1 ), V 2 = deg G (v n ), and V 1 + V 2 n, V 1 V 2 n 2. Thus V 1 V n = V 1 + V 2 V 1 V 2 2. Let v i V 1 V 2. Then v v i 1 v i v i+1 v v 1 2 n v 1 v i, v i 1 v n are edges of G. Thus v 1 v 2... v i 1 v n v n 1... v i+1 v i v 1 is a Hamilton cycle of G. 5 Trees Definition 5.1. An acyclic graph (or forest) is a graph having no cycles. A tree is a connected acyclic graph. The non-isomorphic trees with up to six vertices are listed in Figure 8. It is interesting, but difficult, to construct all non-isomorphic trees. We do not 10

11 (a) (b) (c) (d) (e) (f) (g) (h) (i) (j) (k) (l) (m) (n) Figure 8: Non-isomorphic trees with up to six vertices even know how to count the number of non-isomorphic trees with n vertices. However, the number of labelled trees with n vertices is n n 2. A graph G 1 = (V 1, E 1 ) is called a spanning subgraph of a graph G = (V, E) if V 1 = V and E 1 E. If a spanning subgraph is a tree, it is called a spanning tree. Theorem 5.2. Every connected graph contains a spanning tree. Proof. Given a connected graph G, having or having no cycles. If G has no cycles, then G itself is a spanning tree. If G has cycles, choose a cycle C and remove one edge from C. We obtain a connected spanning subgraph G 1. If G 1 still has cycles, then choose a cycle C 1 of G 1 and remove one edge from C 1 to obtain a connected spanning subgraph G 2. Continue this procedure when there 11

12 are still cycles in the newly obtained spanning subgraph of G. Since the number of edges is finite, we eventually obtain a connected spanning subgraph having no cycles. This final spanning subgraph is a spanning tree of G. Theorem 5.3. If T = (V, E) is a tree, then E = V 1. (2) Proof. We apply induction on the number of edges of T. When E = 0, the tree T is a single-vertex graph without edges; clearly, E = V 1. Consider a tree T with E(T ) 1. Choose an edge e = uv E(T ) and remove it from T. We obtain two subtrees T 1 and T 2 ; see Figure 9. By induction, we have Thus E(T 1 ) = V (T 1 ) 1, E(T 2 ) = V (T 2 ) 1. E(T ) = E(T 1 ) + E(T 2 ) + 1 = V (T 1 ) + V (T 2 ) 1 = V (T ) 1. u e v T 1 T 2 Figure 9: The subtrees T 1 and T 2 obtained from T by removing an edge e. Corollary 5.4. If G is a forest with c(g) connected components, then E(G) = V (G) c(g). (3) Proof. Note that each component of G is a tree. Applying the tree formula (2) to each component of G, we obtain E(G) = V (G) c(g). Theorem 5.5 (Tree Characterizations). Let G be a graph with vertex set V and edge set E. The following statements are equivalent. (1) G is a tree. 12

13 (2) There exists a unique path from one vertex to another in G. (3) G is connected, and the removal of any edge disconnects G. (4) G contains no cycles and E = V 1. (5) G is connected, E = V 1. (6) For each edge e E, G e contains exactly one cycle. Proof. (1) (2): Suppose that there are two paths from a vertex u to a vertex v, say, P = u 0 x 1 u 1 x 2... u m 1 x m u m, Q = v 0 y 1 v 1 y 2... v n 1 y n v n, where u 0 = v 0 = u and u m = v n = v. Then P Q 1 is a closed walk, and subsequently contains a cycle. This is contradict to that G contains no cycles. (2) (3): The graph G is connected by definition. Choose an edge e = uv E and remove it from G to have G := G e. Suppose G is still connected. Then there is a path P from u to v. Thus G has two paths uv and P, a contradiction. (3) (4): Suppose G contains some cycles. Then the removal of any edge from a cycle will not disconnect G; this is a contradiction. So G contains no cycles. Since G is connected and contains no cycles, then by definition G is a tree. Thus E = V 1 by the tree formula (2). (4) (5): Since G contains no cycles, it follows from (3) that G has only one component. That is G is connected and E = V 1. (5) (6): Suppose G = G e is not a graph having exactly one cycle. Then G may have no cycles or may have more than one cycle. Case 1: If G has no cycles, then G is a tree because G is connected. Thus 1 c(g ) c(g) = 1. So c(g) = c(g ) = 1. Since G has no cycles, we have V E = c(g) = c(g ) = V E 1. This is a contradiction. Case 2: If G has more than one cycle, then G has some cycles. Removing some edges from G to obtain a spanning tree T of G. Then E(T ) = V 1. Thus E = E(T ). This is impossible because some edges have been removed from G. 13

14 (6) (1): It is clear that G contains no cycles; otherwise joining one edge will result more cycles. It is also clear that G is connected; otherwise, joining an edge between two components will not result any cycle. So G is a tree. A leaf in a tree is a vertex of degree one. For a single-vertex tree, there is no leaf. For trees with more than one vertex, we shall see that there must exist at least two leaves. Theorem 5.6. A tree with more than one vertex has at least two leaves. First Proof. Suppose the theorem is not true. Let T = (V, E) be a tree with V 2, having only one leaf or no leaves. Case 1: If T has only one leaf, then T has V 1 vertices of degree at least two and one vertex of degree 1. Thus by the tree formula E = V 1 and the degree-sum formula, we have the contradiction 2( V 1) = 2 E = deg(v) 2( V 1) + 1. v V Case 2: If T has no leaves, then the degree of every vertex is at least two. We thus have the contradiction 2( V 1) = 2 E = deg(v) 2 V. v V Second Proof. We make induction on the number of edges of trees with more than one vertex. It is obviously true for a tree with only one edge. Let T = (V, E) be a tree with two or more vertices. Choose an edge x = uv E and removed it from T to obtain two subtrees T u and T v, where u is a vertex of T u and v is a vertex of T v. If both T u and T v have more than one vertex, then by induction both T u and T v have at least two leaves. Then T u must have a leaf other than u and T v must have a leaf other than v. Thus T has at least two leaves (two vertices of degree 1 other than u and v). If T u has the only vertex u and T v has more than one vertex, then u is a leaf of T and T v has a leaf other than v. Thus T has at least two leaves. It is similar when T u has more than one vertex and T v has the only vertex v. If both T u and T v have only one vertex, then T is a tree with the only edge uv; the vertices u and v are two leaves of T. 14

15 6 Rooted Trees A rooted tree is a tree T with a specified vertex v 0, called the root of T, denoted by (T, v 0 ). A vertex v of a rooted tree (T, v 0 ) is called a vertex of level k if the length of the unique path from the root v 0 to the vertex v is k. The largest level number of a rooted tree is called the height of the rooted tree. A rooted tree can be described by a graph v 0 level 0 level 1 level 2 level 3 A rooted tree can be also described by a directed tree. This can be done by adding an arrow to each edge from a vertex of level k to a vertex of level k + 1. For instance, the rooted tree above can be drawn as a directed graph v 0 level 0 level 1 level 2 level 3 In this way a rooted tree can be characterized as a directed graph with a vertex v 0 such that ideg (v 0 ) = 0 and ideg (v) = 1 for all other vertices v. If (u, v) is an directed edge of a rooted tree from a vertex u to a vertex v, we say that u is the parent of v or v a child of u. Every vertex except the root has exactly one parent; a parent may have several children. If there is a unique directed 15

16 path from a vertex v to a vertex w, we say that v is an ancestor of w or w a descendant of v. A rooted tree is called a binary tree if each vertex has at most two children: either a left child or a right child; both a left child and a right child; or no children at all. Similarly, for m 2, an m-ary tree is a rooted tree that every parent has at most m children. The children of a parent can be labelled by the numbers from {1, 2,..., m}. If a parent has less than m children, we say that the ith child is absent in case no child is labelled with i. For any vertex v of an m-ary tree, we have odeg (v) m. An m-ary tree is called a regular m-ary tree (or complete m-ary tree) if the out-degree is either m or 0 for all vertices. A regular m-ary tree is called a full m-ary tree if all leaves are in the same level. Example 6.1. Find the number of vertices for a full m-ary tree of height h. Solution. 1 + m + m m h = mh+1 1 m 1. 16

17 7 Labeled Trees An ordered rooted tree is a rooted tree of which the vertices are labelled in certain linear order. Proposition 7.1 (The Universal Address System for a rooted tree). Given a rooted tree. STEP 1. Assign 0 to the root. STEP 2. Assign positive integers to the vertices in level 1, going from left to right. STEP 3. Let v be an interval vertex of level n 1, and let v 1, v 2,..., v k be the children of v, going from left to right. If l is a label assigned to v, then assign labels l.1, l.2,..., l.k to the vertices v 1, v 2,..., v k respectively. Example 7.1. Following example demonstrates this procedure

18 Example 7.2. Polish Notations: [(7 a)/5] [(a + b) 3] _ + 7 a a b / _ a a b * / _ a a b 18

19 Example 7.3. Consider a linearly ordered finite set Σ of alphabets. Then Σ can be made into a rooted tree as follows: (i) The empty word λ serves as the root. (ii) For each word w Σ, the set of its children is C w = {wx : x Σ}. Since Σ is linearly ordered, the elements of C w can be linearly ordered as follows: For x, y Σ, wx < wy x < y. In doing so we obtain a rooted infinite tree Σ w having the root w and the vertex set wσ = {wx : x Σ }. For instance, for Σ = {a, b} with a < b, the rooted tree Σ λ is λ a b aa ab ba bb aaa aab aba abb baa bab bba bbb aaaa aaab aaba aabb abaa abab abba abbb baaa baab baba babb bbaa bbab bbba bbbb 19

20 8 Tree Searching Given a rooted tree (T, v 0 ). In many occasions we need to visit every vertex exactly once in a specified order. The process to visit vertices of a tree in a specified order is called searching or performing a tree search. In some other books this process is also called traversal. Let (T 0, v 0 ) be a rooted tree with root v 0. Let T 1, T 2,..., T k denote the subtrees of T 0 with their roots at the children of v 0, ordered from left to right as follows: v 0... T1 T 2 T 3 T k Preorder Search. Visit the root v 0 first. Then visit the vertices of T 1 in preorder, the vertices of T 2 in preorder, and so on until the vertices of T k are visited in preorder. We summarize this as visiting a parent first then visiting its children next. Example 8.1. Find the linear order for the vertices of the tree below in peorder Solution. 1, 2, 5, 12, 13, 22, 23, 6, 14, 24, 15, 16, 25, 26, 27, 3, 7, 8, 9, 17, 18, 28, 29, 30, 4, 10, 11, 19, 20, 31, 32,

21 Postorder Searching. Let T 1, T 2,..., T k be subtrees of the root v 0. Visit the vertices of T 1, T 2,..., T k respectively in postorder first. Then visit the root v 0 next. This can be summarized as visiting children first then visiting their parent next. Example 8.2. The linear order for the vertices of the tree above in postorder: 12, 22, 23, 13, 5, 24, 14, 15, 25, 26, 27, 16, 6, 2, 7, 8, 17, 28, 29, 30, 18, 9, 3, 10, 19, 31, 32, 20, 21, 11, 4, 1. Inorder Search. For a binary rooted tree (T, v 0 ), the descendants of the root v 0 can be divided into a left side rooted subtree T L and a right side rooted subtree T R as follows: v 0 T L T R One can visit the vertices of the subtree T L in inorder first, then visit the root v 0 next, and then visit the vertices of the subtree T R in inorder last. This can be summarized as visiting a left child first, then visiting the parent next, and then visit the right child last. Example 8.3. Find the linear order for the vertices of the binary rooted tree below in preorder, postorder, and in inorder respectively

22 Solution. Preorder: 1, 2, 4, 8, 9, 5, 10, 3, 6, 11, 12, 7, 13. Postorder: 8, 9, 4, 10, 5, 2, 11, 12, 6, 13, 7, 3, 1. Inorder: 8, 4, 9, 2, 10, 5, 1, 11, 6, 12, 3, 7, Depth-First Search The three methods of visiting the vertices of the binary rooted tree above have a common feature: each of them goes as far as it can by following the edges of the tree away from the root, then it backs up a bit and again goes as far as it can, and so on. This kind of strategy is usually called depth-first search. Let us give another example of such strategy by finding a spanning tree of a connected graph. Depth-First Search Algorithm. Input: Connected labeled graph G = (V, E), V = {v 1, v 2,..., v n }. Output: Rooted spanning tree (T, v 1 ) for G. STEP 1. Assign v 1 to the variable v and initialize a rooted tree (T, v 1 ) consisting of just one vertex. STEP 2. Select the smallest subscript i (2 i n) such that (v, v i ) E and v i has not been visited. If no such subscript is found, go to STEP 3. If such subscript exists, attach the edge (v, v i ) to T and assign v i to v, then return to STEP 2. STEP 3. If v = v 1, STOP. The tree T is a spanning rooted tree. STEP 4. If v v 1, backtrack from v to its parent, say u, then assign u to v and return to STEP 2. Example 9.1. The rooted tree of the following graph by Depth-First Search Algorithm is as follows. 10 Breadth-First Search Breadth-First Search Algorithm. Input: Connected graph G = (V, E), V = {v 1, v 2,..., v n }. Output: Rooted spanning tree (T, v 1 ) for G. 22

23 STEP 1. Start with a sequence Q = v 1 and initialize a rooted tree (T, v 1 ) consisting of just one vertex. STEP 2. If Q is an empty sequence, then STOP. STEP 3. If Q is a non-empty sequence, then delete the vertex in the front of Q, say v. STEP 4. If there are vertices w adjacent with v and w are not visited yet, then attach all the edges (v, w) to T, add all the vertices w to the end of Q, and return to STEP 2. If there are no vertices adjacent with v that are not yet visited, then return to STEP 2. Example The rooted tree of the graph above by breadth-first search algorithm is as follows. Solution. Q = 1 Q = 2 Q = 3, 5 Q = 5 Q = 4, 6, 7 Q = 6, 7 Q = 7 Q = 9 Q = 8, 10 Q = 10 Q = Ø. 11 Minimum Spanning Tree A graph G = (V, E) together with a weight function w : E R is called a weighted graph. For each edge e E, the value w(e) is called the weight of the edge e. The weight of G is the value w(g) = e E w(e). 23

24 If G is connected, then G contains a spanning tree. A minimum spanning tree (MST) of a weighted graph G is a spanning tree whose weight is minimum among all spanning trees. We introduce two algorithms for finding a minimum spanning tree of a weighted graph. Theorem 11.1 (Kruskal s Algorithm). Input: G = (V, E) with V = n, w : E R. Output: MST of G or no spanning tree. STEP 1. Choose an edge e of G such that w(e) is smallest in E. Initialize a forest F consisting of this single edge e. STEP 2. If E(F ) = n 1, STOP. (F is an MST of G.) STEP 3. If E(F ) < n 1 and E E(F ) =, STOP. (There is no spanning tree.) STEP 4. If E(F ) < n 1 and E E(F ), select an edge e F such that w(e) = min{x E(F ) : T x has no cycle}, then attach e to F and return to STEP 2. If {e E(F ) : F e has no cycle} =, STOP. (There is no spanning tree.) Proof. Whenever G is disconnected, it is clear that the algorithm stops either in STEP 3 or in the latter case of STEP 4 with conclusion of non-existence of spanning tree. We assume that G is connected. It is clear that MSTs always exist. Let the edges of G be labeled as e 1, e 2,..., e m and be linearly order as w(e 1 ) w(e 2 ) w(e m )

25 Let F 1 denote the forest consisting of the single edge e 1. Let F k denote the forest obtained by the algorithm when the kth edge e k is inspected, where k 2, i.e., { Fk 1 if F F k = k 1 e k contains a cycle, F k 1 e k otherwise. We claim that F k is contained in an MST for each k 1 by induction on k. For k = 1, let u and v be the vertices of the edge e 1. Let T 0 be an MST. If e 1 T 0, nothing is to be proved. If e 1 T 0, then T 0 e 1 contains a unique cycle C. Obviously, w(e 1 ) w(e) for all e E(C). Let e be an edge of C other than e 1. Then T 1 = (T 0 e 1 ) e is an MST that contains F 1, since the tree T 1 has the weight w(t 1 ) = w(t 0 ) + w(e 1 ) w(e) w(t 0 ). Assume that the forest F k 1 is contained an MST T k 1. Our aim is to construct an MST T k containing F k. We divide the situation into two cases. Case 1: e k F k. This means that e k is not selected at the time when e k is inspected, i.e., F k 1 e k contains a cycle. Then F k = F k 1. Thus T k = T k 1 is an MST and T k contains F k. Case 2: e k F k. This means that e k is selected at the time when e k is inspected, and F k = F k 1 e k. There are two subcases. Subcase 1: e k T k 1. Then T k = T k 1 is an MST and it contains F k. Subcase 2: e k T k 1. Then T k 1 e k contains a unique cycle C. Clearly, the cycle C is not contained in F k since F k is a forest. So E(C F k ). We claim that w(e ) w(e k ) for all e E(C F k ). Suppose w(e ) < w(e k ) for one edge e E(C F k ). Since the weight w(e ) is smaller than w(e k ), the edge e has been inspected before e k and is not selected, say, e = e i for some i < k. Thus F i 1 e contains a cycle. Of course, F k 1 e i contains a cycle because F i 1 is contained in F k 1. Since e E(C), we see that F k 1 e is contained in T k 1 e k ; it follows that the cycle in F k 1 e must be the cycle C, so C is the unique cycle in F i 1 e i. Since e k e i = e, it follows that e k is already an edge in F k 1 ; this is a contradiction. 25

26 Now we fix an edge e E(C F k ) and define a tree T k = (T k 1 e k ) e. Since w(e ) w(e k ), we see that w(t k ) = w(t k 1 ) + w(e k ) w(e ) w(t k 1 ). Hence T k is an MST and it contains F k. Theorem 11.2 (Prim s Algorithm). Input: G = (V, E), V = n, w : E R. Output: An MST tree of G or no spanning tree. STEP 1. Choose a vertex v 0 of G. Initialize a subtree T consisting of v 0. STEP 2. If V (T ) = n, STOP. (T is an MST of G.) STEP 3. If V (T ) < n and there is no edge from V (T ) to V V (T ), STOP. (There is no spanning tree.) STEP 4. If V (T ) < n and there are edges from V (T ) to V V (T ), select an edge e from V (T ) to V V (T ) such that w(e) = min{w(x) : x = uv, u V (T ), v V V (T )}, attach e to T to have a subtree T = T e, and return to STEP 2. Proof. If G is disconnected, the algorithm stops in STEP 3 and there is no spanning tree. Assume that G is connected. It suffices to show that the subtrees T, which are constructed in STEP 4, are always contained in some MSTs. We proceed by induction on V (T ). At the beginning when a vertex v 0 is selected, V (T ) = 1, it is true that T (= {v 0 }) is contained in every MST. Assume that T is contained in an MST T 1 and V (T ) < n. Let e be an edge from V (T ) to V V (T ) such that w(e) = min{w(x) : x = uv, u V (T ), v V V (T }. If e E(T 1 ), nothing is to be proved. If e E(T 1 ), then T 1 e contains a unique cycle C, and e E(C). For each e 1 E(C e), we must have w(e 1 ) w(e). Otherwise, if w(e 1 ) > w(e), the spanning tree (T 1 e) e 1 would have weight w((t 1 e) e 1 ) = w(t 1 ) + w(e) w(e 1 ) < w(t 1 ). This is contradictory to the minimality of T 1. 26

27 Since the cycle C intersects the cut [V (T ), V V (T )] (the set of all edges between V (T ) and V V (T )), the intersection E(C) [V (T ), V V (T )] must contain an edge e 2 other than e. Then w(e 2 ) w(e) by the above argument. The minimality of w(e) in [V (T ), V V (T )] implies w(e 2 ) = w(e). Thus the spanning tree T 2 = (T 1 e) e 2 has weight w(t 2 ) = w(t 1 ) + w(e) w(e 2 ) = w(t 1 ). Hence T 2 is an MST and contains T e. 27

28 Example Find a minimum spanning tree for the following graph. a 18 b 5 2 c 4 d 1 e 15 f g 10 h 17 i 8 j k l 9 m n o p 16 q r Solution. (i) Using Kruskal s Algorithm. E(T ) = {(d, e), (b, e), (f, j), (h, k), (l, p), (c, d), (d, h), (a, d), (i, m), (l, o), (m, q), (e, i), (c, g), (i, j), (k, o), (n, r), (m, r)}. a b c d 1 e f g h i 8 j 3 5 k l m n o p q r 28

29 (ii) Using Prim s Algorithm. E(T ) = {(a, d), (d, e), (e, b), (d, c), (d, h), (h, k), (e, i), (i, m), (m, q), (c, g), (i, j), (j, f), (m, l), (l, p), (l, o), (m, r), (r, n)}. a 18 b 5 2 c 4 d 1 e 15 f g 10 h 17 i 8 j k l 9 m n o p 16 q r The weight of the minimum spanning tree is w(t ) = = 97. Example Show that if the weights on the edges of a connected graph are distinct then the minimum spanning tree is unique. 29

30 First Proof. Let G be a connected graph whose weight function has distinct values on the edges. Suppose G has two distinct minimum spanning trees T 1 and T 2. Let e 1 be the minimum weight edge of T 1 among all edges not in T 2, and let e 2 be the minimum weight edge of T 2 among all edges not in T 1, i.e., w(e 1) = min{w(e 1 ) : e 1 E(T 1 T 2 )}, w(e 2) = min{w(e 2 ) : e 2 E(T 2 T 1 )}. Clearly, e 1 e 2. Then T 1 e 2 contains a unique cycle C 1 and e 2 C 1 ; T 2 e 1 contains a unique cycle C 2 and e 1 C 2. We have w(e 2) > w(e 1 ) for all e 1 T 1 C 1. Otherwise, T 1 = (T 1 e 1 ) e 2 would be a spanning tree having weight smaller than that of T 1, which is impossible. Now, if there exists an edge e 1 C 1 e 2 such that e 1 E(T 2 ), then e 1 E(T 1 T 2 ), thus w(e 1) < w(e 1 ) < w(e 2); likewise, if there exists an edge e 2 C 2 e 1 such that e 2 E(T 1 ), then w(e 2) < w(e 2 ) < w(e 1). We see that if both cases were valid, we would have the contradiction w(e 1) < w(e 2) < w(e 1). Therefore we must have either e 1 E(T 2 ) for all e 1 C 1 e 2, or, e 2 E(T 1 ) for all e 2 C 2 e 1. This means that either C 1 is contained in T 2, or C 2 is contained in T 1, contradicting to that none of T 1, T 2 contains a cycle. Second Proof. The theorem is true for the connected graph having no edges; the graph has to be a single vertex (the minimum weight is zero). Consider a connected graph G having at least one edge. Let e be the maximum weight edge of G. If e is on a cycle of G, then e cannot be on a MST, i.e., every MST of G is a MST of G e. By induction, the MST for G e is unique, so is for G. If e is not on a cycle, i.e., e is a bridge of G, then e must be on every MST T of G. Let G 1, G 2 be connected components of G e. Then T e = T 1 T 2, where T 1, T 2 are MSTs of G 1, G 2 respectively. The uniqueness of MST for G 1, G 2 implies the uniqueness of MST for G. Third Proof. Using the fact: (a) the edge of the minimum weight must be used, and it forms a forest F ; (b) the edge whose weight is minimum among all edges x, such that F x does not contain cycles, must be used. 30

31 12 Planar Graphs Definition A graph G is said to be planar if it can be drawn on a plane in such a way that no two edges cross each other. For instance, the complete graph K 4, the bipartite complete graph K 2,n, and the cubic graph Q 3 are planar. They can be drawn on a plane without crossing edges; see Figure 10. However, by try-and-error, it seems that the complete graph K 5 and the complete bipartite graph K 3,3 are not planar. We will prove this fact rigorously by using the Euler Formula in Theorem 4. (a) K 4 (b) Q 3 (c) K 2,5 Figure 10: Planar Graphs Planar graphs are important because in the design of circuits on a board we wish to have no routes crossing each other, or to keep the crossing routes as fewer as possible. Given a connected planar graph G and have it drawn on a plane without crossing edges; the plane is divided into some regions (or faces) of G; we denote by r(g) the number of such regions. Strictly speaking, r may depend on the ways of drawing G on the plane. Nevertheless, we will see that r(g) is actually independent of the ways of drawing G on any plane. The relation (a) K 5 (b) K 3,3 Figure 11: Nonplanar Graphs 31

32 (a) Octahedron (b) Dodecahedron (c) Icosahedron Figure 12: Regular Polyhedra between r(g) and the number of vertices and the number of edges of G are related by the well-known Euler formula in the following theorem. Theorem (Euler Formula) If G is a connected planar multigraph with v vertices, e edges, and r regions, then v e + r = 2. (4) Proof. We prove the statement by induction on the number of edges. When e = 0, the graph G must be a single vertex, and in this case the number of regions is one. Obviously, v e + r = 2. Assume that the theorem is true for all connected planar graphs with k edges. We consider a connected planar graph G with k + 1 edges. The graph G may or may not have cycles. If G has no cycles, then it is a tree. Thus e = v 1 and r = 1, so v e + r = 2. If G has a cycle C, choose an edge x on C and remove x from G to obtain a new planar graph G. Since x is on a cycle, G is still connected and has the same vertices of G, but has k edges. By the induction hypothesis we have v e + r = 2. Note that x bounds two regions, one inside C and the other one outside C. So v = v, e = e 1, r = r 1. It is clear that v e + r = 2. Planar graphs can be equivalently described as graphs drawn on a sphere without edges crossing each other. Note that the boundary of any polyhedron is homeomorphic to a sphere. Then the graph consists of the vertices and edges of a polyhedron is planar. The graphs for regular polyhedra are the first two graphs in Figure 10 and the three graphs in Figure

33 For a connected planar graph G drawn on the plane, let D 1, D 2,..., D r denote the regions of G, and let e(d i ) denote the number of edges on the boundary of D i. If one counts the edges along the boundary of each region of G, every edge of G is counted exactly twice. This means that r e(d i ) = 2e(G). (5) i=1 If G has no multiple edges and loops, then e(d i ) 3. We thus obtain 3r(G) 2e(G). Combine this inequality and the Euler formula (4); we have the corollary. Corollary If G is a connected, simple, planar graph with v vertices and e edges, then Example The complete graph K 5 is not planar. e 3v 6. (6) Proof. Notice that K 5 has 5 vertices and ( 5 2) (= 10) edges. Suppose K5 is planar. Then by Corollary 12.3, we have = 9, a contradiction. Example The complete bipartite graph K 3,3 is not planar. Proof. Note that every region of a graph bounds a cycle. Since K 3,3 is a bipartite graph, it has only cycles of even length. Since there is no cycles of length 2, every cycle of K 3,3 has length of at least 4. Suppose K 3,3 is a planar graph. Then every region of K 3,3 bounds at least 4 edges. By the equation (5), we have 4r 2e. Combine this inequality and the Euler formula (4); we obtain e 2v 4. Since K 3,3 has 6 vertices and 9 edges, we have the contradiction = 8. 33

34 Figure 13: Petersen Graph Example The Petersen graph is not planar. See Figure 13. Proof. Note that each cycle of the Petersen graph has at least 5 edges. So if it is planar, then 5r 2e. It follows from the Euler formula that 3e 5v 10. However, the graph has 10 vertices and 15 edges. Thus 45 = = 40, a contradiction. 13 Classification of Regular Polyhedra A polyhedron is said to be regular if all vertices have the same degree and all faces have the same number of edges. Regular polyhedra are also called Platonic solids. Theorem Let k be the number of edges of a regular polyhedron at a vertex, and l the number of edges bounding a face. Then (k, l) { (3, 3), (3, 4), (3, 5), (4, 3), (5, 3) } and (v, e, f) = (4, 6, 4), (8, 12, 6), (20, 30, 12). Proof. Note that k 3, l 3, kv = 2e = lf, v e + f = 2. Then e = kv/2, f = kv/l. Thus v kv 2 + kv l = 2, i.e., v = 4l 2k + 2l lk. For k = 3, we have v = 4l 6 l. There are three choices for l, i.e., l = 3, 4, 5. It follows that (v, e, f) = (4, 6, 4), (8, 12, 6), (20, 30, 12), respectively. For k = 4, we have v = (v, e, f) = (6, 12, 8). 4l 8 2l. There is only one choice, i.e., l = 3. Thus 34

35 4l 10 3l. There is only one choice, i.e., l = 3. We have For k = 5, we have v = (v, e, f) = (12, 30, 20). For k 6, we have v = 2k 3(k 2) = k + 6 0, since l 3. There is no choice for v. 4l 2k+2l kl. Note that 2k + 2l kl = 2k l(k 2) A spherical fullerene is a planar simple graph whose degree is three at every vertex and whose faces are only pentagons and hexagons. We shall see that every spherical fullerene has exactly 12 pentagons. Proposition If a simple planar graph has degree 3 at everywhere vertex and has only pentagons and hexagons, then the number of pentagons must be 12. Let f 5, f 6 denote the number of pentagons and hexagons of a fullerene respectively. Then the vertex-edge relation, the edge-face relation, and the Euler formula imply that We easily obtain 3v = 2e = 5f 5 + 6f 6, v e + f 5 + f 6 = 2. 5f 5 + 6f 5 = 3v, f 5 + f 6 = 2 + v/2. Since 6f 5 + 6f 6 = v, it forces that f 5 = 12. Thus v = f 6, e = f 6, f 5 = 12, f 6 0 (free). For each integer n 0, there exist crystal structures corresponding the the fullerene with f 6 = n. The buckyball (carbon sixty C 60, football or soccer) has a fullerene structure of f 6 = 20. The has buckyball an extra property that each pentagon is surrounded by 6 hexagons and each hexagon is surrounded by 3 pentagons and 3 hexagons. This extra condition leads to the relation 5f 5 = 3f Matching Let G = (V, E) be a bipartite graph, i.e., V = X Y, X Y = Ø, X Ø Y, and E(G) X Y. A matching of G is a subset of E(G) such that no two edges share a common vertex in X or Y. A matching is called complete if every vertex of X is an end vertex of an edges of the matching. 35

36 (a) Matching (b) Matching (c) Non-matching Figure 14: Matchings and non-matching Theorem Let R be the binary relation on from X to Y for the the bipartite graph G = (V, E) with V = X Y. Then G has a complete matching if and only if for any A X, A R(A). Proof. Let X = {x 1, x 2,..., x m } and Y = {y 1, y 2,..., y n }. We construct a network N = (V, A) as follows: c(s, x i ) = 1; c(y j, t) = 1; c(x i, y j ) = M for (x i, y j ) E where M is an integer larger than X. Note that G has a complete matching N has a maximal flow that uses all edges (s, x i ), 1 i m. 36

37 Final Exam Review Boolean Algebra definition and examples How to write a given Boolean function as a Boolean expression Logic gates and networks Karnaugh maps for simplifying Boolean expressions Minimum spanning tree (MST) Kruskal s algorithm and Prim s algorithm for MST Distinct weights imply the uniqueness of MST (proof of the fact) Planar and non-planar graphs Euler formula and Platonic polyhedra (five type such polyhedron graph) Relation between the number of vertices and the number of edges Relation between the number of edges and the number of faces (or regions) Estimation using the length of cycles for non-planarity Football graph and the planar graphs with only pentagons and hexagons Depth first search for spanning tree Breadth first search for spanning tree Characterizations of trees Tree formula and forest formula Eulerian tour and Eulerian path Fleury s algorithm for finding an Eulerian tour or Eulerian path. Hamilton tour and path Degree-sum condition theorem and its generalization Characterization of bipartite graphs Quotient graphs Permutations and combinations Combination with repetition Permutations of a multiset Binomial and multinomial coefficients and theorems Inclusion-exclusion principle Pigeonhole principle Linear recurrence relation Characteristic equation General solutions with distinct roots, and with equal roots 37

38 Divide and conquer method x n = axn 2 + b. Application of recurrence relations Transitive closure of binary relation, Warshall s algorithm Equivalence relation Mathematical induction Propositional logic Modular integers Finding all integer solutions for equation like ax + by = c for integers a, b, c. Solving equation ax = b modulo n (x = bu/d + kn/d with k Z, where d = au + bv = gcd(a, b)). 38

Elements of Graph Theory

Elements of Graph Theory Elements of Graph Theory Quick review of Chapters 9.1 9.5, 9.7 (studied in Mt1348/2008) = all basic concepts must be known New topics we will mostly skip shortest paths (Chapter 9.6), as that was covered

More information

Discrete mathematics II. - Graphs

Discrete mathematics II. - Graphs Emil Vatai April 25, 2018 Basic definitions Definition of an undirected graph Definition (Undirected graph) An undirected graph or (just) a graph is a triplet G = (ϕ, E, V ), where V is the set of vertices,

More information

v V Question: How many edges are there in a graph with 10 vertices each of degree 6?

v V Question: How many edges are there in a graph with 10 vertices each of degree 6? ECS20 Handout Graphs and Trees March 4, 2015 (updated 3/9) Notion of a graph 1. A graph G = (V,E) consists of V, a nonempty set of vertices (or nodes) and E, a set of pairs of elements of V called edges.

More information

Adjacent: Two distinct vertices u, v are adjacent if there is an edge with ends u, v. In this case we let uv denote such an edge.

Adjacent: Two distinct vertices u, v are adjacent if there is an edge with ends u, v. In this case we let uv denote such an edge. 1 Graph Basics What is a graph? Graph: a graph G consists of a set of vertices, denoted V (G), a set of edges, denoted E(G), and a relation called incidence so that each edge is incident with either one

More information

Basic Combinatorics. Math 40210, Section 01 Fall Homework 4 Solutions

Basic Combinatorics. Math 40210, Section 01 Fall Homework 4 Solutions Basic Combinatorics Math 40210, Section 01 Fall 2012 Homework 4 Solutions 1.4.2 2: One possible implementation: Start with abcgfjiea From edge cd build, using previously unmarked edges: cdhlponminjkghc

More information

Basics of Graph Theory

Basics of Graph Theory Basics of Graph Theory 1 Basic notions A simple graph G = (V, E) consists of V, a nonempty set of vertices, and E, a set of unordered pairs of distinct elements of V called edges. Simple graphs have their

More information

INTRODUCTION TO GRAPH THEORY. 1. Definitions

INTRODUCTION TO GRAPH THEORY. 1. Definitions INTRODUCTION TO GRAPH THEORY D. JAKOBSON 1. Definitions A graph G consists of vertices {v 1, v 2,..., v n } and edges {e 1, e 2,..., e m } connecting pairs of vertices. An edge e = (uv) is incident with

More information

Graph and Digraph Glossary

Graph and Digraph Glossary 1 of 15 31.1.2004 14:45 Graph and Digraph Glossary A B C D E F G H I-J K L M N O P-Q R S T U V W-Z Acyclic Graph A graph is acyclic if it contains no cycles. Adjacency Matrix A 0-1 square matrix whose

More information

Assignment 4 Solutions of graph problems

Assignment 4 Solutions of graph problems Assignment 4 Solutions of graph problems 1. Let us assume that G is not a cycle. Consider the maximal path in the graph. Let the end points of the path be denoted as v 1, v k respectively. If either of

More information

Fundamental Properties of Graphs

Fundamental Properties of Graphs Chapter three In many real-life situations we need to know how robust a graph that represents a certain network is, how edges or vertices can be removed without completely destroying the overall connectivity,

More information

Graph Theory S 1 I 2 I 1 S 2 I 1 I 2

Graph Theory S 1 I 2 I 1 S 2 I 1 I 2 Graph Theory S I I S S I I S Graphs Definition A graph G is a pair consisting of a vertex set V (G), and an edge set E(G) ( ) V (G). x and y are the endpoints of edge e = {x, y}. They are called adjacent

More information

CMSC Honors Discrete Mathematics

CMSC Honors Discrete Mathematics CMSC 27130 Honors Discrete Mathematics Lectures by Alexander Razborov Notes by Justin Lubin The University of Chicago, Autumn 2017 1 Contents I Number Theory 4 1 The Euclidean Algorithm 4 2 Mathematical

More information

Definition For vertices u, v V (G), the distance from u to v, denoted d(u, v), in G is the length of a shortest u, v-path. 1

Definition For vertices u, v V (G), the distance from u to v, denoted d(u, v), in G is the length of a shortest u, v-path. 1 Graph fundamentals Bipartite graph characterization Lemma. If a graph contains an odd closed walk, then it contains an odd cycle. Proof strategy: Consider a shortest closed odd walk W. If W is not a cycle,

More information

Part II. Graph Theory. Year

Part II. Graph Theory. Year Part II Year 2017 2016 2015 2014 2013 2012 2011 2010 2009 2008 2007 2006 2005 2017 53 Paper 3, Section II 15H Define the Ramsey numbers R(s, t) for integers s, t 2. Show that R(s, t) exists for all s,

More information

Chapter 11: Graphs and Trees. March 23, 2008

Chapter 11: Graphs and Trees. March 23, 2008 Chapter 11: Graphs and Trees March 23, 2008 Outline 1 11.1 Graphs: An Introduction 2 11.2 Paths and Circuits 3 11.3 Matrix Representations of Graphs 4 11.5 Trees Graphs: Basic Definitions Informally, a

More information

MATH 363 Final Wednesday, April 28. Final exam. You may use lemmas and theorems that were proven in class and on assignments unless stated otherwise.

MATH 363 Final Wednesday, April 28. Final exam. You may use lemmas and theorems that were proven in class and on assignments unless stated otherwise. Final exam This is a closed book exam. No calculators are allowed. Unless stated otherwise, justify all your steps. You may use lemmas and theorems that were proven in class and on assignments unless stated

More information

Exercise set 2 Solutions

Exercise set 2 Solutions Exercise set 2 Solutions Let H and H be the two components of T e and let F E(T ) consist of the edges of T with one endpoint in V (H), the other in V (H ) Since T is connected, F Furthermore, since T

More information

Assignments are handed in on Tuesdays in even weeks. Deadlines are:

Assignments are handed in on Tuesdays in even weeks. Deadlines are: Tutorials at 2 3, 3 4 and 4 5 in M413b, on Tuesdays, in odd weeks. i.e. on the following dates. Tuesday the 28th January, 11th February, 25th February, 11th March, 25th March, 6th May. Assignments are

More information

Varying Applications (examples)

Varying Applications (examples) Graph Theory Varying Applications (examples) Computer networks Distinguish between two chemical compounds with the same molecular formula but different structures Solve shortest path problems between cities

More information

WUCT121. Discrete Mathematics. Graphs

WUCT121. Discrete Mathematics. Graphs WUCT121 Discrete Mathematics Graphs WUCT121 Graphs 1 Section 1. Graphs 1.1. Introduction Graphs are used in many fields that require analysis of routes between locations. These areas include communications,

More information

r=1 The Binomial Theorem. 4 MA095/98G Revision

r=1 The Binomial Theorem. 4 MA095/98G Revision Revision Read through the whole course once Make summary sheets of important definitions and results, you can use the following pages as a start and fill in more yourself Do all assignments again Do the

More information

Introduction III. Graphs. Motivations I. Introduction IV

Introduction III. Graphs. Motivations I. Introduction IV Introduction I Graphs Computer Science & Engineering 235: Discrete Mathematics Christopher M. Bourke cbourke@cse.unl.edu Graph theory was introduced in the 18th century by Leonhard Euler via the Königsberg

More information

γ(ɛ) (a, b) (a, d) (d, a) (a, b) (c, d) (d, d) (e, e) (e, a) (e, e) (a) Draw a picture of G.

γ(ɛ) (a, b) (a, d) (d, a) (a, b) (c, d) (d, d) (e, e) (e, a) (e, e) (a) Draw a picture of G. MAD 3105 Spring 2006 Solutions for Review for Test 2 1. Define a graph G with V (G) = {a, b, c, d, e}, E(G) = {r, s, t, u, v, w, x, y, z} and γ, the function defining the edges, is given by the table ɛ

More information

GRAPHS, GRAPH MODELS, GRAPH TERMINOLOGY, AND SPECIAL TYPES OF GRAPHS

GRAPHS, GRAPH MODELS, GRAPH TERMINOLOGY, AND SPECIAL TYPES OF GRAPHS GRAPHS, GRAPH MODELS, GRAPH TERMINOLOGY, AND SPECIAL TYPES OF GRAPHS DR. ANDREW SCHWARTZ, PH.D. 10.1 Graphs and Graph Models (1) A graph G = (V, E) consists of V, a nonempty set of vertices (or nodes)

More information

CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS

CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS 1 UNIT I INTRODUCTION CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS 1. Define Graph. A graph G = (V, E) consists

More information

Chapter 3 Trees. Theorem A graph T is a tree if, and only if, every two distinct vertices of T are joined by a unique path.

Chapter 3 Trees. Theorem A graph T is a tree if, and only if, every two distinct vertices of T are joined by a unique path. Chapter 3 Trees Section 3. Fundamental Properties of Trees Suppose your city is planning to construct a rapid rail system. They want to construct the most economical system possible that will meet the

More information

Hamilton paths & circuits. Gray codes. Hamilton Circuits. Planar Graphs. Hamilton circuits. 10 Nov 2015

Hamilton paths & circuits. Gray codes. Hamilton Circuits. Planar Graphs. Hamilton circuits. 10 Nov 2015 Hamilton paths & circuits Def. A path in a multigraph is a Hamilton path if it visits each vertex exactly once. Def. A circuit that is a Hamilton path is called a Hamilton circuit. Hamilton circuits Constructing

More information

A graph is finite if its vertex set and edge set are finite. We call a graph with just one vertex trivial and all other graphs nontrivial.

A graph is finite if its vertex set and edge set are finite. We call a graph with just one vertex trivial and all other graphs nontrivial. 2301-670 Graph theory 1.1 What is a graph? 1 st semester 2550 1 1.1. What is a graph? 1.1.2. Definition. A graph G is a triple (V(G), E(G), ψ G ) consisting of V(G) of vertices, a set E(G), disjoint from

More information

Symmetric Product Graphs

Symmetric Product Graphs Rochester Institute of Technology RIT Scholar Works Theses Thesis/Dissertation Collections 5-20-2015 Symmetric Product Graphs Evan Witz Follow this and additional works at: http://scholarworks.rit.edu/theses

More information

2. CONNECTIVITY Connectivity

2. CONNECTIVITY Connectivity 2. CONNECTIVITY 70 2. Connectivity 2.1. Connectivity. Definition 2.1.1. (1) A path in a graph G = (V, E) is a sequence of vertices v 0, v 1, v 2,..., v n such that {v i 1, v i } is an edge of G for i =

More information

Brief History. Graph Theory. What is a graph? Types of graphs Directed graph: a graph that has edges with specific directions

Brief History. Graph Theory. What is a graph? Types of graphs Directed graph: a graph that has edges with specific directions Brief History Graph Theory What is a graph? It all began in 1736 when Leonhard Euler gave a proof that not all seven bridges over the Pregolya River could all be walked over once and end up where you started.

More information

Rigidity, connectivity and graph decompositions

Rigidity, connectivity and graph decompositions First Prev Next Last Rigidity, connectivity and graph decompositions Brigitte Servatius Herman Servatius Worcester Polytechnic Institute Page 1 of 100 First Prev Next Last Page 2 of 100 We say that a framework

More information

Modules. 6 Hamilton Graphs (4-8 lectures) Introduction Necessary conditions and sufficient conditions Exercises...

Modules. 6 Hamilton Graphs (4-8 lectures) Introduction Necessary conditions and sufficient conditions Exercises... Modules 6 Hamilton Graphs (4-8 lectures) 135 6.1 Introduction................................ 136 6.2 Necessary conditions and sufficient conditions............. 137 Exercises..................................

More information

5 Graphs

5 Graphs 5 Graphs jacques@ucsd.edu Some of the putnam problems are to do with graphs. They do not assume more than a basic familiarity with the definitions and terminology of graph theory. 5.1 Basic definitions

More information

Trees Rooted Trees Spanning trees and Shortest Paths. 12. Graphs and Trees 2. Aaron Tan November 2017

Trees Rooted Trees Spanning trees and Shortest Paths. 12. Graphs and Trees 2. Aaron Tan November 2017 12. Graphs and Trees 2 Aaron Tan 6 10 November 2017 1 10.5 Trees 2 Definition Definition Definition: Tree A graph is said to be circuit-free if, and only if, it has no circuits. A graph is called a tree

More information

Math 170- Graph Theory Notes

Math 170- Graph Theory Notes 1 Math 170- Graph Theory Notes Michael Levet December 3, 2018 Notation: Let n be a positive integer. Denote [n] to be the set {1, 2,..., n}. So for example, [3] = {1, 2, 3}. To quote Bud Brown, Graph theory

More information

Math Summer 2012

Math Summer 2012 Math 481 - Summer 2012 Final Exam You have one hour and fifty minutes to complete this exam. You are not allowed to use any electronic device. Be sure to give reasonable justification to all your answers.

More information

Discrete mathematics , Fall Instructor: prof. János Pach

Discrete mathematics , Fall Instructor: prof. János Pach Discrete mathematics 2016-2017, Fall Instructor: prof. János Pach - covered material - Lecture 1. Counting problems To read: [Lov]: 1.2. Sets, 1.3. Number of subsets, 1.5. Sequences, 1.6. Permutations,

More information

Definition: A graph G = (V, E) is called a tree if G is connected and acyclic. The following theorem captures many important facts about trees.

Definition: A graph G = (V, E) is called a tree if G is connected and acyclic. The following theorem captures many important facts about trees. Tree 1. Trees and their Properties. Spanning trees 3. Minimum Spanning Trees 4. Applications of Minimum Spanning Trees 5. Minimum Spanning Tree Algorithms 1.1 Properties of Trees: Definition: A graph G

More information

Chapter 2 Graphs. 2.1 Definition of Graphs

Chapter 2 Graphs. 2.1 Definition of Graphs Chapter 2 Graphs Abstract Graphs are discrete structures that consist of vertices and edges connecting some of these vertices. Graphs have many applications in Mathematics, Computer Science, Engineering,

More information

Trees. 3. (Minimally Connected) G is connected and deleting any of its edges gives rise to a disconnected graph.

Trees. 3. (Minimally Connected) G is connected and deleting any of its edges gives rise to a disconnected graph. Trees 1 Introduction Trees are very special kind of (undirected) graphs. Formally speaking, a tree is a connected graph that is acyclic. 1 This definition has some drawbacks: given a graph it is not trivial

More information

1. a graph G = (V (G), E(G)) consists of a set V (G) of vertices, and a set E(G) of edges (edges are pairs of elements of V (G))

1. a graph G = (V (G), E(G)) consists of a set V (G) of vertices, and a set E(G) of edges (edges are pairs of elements of V (G)) 10 Graphs 10.1 Graphs and Graph Models 1. a graph G = (V (G), E(G)) consists of a set V (G) of vertices, and a set E(G) of edges (edges are pairs of elements of V (G)) 2. an edge is present, say e = {u,

More information

Graph Theory. Part of Texas Counties.

Graph Theory. Part of Texas Counties. Graph Theory Part of Texas Counties. We would like to visit each of the above counties, crossing each county only once, starting from Harris county. Is this possible? This problem can be modeled as a graph.

More information

Graphs and trees come up everywhere. We can view the internet as a graph (in many ways) Web search views web pages as a graph

Graphs and trees come up everywhere. We can view the internet as a graph (in many ways) Web search views web pages as a graph Graphs and Trees Graphs and trees come up everywhere. We can view the internet as a graph (in many ways) who is connected to whom Web search views web pages as a graph Who points to whom Niche graphs (Ecology):

More information

8.2 Paths and Cycles

8.2 Paths and Cycles 8.2 Paths and Cycles Degree a b c d e f Definition The degree of a vertex is the number of edges incident to it. A loop contributes 2 to the degree of the vertex. (G) is the maximum degree of G. δ(g) is

More information

TWO CONTRIBUTIONS OF EULER

TWO CONTRIBUTIONS OF EULER TWO CONTRIBUTIONS OF EULER SIEMION FAJTLOWICZ. MATH 4315 Eulerian Tours. Although some mathematical problems which now can be thought of as graph-theoretical, go back to the times of Euclid, the invention

More information

Chapter 3: Paths and Cycles

Chapter 3: Paths and Cycles Chapter 3: Paths and Cycles 5 Connectivity 1. Definitions: Walk: finite sequence of edges in which any two consecutive edges are adjacent or identical. (Initial vertex, Final vertex, length) Trail: walk

More information

CHAPTER 2. Graphs. 1. Introduction to Graphs and Graph Isomorphism

CHAPTER 2. Graphs. 1. Introduction to Graphs and Graph Isomorphism CHAPTER 2 Graphs 1. Introduction to Graphs and Graph Isomorphism 1.1. The Graph Menagerie. Definition 1.1.1. A simple graph G = (V, E) consists of a set V of vertices and a set E of edges, represented

More information

Matching and Planarity

Matching and Planarity Matching and Planarity Po-Shen Loh June 010 1 Warm-up 1. (Bondy 1.5.9.) There are n points in the plane such that every pair of points has distance 1. Show that there are at most n (unordered) pairs of

More information

NANYANG TECHNOLOGICAL UNIVERSITY SEMESTER II EXAMINATION MH 1301 DISCRETE MATHEMATICS TIME ALLOWED: 2 HOURS

NANYANG TECHNOLOGICAL UNIVERSITY SEMESTER II EXAMINATION MH 1301 DISCRETE MATHEMATICS TIME ALLOWED: 2 HOURS NANYANG TECHNOLOGICAL UNIVERSITY SEMESTER II EXAMINATION 2015-2016 MH 1301 DISCRETE MATHEMATICS May 2016 TIME ALLOWED: 2 HOURS INSTRUCTIONS TO CANDIDATES 1. This examination paper contains FIVE (5) questions

More information

March 20/2003 Jayakanth Srinivasan,

March 20/2003 Jayakanth Srinivasan, Definition : A simple graph G = (V, E) consists of V, a nonempty set of vertices, and E, a set of unordered pairs of distinct elements of V called edges. Definition : In a multigraph G = (V, E) two or

More information

11.9 Connectivity Connected Components. mcs 2015/5/18 1:43 page 419 #427

11.9 Connectivity Connected Components. mcs 2015/5/18 1:43 page 419 #427 mcs 2015/5/18 1:43 page 419 #427 11.9 Connectivity Definition 11.9.1. Two vertices are connected in a graph when there is a path that begins at one and ends at the other. By convention, every vertex is

More information

7.1 Introduction. A (free) tree T is A simple graph such that for every pair of vertices v and w there is a unique path from v to w

7.1 Introduction. A (free) tree T is A simple graph such that for every pair of vertices v and w there is a unique path from v to w Chapter 7 Trees 7.1 Introduction A (free) tree T is A simple graph such that for every pair of vertices v and w there is a unique path from v to w Tree Terminology Parent Ancestor Child Descendant Siblings

More information

Chapter 12 and 11.1 Planar graphs, regular polyhedra, and graph colorings

Chapter 12 and 11.1 Planar graphs, regular polyhedra, and graph colorings Chapter 12 and 11.1 Planar graphs, regular polyhedra, and graph colorings Prof. Tesler Math 184A Fall 2017 Prof. Tesler Ch. 12: Planar Graphs Math 184A / Fall 2017 1 / 45 12.1 12.2. Planar graphs Definition

More information

Number Theory and Graph Theory

Number Theory and Graph Theory 1 Number Theory and Graph Theory Chapter 6 Basic concepts and definitions of graph theory By A. Satyanarayana Reddy Department of Mathematics Shiv Nadar University Uttar Pradesh, India E-mail: satya8118@gmail.com

More information

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics. An Introduction to Graph Theory

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics. An Introduction to Graph Theory SCHOOL OF ENGINEERING & BUILT ENVIRONMENT Mathematics An Introduction to Graph Theory. Introduction. Definitions.. Vertices and Edges... The Handshaking Lemma.. Connected Graphs... Cut-Points and Bridges.

More information

Introduction to Graph Theory

Introduction to Graph Theory Introduction to Graph Theory Tandy Warnow January 20, 2017 Graphs Tandy Warnow Graphs A graph G = (V, E) is an object that contains a vertex set V and an edge set E. We also write V (G) to denote the vertex

More information

Reference Sheet for CO142.2 Discrete Mathematics II

Reference Sheet for CO142.2 Discrete Mathematics II Reference Sheet for CO14. Discrete Mathematics II Spring 017 1 Graphs Defintions 1. Graph: set of N nodes and A arcs such that each a A is associated with an unordered pair of nodes.. Simple graph: no

More information

1 Digraphs. Definition 1

1 Digraphs. Definition 1 1 Digraphs Definition 1 Adigraphordirected graphgisatriplecomprisedofavertex set V(G), edge set E(G), and a function assigning each edge an ordered pair of vertices (tail, head); these vertices together

More information

Notation Index. Probability notation. (there exists) (such that) Fn-4 B n (Bell numbers) CL-27 s t (equivalence relation) GT-5.

Notation Index. Probability notation. (there exists) (such that) Fn-4 B n (Bell numbers) CL-27 s t (equivalence relation) GT-5. Notation Index (there exists) (for all) Fn-4 Fn-4 (such that) Fn-4 B n (Bell numbers) CL-27 s t (equivalence relation) GT-5 ( n ) k (binomial coefficient) CL-15 ( n m 1,m 2,...) (multinomial coefficient)

More information

4. (a) Draw the Petersen graph. (b) Use Kuratowski s teorem to prove that the Petersen graph is non-planar.

4. (a) Draw the Petersen graph. (b) Use Kuratowski s teorem to prove that the Petersen graph is non-planar. UPPSALA UNIVERSITET Matematiska institutionen Anders Johansson Graph Theory Frist, KandMa, IT 010 10 1 Problem sheet 4 Exam questions Solve a subset of, say, four questions to the problem session on friday.

More information

Module 11. Directed Graphs. Contents

Module 11. Directed Graphs. Contents Module 11 Directed Graphs Contents 11.1 Basic concepts......................... 256 Underlying graph of a digraph................ 257 Out-degrees and in-degrees.................. 258 Isomorphism..........................

More information

K 4,4 e Has No Finite Planar Cover

K 4,4 e Has No Finite Planar Cover K 4,4 e Has No Finite Planar Cover Petr Hliněný Dept. of Applied Mathematics, Charles University, Malostr. nám. 25, 118 00 Praha 1, Czech republic (E-mail: hlineny@kam.ms.mff.cuni.cz) February 9, 2005

More information

CS473-Algorithms I. Lecture 13-A. Graphs. Cevdet Aykanat - Bilkent University Computer Engineering Department

CS473-Algorithms I. Lecture 13-A. Graphs. Cevdet Aykanat - Bilkent University Computer Engineering Department CS473-Algorithms I Lecture 3-A Graphs Graphs A directed graph (or digraph) G is a pair (V, E), where V is a finite set, and E is a binary relation on V The set V: Vertex set of G The set E: Edge set of

More information

Lecture 5: Graphs. Rajat Mittal. IIT Kanpur

Lecture 5: Graphs. Rajat Mittal. IIT Kanpur Lecture : Graphs Rajat Mittal IIT Kanpur Combinatorial graphs provide a natural way to model connections between different objects. They are very useful in depicting communication networks, social networks

More information

DS UNIT 4. Matoshri College of Engineering and Research Center Nasik Department of Computer Engineering Discrete Structutre UNIT - IV

DS UNIT 4. Matoshri College of Engineering and Research Center Nasik Department of Computer Engineering Discrete Structutre UNIT - IV Sr.No. Question Option A Option B Option C Option D 1 2 3 4 5 6 Class : S.E.Comp Which one of the following is the example of non linear data structure Let A be an adjacency matrix of a graph G. The ij

More information

Section Summary. Introduction to Trees Rooted Trees Trees as Models Properties of Trees

Section Summary. Introduction to Trees Rooted Trees Trees as Models Properties of Trees Chapter 11 Copyright McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. Chapter Summary Introduction to Trees Applications

More information

Characterizing Graphs (3) Characterizing Graphs (1) Characterizing Graphs (2) Characterizing Graphs (4)

Characterizing Graphs (3) Characterizing Graphs (1) Characterizing Graphs (2) Characterizing Graphs (4) S-72.2420/T-79.5203 Basic Concepts 1 S-72.2420/T-79.5203 Basic Concepts 3 Characterizing Graphs (1) Characterizing Graphs (3) Characterizing a class G by a condition P means proving the equivalence G G

More information

Planarity. 1 Introduction. 2 Topological Results

Planarity. 1 Introduction. 2 Topological Results Planarity 1 Introduction A notion of drawing a graph in the plane has led to some of the most deep results in graph theory. Vaguely speaking by a drawing or embedding of a graph G in the plane we mean

More information

Chapter 4. Relations & Graphs. 4.1 Relations. Exercises For each of the relations specified below:

Chapter 4. Relations & Graphs. 4.1 Relations. Exercises For each of the relations specified below: Chapter 4 Relations & Graphs 4.1 Relations Definition: Let A and B be sets. A relation from A to B is a subset of A B. When we have a relation from A to A we often call it a relation on A. When we have

More information

MATH 139 W12 Review 1 Checklist 1. Exam Checklist. 1. Introduction to Predicates and Quantified Statements (chapters ).

MATH 139 W12 Review 1 Checklist 1. Exam Checklist. 1. Introduction to Predicates and Quantified Statements (chapters ). MATH 139 W12 Review 1 Checklist 1 Exam Checklist 1. Introduction to Predicates and Quantified Statements (chapters 3.1-3.4). universal and existential statements truth set negations of universal and existential

More information

Topic 10 Part 2 [474 marks]

Topic 10 Part 2 [474 marks] Topic Part 2 [474 marks] The complete graph H has the following cost adjacency matrix Consider the travelling salesman problem for H a By first finding a minimum spanning tree on the subgraph of H formed

More information

Jordan Curves. A curve is a subset of IR 2 of the form

Jordan Curves. A curve is a subset of IR 2 of the form Jordan Curves A curve is a subset of IR 2 of the form α = {γ(x) : x [0, 1]}, where γ : [0, 1] IR 2 is a continuous mapping from the closed interval [0, 1] to the plane. γ(0) and γ(1) are called the endpoints

More information

A generalization of Mader s theorem

A generalization of Mader s theorem A generalization of Mader s theorem Ajit A. Diwan Department of Computer Science and Engineering Indian Institute of Technology, Bombay Mumbai, 4000076, India. email: aad@cse.iitb.ac.in 18 June 2007 Abstract

More information

Pebble Sets in Convex Polygons

Pebble Sets in Convex Polygons 2 1 Pebble Sets in Convex Polygons Kevin Iga, Randall Maddox June 15, 2005 Abstract Lukács and András posed the problem of showing the existence of a set of n 2 points in the interior of a convex n-gon

More information

MC 302 GRAPH THEORY 10/1/13 Solutions to HW #2 50 points + 6 XC points

MC 302 GRAPH THEORY 10/1/13 Solutions to HW #2 50 points + 6 XC points MC 0 GRAPH THEORY 0// Solutions to HW # 0 points + XC points ) [CH] p.,..7. This problem introduces an important class of graphs called the hypercubes or k-cubes, Q, Q, Q, etc. I suggest that before you

More information

Matching Theory. Figure 1: Is this graph bipartite?

Matching Theory. Figure 1: Is this graph bipartite? Matching Theory 1 Introduction A matching M of a graph is a subset of E such that no two edges in M share a vertex; edges which have this property are called independent edges. A matching M is said to

More information

DO NOT RE-DISTRIBUTE THIS SOLUTION FILE

DO NOT RE-DISTRIBUTE THIS SOLUTION FILE Professor Kindred Math 104, Graph Theory Homework 3 Solutions February 14, 2013 Introduction to Graph Theory, West Section 2.1: 37, 62 Section 2.2: 6, 7, 15 Section 2.3: 7, 10, 14 DO NOT RE-DISTRIBUTE

More information

On the Relationships between Zero Forcing Numbers and Certain Graph Coverings

On the Relationships between Zero Forcing Numbers and Certain Graph Coverings On the Relationships between Zero Forcing Numbers and Certain Graph Coverings Fatemeh Alinaghipour Taklimi, Shaun Fallat 1,, Karen Meagher 2 Department of Mathematics and Statistics, University of Regina,

More information

Graphs. Pseudograph: multiple edges and loops allowed

Graphs. Pseudograph: multiple edges and loops allowed Graphs G = (V, E) V - set of vertices, E - set of edges Undirected graphs Simple graph: V - nonempty set of vertices, E - set of unordered pairs of distinct vertices (no multiple edges or loops) Multigraph:

More information

Algorithms: Graphs. Amotz Bar-Noy. Spring 2012 CUNY. Amotz Bar-Noy (CUNY) Graphs Spring / 95

Algorithms: Graphs. Amotz Bar-Noy. Spring 2012 CUNY. Amotz Bar-Noy (CUNY) Graphs Spring / 95 Algorithms: Graphs Amotz Bar-Noy CUNY Spring 2012 Amotz Bar-Noy (CUNY) Graphs Spring 2012 1 / 95 Graphs Definition: A graph is a collection of edges and vertices. Each edge connects two vertices. Amotz

More information

v 1 v 2 r 3 r 4 v 3 v 4 Figure A plane embedding of K 4.

v 1 v 2 r 3 r 4 v 3 v 4 Figure A plane embedding of K 4. Chapter 6 Planarity Section 6.1 Euler s Formula In Chapter 1 we introduced the puzzle of the three houses and the three utilities. The problem was to determine if we could connect each of the three utilities

More information

Graph Theory CS/Math231 Discrete Mathematics Spring2015

Graph Theory CS/Math231 Discrete Mathematics Spring2015 1 Graphs Definition 1 A directed graph (or digraph) G is a pair (V, E), where V is a finite set and E is a binary relation on V. The set V is called the vertex set of G, and its elements are called vertices

More information

Discharging and reducible configurations

Discharging and reducible configurations Discharging and reducible configurations Zdeněk Dvořák March 24, 2018 Suppose we want to show that graphs from some hereditary class G are k- colorable. Clearly, we can restrict our attention to graphs

More information

UNDIRECTED GRAPH: a set of vertices and a set of undirected edges each of which is associated with a set of one or two of these vertices.

UNDIRECTED GRAPH: a set of vertices and a set of undirected edges each of which is associated with a set of one or two of these vertices. Graphs 1 Graph: A graph G = (V, E) consists of a nonempty set of vertices (or nodes) V and a set of edges E. Each edge has either one or two vertices associated with it, called its endpoints. An edge is

More information

Graph Connectivity G G G

Graph Connectivity G G G Graph Connectivity 1 Introduction We have seen that trees are minimally connected graphs, i.e., deleting any edge of the tree gives us a disconnected graph. What makes trees so susceptible to edge deletions?

More information

Key Graph Theory Theorems

Key Graph Theory Theorems Key Graph Theory Theorems Rajesh Kumar MATH 239 Intro to Combinatorics August 19, 2008 3.3 Binary Trees 3.3.1 Problem (p.82) Determine the number, t n, of binary trees with n edges. The number of binary

More information

Algorithms. Graphs. Algorithms

Algorithms. Graphs. Algorithms Algorithms Graphs Algorithms Graphs Definition: A graph is a collection of edges and vertices. Each edge connects two vertices. Algorithms 1 Graphs Vertices: Nodes, points, computers, users, items,...

More information

Treewidth and graph minors

Treewidth and graph minors Treewidth and graph minors Lectures 9 and 10, December 29, 2011, January 5, 2012 We shall touch upon the theory of Graph Minors by Robertson and Seymour. This theory gives a very general condition under

More information

CS 311 Discrete Math for Computer Science Dr. William C. Bulko. Graphs

CS 311 Discrete Math for Computer Science Dr. William C. Bulko. Graphs CS 311 Discrete Math for Computer Science Dr. William C. Bulko Graphs 2014 Definitions Definition: A graph G = (V,E) consists of a nonempty set V of vertices (or nodes) and a set E of edges. Each edge

More information

Combinatorics Summary Sheet for Exam 1 Material 2019

Combinatorics Summary Sheet for Exam 1 Material 2019 Combinatorics Summary Sheet for Exam 1 Material 2019 1 Graphs Graph An ordered three-tuple (V, E, F ) where V is a set representing the vertices, E is a set representing the edges, and F is a function

More information

Simple graph Complete graph K 7. Non- connected graph

Simple graph Complete graph K 7. Non- connected graph A graph G consists of a pair (V; E), where V is the set of vertices and E the set of edges. We write V (G) for the vertices of G and E(G) for the edges of G. If no two edges have the same endpoints we

More information

Answers to specimen paper questions. Most of the answers below go into rather more detail than is really needed. Please let me know of any mistakes.

Answers to specimen paper questions. Most of the answers below go into rather more detail than is really needed. Please let me know of any mistakes. Answers to specimen paper questions Most of the answers below go into rather more detail than is really needed. Please let me know of any mistakes. Question 1. (a) The degree of a vertex x is the number

More information

8 Colouring Planar Graphs

8 Colouring Planar Graphs 8 Colouring Planar Graphs The Four Colour Theorem Lemma 8.1 If G is a simple planar graph, then (i) 12 v V (G)(6 deg(v)) with equality for triangulations. (ii) G has a vertex of degree 5. Proof: For (i),

More information

The University of Sydney MATH2969/2069. Graph Theory Tutorial 2 (Week 9) 2008

The University of Sydney MATH2969/2069. Graph Theory Tutorial 2 (Week 9) 2008 The University of Sydney MATH99/09 Graph Theory Tutorial (Week 9) 00. Show that the graph on the left is Hamiltonian, but that the other two are not. To show that the graph is Hamiltonian, simply find

More information

Lecture 20 : Trees DRAFT

Lecture 20 : Trees DRAFT CS/Math 240: Introduction to Discrete Mathematics 4/12/2011 Lecture 20 : Trees Instructor: Dieter van Melkebeek Scribe: Dalibor Zelený DRAFT Last time we discussed graphs. Today we continue this discussion,

More information

K 4 C 5. Figure 4.5: Some well known family of graphs

K 4 C 5. Figure 4.5: Some well known family of graphs 08 CHAPTER. TOPICS IN CLASSICAL GRAPH THEORY K, K K K, K K, K K, K C C C C 6 6 P P P P P. Graph Operations Figure.: Some well known family of graphs A graph Y = (V,E ) is said to be a subgraph of a graph

More information

CMSC 380. Graph Terminology and Representation

CMSC 380. Graph Terminology and Representation CMSC 380 Graph Terminology and Representation GRAPH BASICS 2 Basic Graph Definitions n A graph G = (V,E) consists of a finite set of vertices, V, and a finite set of edges, E. n Each edge is a pair (v,w)

More information

BIL694-Lecture 1: Introduction to Graphs

BIL694-Lecture 1: Introduction to Graphs BIL694-Lecture 1: Introduction to Graphs Lecturer: Lale Özkahya Resources for the presentation: http://www.math.ucsd.edu/ gptesler/184a/calendar.html http://www.inf.ed.ac.uk/teaching/courses/dmmr/ Outline

More information

Graph Theory. 1 Introduction to Graphs. Martin Stynes Department of Mathematics, UCC January 26, 2011

Graph Theory. 1 Introduction to Graphs. Martin Stynes Department of Mathematics, UCC   January 26, 2011 Graph Theory Martin Stynes Department of Mathematics, UCC email: m.stynes@ucc.ie January 26, 2011 1 Introduction to Graphs 1 A graph G = (V, E) is a non-empty set of nodes or vertices V and a (possibly

More information