Presentation is loading. Please wait.

Presentation is loading. Please wait.

Many structures involving real world situations can be conveniently represented on a paper by means of a diagram consisting of a set of points together.

Similar presentations


Presentation on theme: "Many structures involving real world situations can be conveniently represented on a paper by means of a diagram consisting of a set of points together."— Presentation transcript:

1

2 Many structures involving real world situations can be conveniently represented on a paper by means of a diagram consisting of a set of points together with lines or curves joining some or all pairs of these points. Structures, thus defined are called graphs because they can be represented graphically on paper. Ex. The points in a diagram could represent different cities in a country and a line joining two points indicate that there is a direct air service between two cities. Introduction

3 Graph A graph G = (V, E) consists of a set of objects V = {v 1, v 2,…, v n } called vertices (or nodes) and another set E = {e 1, e 2,…, e m } of unordered pairs of vertices, called edges. In a graph, vertices are represented by small circles or dots. Edges are represented by lines or curves. v 1, v 2 are the end vertices of e 3. An edge having same vertex as both its end vertices is called a loop or self-loop. Edge e 1 is self loop.

4 If more than one edges are associated with a given pair of vertices, such edges are referred to as parallel edges. In figure, there is a graph with 5 vertices and seven edges. e 1 is the loop. e 4 and e 5 are the parallel edges. Incidence and Degree If e is an edge between two vertices u and v of a graph, then the vertices u and v are said to be incident on e and e is incident to both u and v. In given graph edge e 1, e 2 and e 3 are incident to v 2. Vertex v 1 and v 2 are incident on e 3. The order of a graph is the number of its vertices and its vertices and its size is the number of its edges. In given graph, Order = 5 and Size = 7.

5 Simple Graph A graph that has neither self- loops nor parallel edges is called a simple graph, otherwise it is referred to as general graph. Multigraphs Graphs that may have multiple edges connecting the same vertices are called multigraphs. If there are m different edges connecting to the same pair of vertices {u,v}, then {u,v} is called an edge of multiplicity m.

6 Pseudographs Graphs that may include loops, and possibly multiple edges connecting the same pair of vertices, are called pseudographs. Complete Graph The complete graph K n, is a graph with n vertices that contains exactly one edge between each pair of distinct vertices. The graph K 1 with one vertex and no edge is known as the trivial graph.

7 Finite & Infinite Graph A graph with finite number of vertices as well as a finite number of edges is called a finite graph otherwise it called an infinite graph.

8 Two non-parallel edges are said to be adjacent if they are incident to a common vertex. Ex. In given graph e 2 and e 7 are adjacent but e 2 and e 4 are not. Two vertices u and v in an undirected graph G are called adjacent (or neighbors) if u and v are end vertices of the same edge. Ex. In given graph vertex v 4 and v 5 are adjacent but v 1 and v 4 are not.

9 Degree The degree of a vertex v i in an undirected graph is the number of edges incident to v i, with self-loop counted twice. The degree of the vertex is denoted by d(v i ). Ex. In given graph d(v 1 ) = 3, d(v 2 ) = 4, d(v 3 ) = 3, d(v 4 ) = 3 and d(v 5 ) = 1. The degree of a vertex is also referred to as its valency

10 A vertex of degree zero is called isolated. An isolated vertex is not adjacent to any vertex. A vertex is pendant if it has degree one. A pendant vertex is adjacent to exactly one other vertex. Ex. vertex v 4 and v 7 are isolated and vertex v 3 is pendant vertex.

11 Regular Graph A graph in which all vertices are of equal degree If degree of all vertices in a regular graph is k, then graph is called k-regular. Null Graph : A graph G = (V, E) is null if E = . Every vertex in a null graph is isolated.

12 Bipartite Graph A simple graph G is called bipartite if its vertex set V can be partitioned into two disjoint sets V 1 and V 2 such that every edge in the graph connects a vertex in V 1 and a vertex in V 2 i.e., no edge in G connects either two vertices in V 1 or two vertices in V 1. It is represented as G = (V 1, V 2, E). The pair (V 1, V 2 ) is called a bipartition of the vertex set V of G.

13 Complete Bipartite Graph The complete bipartite graph K m,n is the bipartite graph G = (V 1, V 2, E) with m vertices in V 1 and n vertices in V 2 in which there is an edge between every vertex in V 1 and every vertex in V 2.

