(Connected Graphs)

Dr. Shubh N. Singh Department of Mathematics Central University of South Bihar

May 14, 2020 2

Lecture-01:

0.1 Walks, Paths, and Cycles

Let G = (V,E). If we think of the vertices of G as locations and the edges of G as roads between certain pairs of locations, then the graph G can be considered as modeling some community. There is a variety of kinds of trips that can be taken in the community. Let’s start at some vertex u of a graph G. If we proceed from u to a neighbor v of u and then to a neighbor of v and so on, until we finally come to a stop at a vertex w, then we have just described a walk from u to v in G. More formally,

Definition 0.1.1. Let G = (V,E), and let u, v ∈ V .A walk from u to v (in short, a u − v walk) in G is a nonempty finite sequence/list

u = v0, v1, . . . , vk = v of vertices in G, where k ≥ 0 and {vi, vi+1} ∈ E for all i = 0, 1, 2, . . . , k − 1. If the vertices in a walk are all distinct, we call it a path in G.

Note that all vertices or edges lie on (or, belong to ) a u − v walk need not be distinct; in fact u and v are not required to be distinct. Provided we continue to proceed from a vertex to one of its neighbors (and eventually stop), there is essentially no condi- tions on a walk in a graph. However, there will be occasions when we want to place restrictions on certain types of walks.

Definition 0.1.2. Let G be a graph, and let W be a u − v walk in G. 0.1. WALKS, PATHS, AND CYCLES 3

(1) The number of edges encountered in W (including multiple occurrences of an edge) is called the length of W , and is denoted by l(W ). (2) If l(W ) = 0, then W is called a trivial walk. So, W = (v) is a trivial walk. (3) If u = v, then W is called a closed walk. (4) The u − v walk W is called a u − v trail in G if no edge in W is traversed more than once. (5) A closed trail of length at least 3 is called a circuit. (6) A closed path of length at least 3 is called a . (7) A cycle of length k ≥ 3 is called a k-cycle. In particular, a 3-cycle is also referred to as a triangle. (8) A cycle of odd length is called an odd cycle; while, not surprisingly, a cycle of even length is called an even cycle. Remark that every path is a trail, but the converse is not true, in general, as shown in the following example. Example 0.1.1. Consider the following 5-vertex graph G with vertex set {u, v, w, x, y}. u v w

x v

Next consider the following walk W in G. W := u, w, y, x, w, v. Clearly W is a u − v trail in G. Notice that this trail W repeats the vertex w. Therefore this trail W is not a u − v path in G 4

Exercise 0.1.1. Justification should either be a proof or a coun- terexample. 1. Let G and H be graphs such that G ∼= H. Show that (i) if G contains a path of length k so does H. (ii) if G contains a cycle of length k so does H. 0.2. CONNECTED GRAPHS 5

Lecture-02:

0.2 Connected Graphs

We will now have a special interest in a graph G in which it is possible to travel from each vertex of the graph G to any other vertex of G.

Definition 0.2.1. Let G = (V,E).

(1) Two vertices u and v of G are said to be connected if there exists a u − v path in G.

(2) G is said to be connected if every pair of its points are connected. Otherwise, it is said to be disconnected.

(3) A connected subgraph of G that is not a proper subgraph of any other connected subgraph of G is called a of G. The number of components of G is denoted by k(G).

Thus, Remark 0.2.1. A graph G is connected if and only if k(G) = 1. Example 0.2.1. Consider the following graph G. There are three components G1,G2,G3 in G with the vertex set V (G1) = {A, B, C}, V (G2) = {D} and V (G3) = {E,F }.

A D E

B C F

Problem 0.2.1. If G is a disconnected graph, then show that the complement G is connected. 6

Solution. Let u, v ∈ V (G). If u and v belong to different com- ponents of G, then

uv∈ / E(G) =⇒ uv ∈ E(G).

In this case, there is a u − v path of length one between u and v. Let us assume that u and v belong to the same component. Since G is disconnected, G has at least two components. Choose a vertex w that belongs to a component that does not contain u, v. Then

uw, vw∈ / E(G) =⇒ uw, vw ∈ E(G).

