1 Number Theory and

Chapter 6

Basic concepts and definitions of graph theory

By

A. Satyanarayana Reddy

Department of Mathematics Shiv Nadar University Uttar Pradesh, India

E-mail: [email protected] 2

Module-4: of a graph

Objectives

• Connected, disconnected graphs and connected components

• Connectedness in directed graphs

• Few properties of connected graphs

Let X = (V,E) be a graph. Before proceeding further, we recall the following definitions. Connectedness: A vertex u ∈ V is said to be connected to a vertex v ∈ V if there is a path in X from u to v. Connected Graph: X is said to connected if any two vertices of X are connected. Note that Complete graphs, complete bipartite graphs, wheel graphs, cyclic graphs, path graphs and Johnson graphs etc. are a few examples of connected graphs. A graph that is not connected is the union of two or more connected subgraphs, each pair of which has no vertex in common. These disjoint connected subgraphs are called the connected components of the graph. The number of components of a graph X is denoted by C(X). If X is connected then C(X) = 1. Let e be an edge of a graph X then it can be easily observed that C(X) ≤ C(X \{e}) ≤ C(X) + 1. A direct application of the definition of a connected/disconnected graph gives the following result and hence the proof is omitted.

Theorem 1. A graph is disconnected if and only if its vertex set V can be partitioned into two

nonempty disjoint subsets V1 and V2 such that there exists no edge in X whose one end vertex is in

V1 and other is in V2.

Theorem 2. If a graph (connected or disconnected) has exactly two vertices of odd degree then there must be a path joining these vertices. 3

Proof. Let X be a graph that has exactly two vertices, say u and v of odd degree. Let C be a connected component of X containing the vertex u. Since, the number of vertices of odd degree in any graph is even, C has to contain another vertex of odd degree. But, then v is the only other vertex in X of odd degree and hence v lies in the component C. Thus, there is a path from u to v.

Before proving the next theorem, we need the following inequality.

Lemma 3. Let n1,n2,...,nk ∈ N. Then

k k k 2 2 ∑ ni ≤ (∑ ni) − (k − 1)(2 ∑ ni − k). i=1 i=1 i=1 Proof. We have

(n1 − 1) + (n2 − 1) + ··· + (nk − 1) = (n1 + n2 + ··· + nk) − k.

Squaring on both sides, we get

2 2 [(n1 − 1) + (n2 − 1) + ··· + (nk − 1)] = [(n1 + n2 + ··· + nk) − k] k k k k k 2 2 2 ∑(ni − 1) + ∑ ∑ (ni − 1)(n j − 1) = (∑ ni) − 2k(∑ ni) + k i=1 i=1 j=1, j6=i i=1 i=1 k k k k k k 2 2 2 ∑ ni − 2(∑ ni) + k + ∑ ∑ (ni − 1)(n j − 1) = (∑ ni) − 2k(∑ ni) + k i=1 i=1 i=1 j=1, j6=i i=1 i=1 | {z } positive

Hence, we have k k k k 2 2 2 ∑ ni ≤ 2(∑ ni) − k + (∑ ni) − 2k(∑ ni) + k . i=1 i=1 i=1 i=1 Or equivalently,

k k k 2 2 ∑ ni ≤ (∑ ni) − (k − 1)(2 ∑ ni − k). i=1 i=1 i=1 4

Theorem 4. A simple graph with n vertices and k components can have at most have (n − k)(n − k + 1)/2 edges.

th Proof. Let X be a graph with k components. Let ni be the number of vertices in the i component, where 1 ≤ i ≤ k. Then, the number of edges in the graph is equal to sum of the edges in each of its components. Thus, X has maximum number of edges if each component is a complete graph. k ni(ni−1) Hence, the maximum possible number of edges in the graph X is ∑ 2 . But from Lemma 3 i=1 we have k k k k k 1 2 1 1 2 1 ∑ ni − ∑ ni ≤ [(∑ ni) − (k − 1)(2 ∑ ni − k)] − ∑ ni 2 i=1 2 i=1 2 i=1 i=1 2 i=1 1 = (n − k)(n − k + 1) 2

As a direct application of Theorem 4, we have the following result.

Corollary 5. Any simple graph with n vertices and more than (n − 1)(n − 2)/2 edges is connected.