14 Q. Find the number of edges in the complete graph with n vertices. Sol. Let K n be a complete graph with n vertices Let V = {1, 2, 3,…,n} be the vertex set of the graph A vertex i can be selected in n ways. There are exactly (n-1) edges between vertex i and the remaining (n-1) vertices. Total number of edges = n(n-1) Also, the edge joining vertices i and j is same as the edge joining j and i. Hence, the number of edges in K n = n(n-1)/2 Theorem : Prove that the maximum number of edges in a simple graph with n vertices is n(n-1)/2

15 Handshaking Theorem The sum of the degrees of all vertices of a graph is twice the number of edges in it. Proof : An edge that is not a loop contributes to the degrees of two distinct vertices. A loop at a vertex contributes twice to the degree of that vertex.  when the degrees of the vertices are added, each edge (whether it is a loop or not) is counted exactly two times. Thus, the sum of the degrees is twice the number of edges. Ex. d(v 1 ) + d(v 2 ) + d(v 3 ) + d(v 4 ) + d(v 5 ) = 3 + 4 + 3 + 3 + 1 = 14 = 2 x 7

16 Theorem Every graph has an even number of odd vertices. or The number of vertices of odd degree in a graph is always even. Proof : Let the sum of degrees of odd vertices = x Let the sum of degrees of even vertices = y, which is even. ∵ sum of degrees of all vertices of a graph = 2. (number of edges), which is even  x + y is even  x is even [ ∵ y is even] If p is the number of odd vertices, then sum of p odd numbers = x  p is also even [ ∵ x is even]

17 Directed Graphs A directed graph (digraph) (V, E) consists of a non-empty set of vertices V and set of directed edges E The directed edge associated with the ordered pair (u, v) is said to start at u and end at v. When a directed graph has no loops and has no multiple directed edges, it is called a simple directed graph.

18 Directed Multigraphs Directed graphs that may have multiple directed edges from a vertex to another vertex. The vertex u is called the initial vertex of (u, v) and v is the terminal or end vertex of (u, v). The initial and terminal vertex of a loop are same. In a directed graph, the in-degree of a vertex v, denoted by deg - (v), is the number of edges with v as their terminal vertex. The out-degree of a vertex v, denoted by deg + (v), is the number of edges with v as their initial vertex.

19 Cycles The cycle C n, n  3, consists of n vertices 1, 2, …, n and edges {1, 2}, {2, 3}, …, {n-1, n}, and {n, 1} Wheels Obtain a wheel W n by adding a new vertex to the cycle C n, and connect this vertex to each vertex in Cycle

20 N-Cubes The n-dimensional hypercube or n-cube, denoted by Q n is the graph that has vertices representing the 2 n bit strings of length n. Two vertices are adjacent if and only if the bit strings that they represent differ in exactly one bit position. Q 3 c an be constructed from Q 2

21 Representation of Graphs Adjacency Matrix Let G = (V, E) be a simple graph where |V| = n. The adjacency matrix A = [aij] of G is n x n zero- one matrix where Ex. Use an adjacency matrix to represent the graph

22 Incidence Matrix Let G = (V, E) be a graph. Let 1, 2, …, n are the vertices and e 1, e 2, …, e m are the edges of G. Then the incidence matrix is the n x m matrix M = [m ij ] where Ex. Represent the graph with an incidence matrix

23 Homomorphism & Isomorphism of Graphs A graph homomorphism f from a graph G = (V, E) to a graph G’ = (V’, E’) written as f : G  G’, is a mapping f : V  V’ such that {u, v}  E  {f(u), f(v)}  E’ The simple graphs G = (V, E) and G’ = (V’, E’) are isomorphic if there is a one-to-one and onto function f from V to V’ with the property that a and b are adjacent in G iif f(a) and f(b) are adjacent in G’, for all a, b  V.

24 Isomorphism of Graphs Two graphs G and G’ are said to be isomorphic if there is a one-to-one correspondence between their vertices and between their edges such that the incidence relationship is preserved. Suppose that edge e is incident on vertices v 1 and v 2 in G; then the corresponding edge e’ in G’ must be incident on the vertices v 1 and v 2 that correspond to v 1 and v 2 respectively.