Thus, in this case, there a u − v path ”u − w − v” of length two between u and v. Hence G is connected.  Problem 0.2.2. If G has exactly two vertices u and v of odd degree, then show that G has a u − v path. Solution. By contradiction, suppose that there is no u−v path in G. By definition, G is a disconnected graph and the vertices u and v must lie in two separate connected components H and K of G. Say u ∈ H and v ∈ K. Since G has exactly two vertices of odd degree, all other vertices in H (which, of course, are also vertices in G) have even degree. Therefore, the sum of the degrees of the vertices in H is an odd number. So we have a contradiction and our assumption, that there is no u, v path in G, must be false.  0.2. CONNECTED GRAPHS 7

Lecture-03: Problem 0.2.3. Let G be an n-vertex graph. If deg(u) + deg(v) ≥ n − 1 for every two non-adjacent vertices u and v of G, then show that G is connected.

Solution. Let u, v ∈ V (G). If u and v are adjacent, then we are done. Otherwise, if u and v are not adjacent, we claim that u and v have a common neighbor. By contradiction, suppose that N(u) ∩ N(v) = ∅. Since u and v are not adjacent, we see that both u and v are not in the union N(u)∪N(v) of neighbour of u and v, and so |N(u)∪N(v)| ≤ n−2. Note that deg(x) = |N(x)| for every vertex x ∈ V (G). Then

deg(u) + deg(v) = |N(u)| + |N(v)| = |N(u) ∪ N(v)| (since N(u) ∩ N(v) = ∅) ≤ n − 2.

This is a contradiction since deg(u) + deg(v) ≥ n − 1. This completes the proof.  (n−1) Problem 0.2.4. If G is an n-vertex graph with δ(G) ≥ 2 , then show that G is connected.

Solution. Let u, v ∈ V (G). If u and v are adjacent, then we are done. Otherwise, if u and v are not adjacent, we claim that u and v have a common neighbor. Observe that (n − 1) |N(u)| = deg(u) ≥ δ(G) ≥ , 2

(n−1) and similarly |N(v)| = deg(v) ≥ δ(G) ≥ 2 . If u and v are not adjacent, we see that both u and v are not in the union N(u) ∪ N(v), and so

|N(u) ∪ N(v)| ≤ n − 2. 8

Now

|N(u) ∩ N(v)| = |N(u)| + |N(v)| − |N(u) ∪ N(v)| (n − 1) (n − 1) ≥ + − (n − 2) 2 2 = 1.

Therefore vertices u and v have a common neighbour, say w. Hence u, w, v is a u−v path in G. This completes the proof.  Theorem 0.2.1. Let G be a nontrivial connected graph. Then G is bipartite if and only if G has no odd cycles. Proof. See class note for the proof. 0.2. CONNECTED GRAPHS 9

Lecture-04: Exercise 0.2.1. Be sure to explain your answer. 1. Determine whether the statements below are true or false. (i) If every vertex of a graph G has degree 2, then G is a cycle. (ii) Every disconnected graph has an isolated vertex. (iii) The complement of a connected graph always connected. (iv) A graph is connected if and only if some vertex is ad- jacent to all other vertices. 2. Prove or disprove: (i) If every vertex of a graph has degree at least 2, then G contains a cycle. (ii) If every vertex of a graph has degree exactly 2, then G is a cycle. (iii) If every vertex of a connected graph has degree exactly 2, then G is a cycle.

(n−1)(n−2) 3. If an n-vertex graph G has at least 2 +1 edges, show that G is connected. 4. Let G and H be graphs such that G ∼= H. Show that (i) if G is connected, then H is also connected. (ii) if G is bipartite, then H is also bipartite. 10

Lecture-05:

0.3 Bridges and Cut Vertices

