360 likes | 493 Views
GRAPHS AND MATRICES. Prof. B.Basavanagoud Department of Mathematics Karnatak University Dharwad-580 003 Karnataka, India email: b.basavanagoud@gmail.com. Diagrams of a road map, a family tree and chemical compound are as shown
E N D
GRAPHS AND MATRICES Prof. B.Basavanagoud Department of Mathematics Karnatak University Dharwad-580 003 Karnataka, India email:b.basavanagoud@gmail.com
Diagrams of a road map, a family tree and chemical compound are as shown below. All the figures have two objects in common: points and lines.
When we delete the labels of the points and lines from these diagrams we are left With certain configurations. A mathematical module of such configurations is a graph. So agraph consists of points and lines, lines joining certain pairs of these points.
In practice one does not need much ingenuity to translate real world problems like finding a shortest distance between two cities or predicting the existence of hydrocarbon compounds with n carbon atoms and m hydrogen atoms into a graph theoretical problem. This translation is one of the reasons for a lot of interaction between graph theory and other sciences like engineering, physical and social sciences. Definition of a Graph: A graph G finite nonempty set V together with prescribed set E of unordered pairs of distinct elements of V. Each element of V is called a vertex or point of G. Each pair (u,v) of vertices in E is called an edge or line of G.
Definition: If both vertex set and edge set of a graph G are finite, then G is finite otherwise infinite. Definition: If e = uv is an edge of G then u and v are adjacent vertices. If e = uv is an edge of G then the vertex u and the edge e are incident as are v and e.If two distinct edges and are incident with a common vertex, then they are adjacent edges.
A graph is represented by a diagram in which each vertex is denoted by a point and each edge as a line segment joining the vertices. The location of vertices and straightness of edges is immaterial. The intersection of two edges does not represent a vertex of the graph. The three graphs above are the same, because they incidence between edges and vertices is the same in all cases.
1. Adjacent vertices 2. Incidence 3. Adjacent edges
Eulerian Graphs: 1. An open trail containing all edges of a graph is called an eulerian trail. 2. A closed trail containing all the edges of a graph is called an eulerian cycle. 3. A graph containing an eulerian cycle is called an eulerian graph. Properties of Eulerian Graphs: A connected graph G is eulerian if and only if 1. every vertex of G has even degree 2. The set of edges of G can be partitioned into cycles.
Hamiltonian Graphs: • A path of a graph G containing every vertex is called a hamiltonian path. 2. A cycle of a graph G containing every vertex is called a hamiltonian cycle. 3. A graph is called hamiltonian if it contains hamiltonian cycle. Open Problem or Unsolved Problem: Characterization for a graph to be Hamiltonian.
Four color problem One of the most famous and productive problems of graph theory is the four color problem: "Is it true that any map drawn in the plane may have its regions colored with four colors, in such a way that any two regions having a common border have different colors?
1. Find the maximum number of edges in a graph with p vertices? The number of pairs of vertices that can be selected from p points 2. What is the maximum degree d of vertex v in a graph with p points? 3. Will a graph exists with four points A, B, C, D whose degrees are respectively 3,4,4,3? Sum of the degrees = 2q = 14 We cannot conclude that they form a graph. But the number of edges = ½ total degree = ½ * 14 = 7 . But the maximum number of edges = = 6. Therefore the points A, B, C, D cannot form a graph.
GRAPHS AND MATRICESThe adjacency matrix A(G) of a graph G with vertex set V(G)= {v1,v2,…,vp} is the p-by-p matrix [aij] where aij=1 if vivj∊E(G) and aij=0 otherwise. The following Figure shows a labeled graph and its adjacency matrix.
It is evident that A(G) is a (0,1) symmetric matrix with zero diagonal.A(0,1) matrix is a matrix each of whose entries is 0 or 1.Likewise, it is clear that these conditions are sufficient for a matrix to be the adjacency matrix of some graph.Thus,the set of all such matrices for all positive integers p represents a class of all graphs. The entries of nth power An of A have particularly a nice interpretation.
Powers of Adjacency Matrix: Theorem: If A is the adjacency matrix of a graph G with V(G)= {v1,v2,……,vp}, then (i,j) entry of An, n≥1 is the number of different vi-vj walks of length n in G.
Definition: The trace tr(M) of a square matrix M is the sum of the diagonal entries of M. Corollary: If An = [aij(n)]is the nth power of the adjacency matrix A(G) of a graph G with V(G)={v1,v2,….,vp} then(i) aij(2), i≠j, is the number of vi-vj paths of length two(ii) aii(2)= deg(vi) and(iii) 1/6 tr(A3) is the number of triangles of G.
The Incidence Matrix: Let V(G) ={v₁,v₂,...., vp } and E(G)={e₁, e₂,…., eq}. The incidence matrix B, defined as the p- by-q matrix [bij] for which bij=1 if vertex vi is incident with edge ej and bij =0 otherwise. e₁ e₂ e₃ e₄ e₅ e₆ v₁ 1 0 0 1 1 0 B(G)= v₂ 1 1 0 0 0 0 v₃ 0 1 1 0 1 1 v₄ 0 0 0 0 0 1 v₅ 0 0 1 1 0 0
The matrix B is • (i) (0,1) matrix • (ii) no two columns are identical • (iii) the sum of the entries in any column is 2. These conditions are sufficient as well as necessary for a pxq matrix to be incidence matrix. Theorem: If G is a nonempty graph, then BBt =A+C where B is the incidence matrix, Bt is the transpose of B, C is the degree matrix.
Degree Matrix: For a graph G with V(G)= {v₁, v₂,…., vp }, the degree matrix C(G)= [cij] is the pхp matrix with cij = deg vi and cij = 0 for i≠j. v₁ v₁ v₂ v₃ v₄ v₂v₁ 1 0 0 0 G: C(G)= v₂ 0 3 0 0 v₃ 0 0 2 0 v₃ v₄ v₄ 0 0 0 2
Matrix Tree Theorem: Let G be a connected graph and A be the adjacency matrix. Replace the diagonal entries of the matrix –A by the degrees of the corresponding vertices. The cofactors of the determinant of this new matrix are equal and the common value of the cofactor is the number of the spanning trees of G. c G: bReplace the diagonal elements by the degrees of vertices a,b,c and d, namely 2,3,1,2. This matrix is a d
The one of the cofactors is The number of spanning trees is 3. They are a d a d a d b c b c b c Using the above theorem we can P.T the number of spanning trees of labeled graph Kp is pp-2 (Cayley’s theorem).
Distance in Graphs • For a connected graph G, we define the distance d(u,v) between two vertices u and v as the length of any shortest u-v path. If there is no path connecting u and v, we define d(u,v) =∞. The distance matrix D=[ dij] of a connected graph G of order p with V(G)= {v1, v2,….,vp} that p-by –p matrix for which dij is the distance between vi and vj.
b G: a c e dThe distance matrix is a symmetric matrix with non-negative integer entries having zero diagonal.The following theorem characterizes those matrices which are the distance matrix of some graph.
THEOREM1. A p by p matrix D= [dij] is the distance matrix of a graph of order p if and only if D has the following properties:(i) dij is non-negative integer for all i,j(ii) dij =0 if and only if i=j(iii) D is symmetric (iv) dij ≤ dik+dkj for all i,j,k and (v) For dij>1, there exists k≠ i,j , such that dij = dik+dkj. There is an interesting class of graphs which one can associate with a given graph G of order p based on the distance concept. These are the powers of G.
The nth power Gnof G is that graph with V(Gn)=V(G) for which uv∊ E(Gn) if and only if 1≤ d(u,v)≤ n in G. The graphs G2 and G3 are also referred to as the square and cube, respectively of G.
The square of G, denoted by G2, has the points of G and the points u and v adjacent in G2 if and only if they are joined in G by a path of length 1 or 2.This concept was introduced by Harary and Ross. A criterion for a given graph to be the square of some graph was found by Mukhopadhay.Let A be the adjacency matrix of G, and let I be the p-by-p identity matrix. If we compute (A+I)n-I using boolean arithmetic (1+1=1), then we arrive at a matrix which is the adjacency matrix of some graph. This graph is Gn.
This observation is a direct consequence of a fact that employing boolean arithmetic, (A+I)n-I =An+An-1+……+A, and this matrix has (i,j) entry 1 of there is a path of length k, 1≤ k ≤ n, between vi and vj and has (i, j) entry 0 otherwise. A graph with its square and cube are shown in the previous slide. v1 v2 v3 v4 v1 v2 v3 v4 v1 0 1 2 3 v1 1 0 0 0 v2 1 0 1 2 v2 0 1 0 0 A= v3 2 1 0 1 I= v3 0 0 1 0 v4 3 2 1 0 v4 0 0 0 1
The Square Root of a Graph:Definition: A graph H is an nth root of G if Hn=G or H = G1/n The square roots of K4 are shown in the following figure: G1: G2: G3: G4: G5: The square roots of K4
For Square roots, however, a criterion has been obtained.Theorem: The connected graph G of order p with V(G)={v1,v2,….,vp} has a square root if and only if G contains a collection of complete subgraphs G1,G2,….,Gp such that(i) UE(Gi)= E(G)(ii) Gi contains vi and (iii) Gi contains vj if and only if Gj contains vi.
Spectrum of a graph: The Characteristic polynomial of A(G) is the characteristic polynomial of G. The roots of the characteristic equation are the eigenvalues of a graph G. The spectrum of the graph G is the collection of eigen values of G. Energy E(G) of a graph G is the absolute values of the eigenvalues of G.
The eigen values are The Spectrum = Energy E(G) =
Elementary Properties of Eigenvalues • The eigenvalues are the values λ for which the square matrix λI-A is singular, which is equitant to det(λI-A)=0. • ∑λi = - Trace A. Trace is the sum of the diagonal elements; ∑λi is the coefficient of in , For simple graphs, it is 0. • For symmetric real matrices A, the total multiplicity of nonzero eigenvalues is the rank. • Adding C to the diagonal shifts the eigenvalues by C, since α+C is a root of det(λI-(CI+A)) if and only if α is a root of det(λI-A).
Spectra of Complete Graph The spectra of complete graph
Spectra of complete bipartite graph The spectra of complete bipartite graph is