25 Except the labels of their vertices and edges, isomorphic graphs are the same graph, just drawn differently. Two isomorphic graphs must have : 1)The same number of vertices 2)The same number of edges 3)An equal number of vertices with a given degree. If any of the above three conditions is not satisfied, then the graph will be not isomorphic. But if above conditions are satisfied, it is not necessary that graphs are isomorphic.

26 Ex. Show that the graphs are isomorphic to each other or not 1) No. of vertices in G & H = 6 2) No. of edges in G & H = 7 3) In graph G : 4 vertices have degree 2 2 vertices have degree 3 In graph H : 4 vertices have degree 2 2 vertices have degree 3 These conditions are necessary but not sufficient f(u1)=v6, f(u2) =v3, f(u3) =v4, f(u4)=v5, f(u5)=v1, f(u6)=v2 To check whether f preserves edges, use adjacency matrix

27 If the two graphs satisfy all the three conditions, yet they are not isomorphic Vertex x must correspond to vertex y, because there is no other vertex of degree three. Also, there is only one pendant vertex w adjacent to y, while there are two pendant vertices u and v adjacent to x.

28 Ex. Show that following graphs are isomorphic or not. 1) 2) 3)

29 Ex. Find all non-isomorphic simple graphs of order 4. Sol. Maximum number of edges in a simple graph with 4 vertices = 4.(4-1)/2 = 6 Let N(n, k) be the number of non-isomorphic graphs with n vertices and k edges. N(4, 6) = 1, N(4, 5) = 1, N(4, 4) = 2, N(4, 3) = 3 N(4, 2) = 2, N(4, 1) = 1, N(4, 0) = 1  Total number of non-isomorphic graphs of order 4 = N(4, 6) + N(4, 5) + N(4, 4) + N(4, 3) + N(4, 2) + N(4, 1) + N(4, 0) = 11

30 Subgraph A graph g is said to be a subgraph of a graph G if all the vertices and all the edges of g are in G and each edge of g has the same end vertices as in G. Every graph is its own subgraph. A subgraph of a subgraph of G is a subgraph of G. A single vertex in a graph G is a subgraph of G. A single edge in G, together with its end vertices, is also a subgraph of G G g g is subgraph of G

31 Walk Let v and w be two vertices in a graph. A walk between v and w is a finite alternating sequence v = v 0, e 1, v 1, e 2, v 2, e 3, …, e n, v n = w of vertices and edges such that each edge e i in the sequence joins vertices v i-1 and v i. The vertices and edges in a walk need not be distinct. If the graph is simple, walk can be written as v 0 - v 1 – v 2 -..…- v n Two walks v 0, e 1, v 1, e 2, v 2, e 3, …, e n, v n and u 0, f 1, u 1, f 2, u 2, f 3, …, f m, u m are equal if n = m, v i = u i and e i = f i for 0  i  n Number of edges in a walk is called length of the walk

32 A walk, in which no edge is repeated, is called a trail. Any walk in a graph G is a subgraph of G. A closed walk in a graph is a walk between a vertex and itself, i.e. terminal vertices are same. A walk which is not closed is called an open walk. v2, e1, v2, e2, v4, e7, v5, e7, v4, e6, v3 is a walk v2, e3, v1, e4, v3, e5, v1 is a trail

33 Path The walk v = v 0, e 1, v 1, e 2, v 2, e 3, …, e n, v n = w in which the vertices v i (0  i  n) are all distinct, is called a path between v and w. v2, e3, v1, e4, v3, e6, v4 is a path between v2 & v4 Vertices v and w are the terminal vertices and the other (n-1) vertices v i (0  i  n) are called the intermediate vertices. Number of edges in a path is called length of path An edge which is not a self-loop is a path of length 1 A self-loop can be included in a walk but not in a path

34 Circuit A closed walk in which no edges repeat, is called a circuit. v2, e3, v1, e4, v3, e6, v4, e2, v2 is a circuit A circuit with no repeated vertices is called a cycle. Ex. The closed walk v, e1, w, e2, v is a cycle Ex. The closed walk v, e1, w, e1, v with no repeated intermediate vertices is not a cycle since it a not a circuit.

35 Cyclic Graph A simple graph G is a cyclic graph iff a subgraph C in G is a cycle. In a simple graph G, any cycle consisting of k vertices is a k-cycle in G; it is an odd cycle if k is odd and an even cycle if k is even. GC C is an even cycle in G

36 Connected & Disconnected Graph A graph G is said to be connected if there is at least one path between every pair of vertices in G. Otherwise, graph G is called disconnected. ConnectedDisconnected