Theorem 6. Let X be a simple graph with diameter d(X). If d(X) ≥ 3 then show that d(Xc) is ≤ 3.

Proof. Since d(X) ≥ 3, there exist two non-adjacent vertices, say u,v in X, such that u and v have no common neighbor. Then, for each x ∈ V(X) \{u,v}, either u or v or both is a non-neighbor. So, x is adjacent at least one of u or v in Xc. Also, note that u,v are adjacent in Xc. Therefore, for any x,y ∈ V(Xc) = V(X), there is path of length at most 3 in Xc through u,v, namely either x−u−v−y or x − v − u − y. Thus, the required result follows.

Connectedness in Directed graphs:

• Weakly connected: A digraph is weakly connected if it is connected as an undirected graph (a graph in which the direction of the edges is neglected).

• Unilaterally connected: if for any pair of nodes of the graph at least one of the nodes of the pair is reachable from the other. 5

• Strongly connected: If for any pair of nodes of the graph both the nodes of the pair are reachable from one to another.

From the definition every strongly connected graph is unilaterally connected and every unilaterally connected graph is weakly connected graph.

3 4 3 4 3 4

1 2 1 2 1 2 X Y Z

It is easy check that the graph Z is strongly connected, Y is unilaterally connected but not strongly connected, where as X is weakly connected but not unilaterally connected.

Exercises 7. 1. A graph X has 20 vertices. Any two distinct vertices x and y have the property that deg x + deg y ≥ 19. Prove that X is connected.

2. Show that a connected graph with n vertices has at least n − 1 edges.

3. Let X be a graph with 15 vertices and 4 components. Then prove that at least one component will contain 4 vertices. What is the largest number of vertices that a component of X may have?

4. Let X be a graph with n vertices and δ(X) ≥ (n − 1)/2. Then show that X is connected. 6

0.1 Disconnecting sets, Cut sets

• A disconnecting set in a connected graph X is a set of edges whose removal disconnects X.

3 4 5

1 2 X

For example, in the above example, some of the disconnecting sets are

{{4,5}},{{1,2},{3,4}},{{1,3},{2,4}},{{1,2},{3,4},{4,5}}

are disconnecting sets.

Cut set is a disconnecting set having the property that no proper subset of which is a discon- necting set. Cut set with only one edge is called a .

3 4 7 5

1 2 6 X

The edge {4,5} is a bridge.

A graph may contain cut sets of different sizes. Edge connectivity: Let X be a connected graph. Then, its edge connectivity, denoted λ(X), equals

λ(X) = The number of elements in the smallest cutest.

= Minimum number of edges required to disconnect the graph. 7

• Separating set: It is a set of vertices whose removal disconnects the graph. Vertex connectivity of a connected graph X, denoted κ(X), equals the minimum number of vertices required to remove so that the graph becomes disconnect.

• A connected graph is said to be separable if its vertex connectivity is one. All other connected graphs are non-separable graphs.

• In a separable graph a vertex whose removal disconnects the graph is called a cut vertex or a cut node or an articulation point. [In a (connected acyclic graph) every vertex with degree grater than 1 is a cut vertex. So, every tree with three or more vertices is a separable graph].

• A separable graph consists of two or more non separable sub graphs.

• Each of the largest non-separable sub graph is called a block. [A non separable connected graph consists of just one block.]

Lemma 8. Let X be a graph. Then deleting an edge increases the number of components by 0 or 1.

Proof. Components are pairwise disjoint; no two share a vertex. Adding an edge with endpoints in distinct components combines them into one component. Thus adding an edge decreases the number of components by 0 or 1 and deleting an edge increases the number of components by 0 or 1.

Lemma 9. Every graph with n vertices and k edges has at least n − k components.

Proof. A n-vertex graph with no edges has n components, by Lemma 8 each edge added reduces this by at most one, so when k edges have been added, the number of components is still at least n − k.

As an immediate application, we have the following result. 8

Corollary 10. Let X be a connected simple graph on n vertices. Then, the minimum number of edges in X is n − 1.

Proof. By Lemma 9, every graph with n vertices and k edges has at least n − k components. Hence, every n-vertex graph with fewer than n − 1 edges has at least two components and is disconnected. The contrapositive of this is that every connected n-vertex graph has at least n − 1 edges.