Definition 0.3.1. Let G be a graph. • A vertex v in G is called a cut vertex if the graph G − v has more components than G. • An edge e in G is called a cut edge or bridge if the graph G − e has more components than G. Notice that if G is a connected graph and v, e are its cut vertex and bridge respectively, then G − v and G − e are discon- nected. Remark 0.3.1. Let G be a graph, and let c(G) denote the number of components of G. • If e ∈ E(G) is a bridge, then c(G − e) = 1 + c(G). • If v ∈ V (G) is a cut vertex, then c(G − e) ≥ 1 + c(G). Problem 0.3.1. Prove that every nontrivial connected graph all of whose vertices have even degrees contains no bridges. Solution. Let G be a nontrivial connected graph such that all vertices of G are even. Then |V (G)| ≥ 3, and the degree of each vertex of G must be at least 2. Suppose, if possible, that e = uv is a bridge in G. Then G−e has two components H and K such that u ∈ H and v ∈ K. In this way, both components H and K have exactly one odd vertex which is a contradiction since every graph has even number of odd vertices.  Theorem 0.3.1. Let G be a connected graph, and let e = uv be an edge of G. Then e is a bridge if and only if e lies on no cycle of G. 0.3. BRIDGES AND CUT VERTICES 11

Proof. See the class note for the proof. Problem 0.3.2. Let G be a connected graph. True or false ? Justify your claim. (i) If G has no bridges, then G has exactly one cycle.

Solution. False. Kn where n ≥ 4 has no bridges, and more than one cycle. 

(ii) If G has no bridges, then G has no cut vertices.

Solution. False. K1 ∨ 2K2 has no bridge, and it has one cut vertex. 

(iii) If G has no cut vertices, then G has no bridges.

Solution. False. K2 has no cut vertex, but it has a bridge. 

(iv) If G has no cut vertices and |V (G)| ≥ 3, then G has no bridges.

Solution. True. For the sake of converse, suppose e = uv is a bridge in G. Then G − e gives two connected com- ponents, say Gu (which contains vertex u) and Gv (which contains vertex v). Since |V (G)| ≥ 3, we see that at least one component is of order at least two, say Gu. Then Gu − u is nontrivial graph. Therefore, u is a cut vertex of G since Gu − u is nontrivial and is is a different component as v since uv was a bridge for G. Similarly, if Gv − v is nontrivial, then v is a cut vertex. 

Exercise 0.3.1. Be sure to explain your answer. 12

1. Draw a graph having (i) exactly one cut vertex. (ii) exactly one bridge. (iii) exactly one cut vertex and one bridge. (iv) no cut vertex and bridge. 2. If e = uv is a bridge in a graph G, then prove that there is a unique u − v path in G. 0.4. INDEPENDENT SETS AND COVERINGS 13

Lecture-06:

0.4 Independent Sets and Coverings

Definition 0.4.1. Let G = (V,E), and let S ⊆ V . (1) S is called a covering of G if at least one end-vertex of every edge of G belong to S. That means, if every edge of G is incident with a vertex in S. (2) A covering S is called a minimum covering if G has no covering S0 with |S| < |S0|. (3) The number of vertices in a minimum covering of G is called the covering number of G and is denoted by β(G). Definition 0.4.2. Let G = (V,E), and let S ⊆ V be an nonempty subset. (1) S is called an independent set of G if no two vertices of S are adjacent in G. (2) An independent set S is said to be maximum if G has no independent set S0 with |S0| > |S|. (3) The number of vertices in a maximum independent set is called the independence number of G and is denoted α(G). Theorem 0.4.1. Let G = (V,E), and let S ⊆ V be a nonempty subset. Then S is an independent set of G if and only if V − S is a covering of G. Proof. By definition, S is independent if and only if no two ver- tices of S are adjacent. That is, iff every edge of S is incident with at least one point of V − S. That is, iff V − S is a covering of G. 14

Proposition 0.4.2. Let G be an n-vertex graph. Then α(G) + β(G) = n. Proof. Let S be a maximum independent set of G and K be a minimum covering of G. Then α(G) = |S| and β(G) = |K|. Now V − S is a covering of G and K is a minimum covering of G. Hence |K| ≤ |V − S| so that β(G) ≤ n − α(G). Thus,

α(G) + β(G) ≤ n. (1)

Also V − K is an independent set and S is a maximum in- dependent set. Hence |S| ≥ |V − K| so that α(G) ≥ n − β(G). Thus

α(G) + β(G) ≥ n. (2)

From (1) and (2), we get α(G) + β(G) = n. Exercise 0.4.1. Find the covering number and independence number of the following graphs.

(i) Kn.

(ii) Km,n. (iii)