37 Components A disconnected graph consists of two or more connected graphs. Each of these connected subgraphs is called a component. A graph is connected if number of components is one. Disconnected graph with two components Disconnected graph with four components

38 Theorem A simple graph with n vertices and k components can have at most (n - k)(n – k + 1)/2 edges. Proof Let n 1, n 2, …, n k be the number of vertices in each of the k components of a graph G n 1 + n 2 + … + n k = n ; n i  1 …………1) Squaring, [ ∵ (n i -1)  0, for all i]

39 …..(2) ∵ maximum number of edges in the i th component of G is n i (n i -1)/2  The maximum number of edges in G is  ½[n 2 - (k - 1)(2n - k)] – n/2, from (2) = ½ (n - k)(n – k + 1)

40 Euler Graph A closed walk running through every edge of a graph G exactly once, is called an Euler Line or A circuit that contains all the edges of a graph is an Euler Circuit A graph that that consists of an Euler line or an Euler circuit is called an Euler graph Since the Euler line contains all the edges of the graph, an Euler graph is always connected.

41 Euler Path An Euler path is a path that visits every edge of a graph exactly once Euler path starts and ends at different vertices Also called Euler Trail or unicursal line or open Euler line A graph is said to be semi-Euler or unicursal graph if it has an Euler path If we add an edge between the initial and final vertices of an Euler path, we will get an Euler circuit

42 A connected graph is an Euler graph iff all vertices are of even degree. Proof : Necessary Condition Suppose that a connected graph G is an Euler Graph  It contains an Euler line which is a closed walk tracing every edge exactly once  At every vertex v, this walk goes through two “new” edges incident on v – with one it ‘entered’ v and with the other ‘exited’. It is also true for the terminal vertex, as it ‘exited’ and ‘entered’ the same vertex at the beginning and end of the walk respectively. Euler-Hierholzer Theorem

43  The degree of each vertex is even Sufficient Condition Suppose that all the vertices are of even degree. To prove that the connected graph G is Euler graph Choose an arbitrary vertex v in graph G. Now, we construct a walk starting at v and going through the edges of G such that no edge is traced more than once. Since every vertex is of even degree, we can exit from every vertex we enter; the tracing can not stop at any vertex but at v.

44 Since v is also of even degree, we shall reach v when the tracing comes to an end. If this closed walk h just traced, includes all the edges of G, then G is an Euler graph. If not, remove all the edges of h from G and obtain a subgraph H of G formed by remaining edges. Since all the vertices of G are of even degree, so the vertices of H are also of even degree. Also, H must touch the closed walk h atleast at one vertex u [ ∵ G is connected]

45 Starting from u, we can again construct a new walk in graph H. This walk in H must terminate at u [ ∵ All vertices of H are of even degree ] This closed walk in H can be combined to h to form a new walk, which starts and ends at vertex v and has more edges than h. This process can be repeated untill we obtain a closed walk that traverses all the edges of G Hence G is an Euler graph

46 Konigsberg Bridge Problem Konigsberg bridge problem was a long-standing problem until solved by Leonhard Euler in 1736, by means of graph Two islands, A and B, formed by the Pregel River in Konigsberg were connected to each other and to the banks C and D with seven bridges as shown in fig.

47 The problem was to start at any of the four land areas of the city A, B, C, or D, walk over each of the seven bridges exactly once, and return to the starting point. Euler represented this situation by means of a graph. The vertices represents the land areas and the edges represents the bridges.

48 Given situation will possible only when represented graph will be an Euler graph because it contains an Euler line. Since in Euler graph, degree of all vertices must be even. But in constructed graph, degree of all vertices are not even. Hence solution for this problem does not exist. Theorem A connected graph is unicursal or semi-Euler iff it has exactly two vertices of odd degree

49 Hamiltonian Circuit A Hamiltonian circuit in a connected graph is defined as a closed walk that traverses every vertex of G exactly once, except the starting vertex, at which the walk also terminates. A circuit in a connected graph G is said to be Hamiltonian if it includes every vertex of G. Hence a Hamiltonian circuit in a graph of n vertices consists of exactly n edges.