In Module 6, we will show that this lower bound is achieved by every tree.

Lemma 11. Let X be a simple graph in which every vertex has degree at least k, then X contains a path of length at least k. If k ≥ 2, then X also contains a cycle of length at least k + 1.

Proof. Let P be a maximal path in X and let u be an endpoint of P. Since P is maximal, every neighbor of u (at least deg(u) ≥ k of them) is in V(P). As X is simple, P therefore has at least k distinct vertices other than u and hence has length at least k. Now, let k ≥ 2 and let v be the farthest neighbor of u in the path P. As {u,v} is an edge in X, we get a cycle of length at least k + 1 by considering the edge {u,v} and the portion of P from v to u (see the figure given below). u v

a c d e f g

b

Lemma 12. Let G be a simple graph. Then, it has at least two vertices that are not cut vertices.

Proof. Let u and v be the endpoints of a maximal path P in X. Since P is maximal, the neighbors of u and v lie on P itself. Thus, P \{u} and P \{v} are connected in X \{u} and X \{v}, respectively. That is, the neighbors of u and v belong to a single component of X \{u} and X \{v}, respectively and hence neither u nor v is a cut vertex.

1. Show that a vertex v in a connected simple graph X = (V,E) is a cut vertex if and only if there are vertices u and w both different from v, such that every path between u and w passes through v. 9

Proof. Let v be a cut vertex of X. Then X \{v} is disconnected. Let X1,X2,...,Xk be the k components of X \{v}. Let U = V(X1) and W = ∪i=2V(Xi). Also, let u ∈ U and w ∈ W, and

to be definite, let w ∈ V(Xi) for some 2 ≤ i ≤ k. If there is a u − w path P in X not passing

through v, then P connects u and w in X \{v} also. Therefore, X1 ∪ Xi is a single component in X \{v}, contradicting our assumption. Thus, every u − w path in X passes through v.

Conversely, let there be vertices u,w ∈ V \{v} such that every u−w path in X passes through v. Then, clearly v is a cut vertex as the removal of v will imply that there is no path from u to w and hence they must lie in different connected components of X \{v}.

2. Let X be a graph on n vertices. Then κ(x) ≤ λ(X) ≤ δ(X), whenever n ≥ 3.

Proof. We first prove λ(X) ≤ δ(X). If X has no edges, then λ(X) = δ(X) = 0. Similarly, if X is not connected, then 0 = λ(X) ≤ δ(X). If X is a connected graph with at least one edge, then we get a disconnected graph, when all edges incident with a vertex of minimum degree are removed. Thus, in either case, λ(X) ≤ δ(X).

We now prove κ(X) ≤ λ(X). For this, we consider various cases as mentioned below.

Case 1: If X = Kn, then κ(X) = λ(X) = n − 1.

Case 2: Now let X 6= Kn. In case X is disconnected or trivial, then obviously κ(X) = λ(X) = 0. If X is connected and has a cut edge (bridge) x, then λ(X) = 1. In this case, κ(X) = 1, since

either X has a cut vertex incident with x, or X is K2 (not allowed as n ≥ 3).

Case 3: Finally, let λ(X) ≥ 2. Then, there is a collection of λ(X) edges whose removal disconnects X. Clearly, the removal of λ(X) − 1 of these edges produces a graph with a cut edge (bridge) x = uv. For each of these λ(X) − 1 edges, select an incident vertex different from u or v. The removal of these vertices also removes the λ(X)−1 edges and quite possibly more. If the resulting graph is disconnected, then κ(X) < λ(X). If not, x is a cut edge (bridge) 10

and hence the removal of u or v will result in either a disconnected or a trivial graph, so that in each case, κ(X) ≤ λ(X).

3. Let r,s,t be positive integers with r ≤ s ≤ t. Then, there is a graph X with κ(X) = r,λ(X) = s and δ(X) = t.

Proof. Take two disjoint copies of Kt+1. Let A be a set of r vertices in one of them and B be a set of s vertices in the other. Join the vertices of A and B by s edges utilizing all the vertices of B and all the vertices of A. Since A is a vertex cut and the set of these s edges is an edge cut of the resulting graph X, it is clear that κ(X) = r,λ(X) = s. Also, there is at least one vertex which is not in A ∪ B, and it has degree t, so that δ(X) = t.