50 Hamiltonian Path A path between two vertices in a connected graph is called Hamiltonian path if it passes through every vertex of the graph. A graph that has a Hamiltonian circuit or cycle is called Hamiltonian graph. The length of a Hamiltonian path in a connected graph of n vertices is n-1 Q.Draw a graph that has Hamiltonian path but does not have Hamiltonian circuit Complete graphs always have a Hamiltonian circuit.

51 Theorem : In a complete graph G of n vertices there are (n-1)/2 edge-disjoint Hamiltonian circuits, if n is an odd number  3. Proof : A complete graph G of n vertices has n(n-1)/2 edges, and a Hamiltonian circuit in G consists of n edges. Therefore, the number of edge-disjoint Hamiltonian circuits in G cannot exceed (n-1)/2. That there are (n- 1)/2 edge-disjoint Hamiltonian circuits, when n is odd, can be shown as follows :

52 Keeping the vertices fixed on a circle, rotate the polygonal pattern clockwise by 360/(n-1), 2.360/(n-1), 3.360/(n-1), …, (n-3)/2.360/(n-1) degrees. Observe that each rotation produces a Hamiltonian circuit that has no edge in common with any of the previous ones. Thus we have (n-3)/2 new Hamiltonian circuits, all edge disjoint among themselves. Hence the theorem.

53 Operations on Graphs Let G 1 = (V 1, E 1 ) and G 2 = (V 2, E 2 ) Union The union of two graphs G 1 and G 2 is another graph G 3 = G 1  G 2 = (V 3, E 3 ) where V 3 = V 1  V 2 and E 3 = E 1  E 2.

54 Intersection The intersection of two graph G 1 and G 2 is the graph G 4 = G 1  G 2 = (V 4, E 4 ) where V 4 = V 1  V 2 and E 4 = E 1  E 2.

55 Ring Sum The ring sum of two graphs G 1 and G 2 is a graph G 1  G 2 consisting of the vertex set V 1  V 2 and of edges that are either in G 1 or in G 2, but not in both. Union, Intersection and ring sum are commutative G 1  G 2 = G 2  G 1 G 1  G 2 = G 2  G 1 G 1  G 2 = G 2  G 1

56 If G 1 and G 2 are edge disjoint, then G 1  G 2 is a null graph and G 1  G 2 = G 1  G 2 If G 1 and G 2 are vertex disjoint, then G 1  G 2 is empty For any graph G, G  G = G = G  G G  G = a null graph The complement of a subgraph H in graph G is G – H = G  H

57 Decomposition A graph G is said to have been decomposed into two subgraphs G 1 and G 2 if G 1  G 2 = G and G 1  G 2 = a null graph  Every edge of G occurs either in G 1 or in G 2, but not in both. Some of the vertices may occur in both G 1 and G 2. In decomposition, isolated vertices are disregarded. A graph containing m edges {e 1, e 2, …, e m } can be decomposed in 2 m-1 -1 different ways into pairs of subgraphs G 1, G 2.

58 Deletion If v i is a vertex in graph G, then G - v i is a subgraph of G obtained by deleting v i from G. Deletion of a vertex always implies the deletion of all edges incident on that vertex. If e j is an edge in G, then G- e j is a subgraph of G obtained by deleting ej from G. Deletion of an edge does not imply deletion of its end vertices. Therefore, G – e j = G  e j

59 Fusion A pair of vertices a, b in a graph are said to be fused (or merged) if the two vertices are replaced by a single new vertex such that every edge that was incident on either a or b or on both, is incident on the new vertex.  Fusion of two vertices does not alter the number of edges, but it reduces the number of vertices by one.

60 Complement Let G be a graph of n vertices, then the complement of G is  G  = Kn – G Cartesian Graph Product or Graph Product Let G 1 = (V 1, E 1 ) and G 2 = (V 2, E 2 ) be two vertex- disjoint graphs. Then the product G 1 x G 2 is the graph with vertex set V 1 x V 2 and A = (u 1, v 1 ) adjacent to B = (u 2, v 2 ) whenever [u 1 = u 2 and v 1 adj v 2 ] or [v 1 = v 2 or u 1 adj u 2 ]

61 Travelling Salesman Problem A salesman is required to visit a number of cities during a trip. Given the distances between cities, in what order should he travel so as to visit every city precisely once and return home, with the minimum mileage travelled? Sol. Representing the cities by vertices and the roads between them by edges, we get a graph. In this graph, with every edge e i, there is associated a real number (the distance in miles, say) w(e i ), where w(e i ) is the weight of the edge e i. Such a graph is called a weighted graph.

62 If each of the cities has a road to every other city, we have a complete weighted graph. Since this graph has many Hamiltonian circuits, we are to choose the one that has the smallest sum of distances. To find the possible number of Hamiltonian circuits, starting from any of the n vertices, we have (n-1) edges to choose from the first vertex, (n-2) from the second, (n-3) from the third, and so on. Possible number of choices = (n-1)(n-2)(n-3)…2.1 = (n-1)!

63 As each Hamiltonian circuit has been counted twice, Total number of different Hamiltonian circuits in a complete graph of n vertices = (n-1)!/2. Now, we can calculate the distance travelled in each of the possible Hamiltonian circuits and then picking the shortest one.

64 Planar Graph A graph is said to be planar if it is possible to draw it in a plane such that no two of its edges intersect except possibly at a vertex to which they both are incident. A graph that can not be drawn on a plane without a crossover between its edges, is called non-planar. A drawing of a geometric representation of a graph on a plane such that no edges intersect is called embedding. Also called plane representation of graph.

65 A graph G is planar if there exists a graph isomorphic to G that is embedded in a plane, otherwise G is non-planar. Non-planar Representation Planar RepresentationNon-planar Graph

66 Kuratowski’s Two Graphs First Graph Complete graph of five vertices K 5 Second Graph Regular connected graph with six vertices and nine edges K 3,3

67 Theorem The complete graph of five vertices is non-planar. Proof Let v 1, v 2, v 3, v 4 and v 5 be the five vertices of graph G ∵ In a complete graph, there is an edge between every pair of vertices.  We have a circuit v 1 - v 2 - v 3 - v 4 - v 5. This pentagon divides the plane of the paper into two regions, one inside and the other outside.

68 Suppose we draw an edge from v 1 to v 3 inside the pentagon. Now we have to draw an edge from v 2 to v 4 and another edge from v 2 to v 5. Since neither of these edges can be drawn inside the pentagon without crossing over the edge v 1 v 3, we draw both these edges outside the pentagon.

69 The edge connecting v 3 and v 5 can not be drawn outside the pentagon without crossing the edge v 2 v 4.  v 3 and v 5 have to be connected with an edge inside the pentagon. Now, we have yet to draw an edge between v 1 and v 4. This edge can not be placed inside or outside the pentagon without a crossover. Thus, this graph can not be embedded in a plane. Hence, it is nonplanar.

70 Properties of Kuratowski’s Two Graphs Both are non-planar graphs. Both are regular graphs. Removal of one edge or a vertex makes each a planar graph. Kuratowski’s first graph is the non-planar graph with the smallest number of vertices, and Kuratowski’s second graph is the non-planar graph with the smallest number of edges. Thus both are the simplest non-planar graphs. Theorem : Kuratowski’s second graph is non-planar.

71 Region A plane representation of a graph divides the plane into regions (also called windows, faces or meshes) A region is characterized by the set of edges (or the set of vertices) forming its boundary. A region is not defined in a non-planar graph or even in a planar graph not embedded in a plane.

72 Infinite Region The portion of the plane lying outside a graph embedded in a plane, called the infinite or unbounded or outer or exterior region. Ex. Region R 4 is infinite Characterized by a set of edges or vertices By changing the embedding of a planar graph, we can change the infinite region

73 Maximal Planar Graph A simple planar graph is called a maximal planar graph if it becomes non-planar when any two non- adjacent vertices in it joined by an edge. A maximal planar graph is necessarily a connected graph. A disconnected graph is planar iff each of its components is planar. The degree of a region is the number of edges that encloses the region. Sum of degrees of all the regions in a planar graph is twice the size of the graph. [ ∵ each edge belongs to two regions]

74 Euler’s Formula A connected planar graph with n vertices and e edges has e – n + 2 regions. Proof Let the connected planar graph be simple graph. Let f be the number of regions. Let K p be the number of p-sided regions. ∵ Sum of degrees of all regions = 2e  3.K 3 + 4.K 4 + 5.K 5 + … + r.K r = 2.e ……………1) where K r is the number of polygons with maximum edges.

75 Also, K 3 + K 4 + K 5 + … + K r = f …………2) ∵ Sum of all angles at each vertex = 2  n ………3) ∵ Sum of interior angles of a p-sided polygon =  (p-2)  Sum of all interior angles of all polygons in the planar graph =  (3 - 2).K 3 +  (4 - 2).K 4 +  (5 - 2).K 5 + … +  (r - 2).(K r – 1) ∵ S um of all exterior angles of a p-sided polygon = 2 .p -  (p-2) =  (2p – p + 2) =  (p + 2)

76  Sum of the exterior angles of the infinite region =  (r + 2)  Sum of all angles =  (3K 3 + 4K 4 + 5K 3 +…+ rK r ) - 2  (K 3 + K 4 + K 5 +…+K r ) -  (r - 2) +  (r + 2) =  (2e) - 2  (f) +  (r + 2 – r + 2) [using eq. 1 & 2] =  (2e -2f) + 4  Equating with eq. (3), 2  (e - f) + 4  = 2  n  e – f + 2 = n Therefore, the number of regions f = e – n + 2 Hence Proved

77 Theorem In any simple, connected planar graph with f regions, n vertices, and e edges (e  2), the following inequalities must hold e  3f/2  e  3n – 6 Proof : Since each region is bounded by at least three edges and each edge belongs to exactly two regions, 2e  3f  e  3f/2 Substituting for f from Euler’s formula e  3 (e – n + 2) /2  e  3n – 6

78 Detection of Planarity To find out if a given graph is planar or not. Elementary Reduction Step 1 Since a disconnected graph is planar iff each of its components is planar, we need to consider only one component at a time. Step 2 Since addition or removal of self-loops do not affect planarity, remove all self-loops. Step 3 : Since parallel edges also do not affect planarity, eliminate edges in parallel by removing all but one edge between every pair of vertices.

79 Step 4 Elimination of a vertex of degree two by merging two edges in series does not affect planarity. Therefore, eliminate all edges in series. Repeated application of step 3 and 4 will usually reduce a graph drastically. The graph G reduced to a new graph H by applying elementary reduction method, then the reduced graph H is 1)A single edge, or 2)A complete graph of four vertices, or 3)A simple graph with n  5 and e  7.

80 As graphs in 1 and 2 are planar. To investigate simple, connected graphs of at least five vertices and with every vertex of degree three or more, check if e  3n – 6. If this inequality is not satisfied, the graph is nonplanar. If it is satisfied, we have to test the graph further.

81

82 Thickness The least number of planar subgraphs whose union is the graph G is called the thickness of G. Thickness of planar graph =1. Thickness of K 5 = 2 Thickness of K 3,3 = 2 Thickness of complete graph of 8 vertices = 2 Thickness of complete graph of 9 vertices = 3

83 Crossing Number the number of intersections needed in order to draw the graph in a plane. Crossing number of planar graph = 0 Crossing number of K 5 = 1 Crossing number of K 3,3 = 1

84 Coloring Painting all the vertices of a graph with colors such that no two adjacent vertices have the same color is called the proper coloring (or coloring) of a graph. A graph in which every vertex has been assigned a color according to a proper coloring is called a properly colored graph. Chromatic Number A graph G that requires at least k different colors for its proper coloring, is called a k-chromatic graph, and the number k is called the chromatic number of G.

85 Observations 1)A graph consisting of only isolated vertices is 1- chromatic. 2)A graph with one or more edges (not a self-loop) is at least 2-chromatic. 3)A complete graph of n vertices is n-chromatic, as all its vertices are adjacent. 4)A graph consisting of simply one circuit with n  3 vertices is 2-chromatic if n is even and 3- chromatic if n is odd. 5) Every tree with two or more vertices is 2-chromatic 6) The chromatic number of every bipartite graph is 2

86 Theorem Every tree with two or more vertices is 2-chromatic. Proof Let T be a rooted tree at vertex v. Paint v with color 1. Paint all vertices adjacent to v with color 2. Next, paint all vertices adjacent to these using color 1. Continue this process till every vertex in T has been painted. Now in T, all vertices at odd distances from v have color 2, while v and vertices at even distances from v have color 1.

87 Now, along any path in T, the vertices are of alternating colors. Since there is one and only one path between two vertices in a tree, no two adjacent vertices have the same color. Thus, T has been properly colored with two colors. A tree is 2-chromatic, but not every 2-chromatic graph is a tree.


Download ppt "Many structures involving real world situations can be conveniently represented on a paper by means of a diagram consisting of a set of points together."

Similar presentations


Ads by Google