many structures involving real world situations can be conveniently represented on a paper by means...

87
Graphs

Upload: marybeth-hunt

Post on 14-Jan-2016

227 views

Category:

Documents


0 download

TRANSCRIPT

Graphs

Graphs1Many 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. IntroductionGraphA graph G = (V, E) consists of a set of objects V = {v1, v2,, vn} called vertices (or nodes) and another set E = {e1, e2,, em} 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.v1, v2 are the end vertices of e3. An edge having same vertex as both its end vertices is called a loop or self-loop. Edge e1 is self loop.

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. e1 is the loop. e4 and e5 are the parallel edges.Incidence and DegreeIf 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 e1, e2 and e3 are incident to v2.Vertex v1 and v2 are incident on e3. 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.

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.

Pseudographs Graphs that may include loops, and possibly multiple edges connecting the same pair of vertices, are called pseudographs.

Complete Graph The complete graph Kn, is a graph with n vertices that contains exactly one edge between each pair of distinct vertices. The graph K1 with one vertex and no edge is known as the trivial graph.

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.

Two non-parallel edges are said to be adjacent if they are incident to a common vertex. Ex. In given graph e2 and e7 are adjacent but e2 and e4 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 v4 and v5 are adjacent but v1 and v4 are not. DegreeThe degree of a vertex vi in an undirected graph is the number of edges incident to vi, with self-loop counted twice. The degree of the vertex is denoted by d(vi).Ex. In given graph d(v1) = 3, d(v2) = 4, d(v3) = 3, d(v4) = 3 and d(v5) = 1. The degree of a vertex is also referred to as its valency 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 v4 and v7 are isolated and vertex v3 is pendant vertex.Regular Graph A graph in which all vertices are of equal degreeIf 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.

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

Complete Bipartite GraphThe complete bipartite graph Km,n is the bipartite graph G = (V1, V2, E) with m vertices in V1 and n vertices in V2 in which there is an edge between every vertex in V1 and every vertex in V2.

Q. Find the number of edges in the complete graph with n vertices.Sol. Let Kn 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 Kn = n(n-1)/2

Theorem : Prove that the maximum number of edges in a simple graph with n vertices is n(n-1)/214Handshaking 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(v1) + d(v2) + d(v3) + d(v4) + d(v5) = 3 + 4 + 3 + 3 + 1 = 14 = 2 x 7Theorem Every graph has an even number of odd vertices. orThe 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]

Directed Graphs A directed graph (digraph) (V, E) consists of a non-empty set of vertices V and set of directed edges EThe 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.

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.

Cycles The cycle Cn, 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 Wn by adding a new vertex to the cycle Cn, and connect this vertex to each vertex in Cycle

N-Cubes The n-dimensional hypercube or n-cube, denoted by Qn is the graph that has vertices representing the 2n 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.

Q3 can be constructed from Q2 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

Incidence MatrixLet G = (V, E) be a graph. Let 1, 2, , n are the vertices and e1, e2, , em are the edges of G. Then the incidence matrix is the n x m matrix M = [mij] where

Ex. Represent the graph with an incidence matrixHomomorphism & Isomorphism of GraphsA 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. Isomorphism of GraphsTwo 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 v1 and v2 in G; then the corresponding edge e in G must be incident on the vertices v1 and v2 that correspond to v1 and v2 respectively.

Except the labels of their vertices and edges, isomorphic graphs are the same graph, just drawn differently.

Two isomorphic graphs must have :The same number of verticesThe same number of edgesAn 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.Ex. Show that the graphs are isomorphic to each other or not

1) No. of vertices in G & H = 62) No. of edges in G & H = 73) 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 3These conditions are necessary but not sufficient

f(u1)=v6, f(u2) =v3, f(u3) =v4, f(u4)=v5, f(u5)=v1, f(u6)=v2To check whether f preserves edges, use adjacency matrix If the two graphs satisfy all the three conditions, yet they are not isomorphicVertex 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.

Ex. Show that following graphs are isomorphic or not.

1)2)3)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) = 3N(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) = 11Subgraph

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

Gg g is subgraph of GWalk Let v and w be two vertices in a graph. A walk between v and w is a finite alternating sequence v = v0, e1, v1, e2, v2, e3, , en, vn = w of vertices and edges such that each edge ei in the sequence joins vertices vi-1 and vi. The vertices and edges in a walk need not be distinct.If the graph is simple, walk can be written as v0 - v1 v2 - ..- vn Two walks v0, e1, v1, e2, v2, e3, , en, vn and u0, f1, u1, f2, u2, f3, , fm, um are equal if n = m, vi = ui and ei = fi for 0 i nNumber of edges in a walk is called length of the walk 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 trailPathThe walk v = v0, e1, v1, e2, v2, e3, , en, vn = w in which the vertices vi (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 vi (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 pathCircuitA 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. Cyclic GraphA 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.

GCC is an even cycle in GConnected & 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.

ConnectedDisconnectedComponentsA 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 componentsDisconnected graph with four componentsTheorem A simple graph with n vertices and k components can have at most (n - k)(n k + 1)/2 edges.Proof Let n1, n2, , nk be the number of vertices in each of the k components of a graph G n1 + n2 + + nk = n ; ni 1 1)

Squaring,

[ (ni-1) 0, for all i] ..(2)

maximum number of edges in the ith component of G is ni(ni-1)/2

The maximum number of edges in G is

[n2 - (k - 1)(2n - k)] n/2, from (2) = (n - k)(n k + 1)

Euler Graph

A closed walk running through every edge of a graph G exactly once, is called an Euler Line orA 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.Euler Path

An Euler path is a path that visits every edge of a graph exactly once Euler path starts and ends at different verticesAlso 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 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 The degree of each vertex is even

Sufficient ConditionSuppose 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.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]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 graphKonigsberg Bridge ProblemKonigsberg 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.

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.

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 degreeHamiltonian CircuitA 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.

Hamiltonian PathA 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

Draw a graph that has Hamiltonian path but does not have Hamiltonian circuit

Complete graphs always have a Hamiltonian circuit.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 :

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.Operations on Graphs Let G1 = (V1, E1) and G2 = (V2, E2)

UnionThe union of two graphs G1 and G2 is another graph G3 = G1 G2 = (V3, E3) where V3 = V1 V2 and E3 = E1 E2.

IntersectionThe intersection of two graph G1 and G2 is the graph G4 = G1 G2 = (V4 , E4) where V4 = V1 V2 and E4 = E1 E2.

Ring SumThe ring sum of two graphs G1 and G2 is a graph G1 G2 consisting of the vertex set V1 V2 and of edges that are either in G1 or in G2, but not in both.

Union, Intersection and ring sum are commutativeG1 G2 = G2 G1G1 G2 = G2 G1 G1 G2 = G2 G1

If G1 and G2 are edge disjoint, then G1 G2 is a null graph and G1 G2 = G1 G2

If G1 and G2 are vertex disjoint, then G1 G2 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 DecompositionA graph G is said to have been decomposed into two subgraphs G1 and G2 if G1 G2 = G and G1 G2 = a null graph

Every edge of G occurs either in G1 or in G2, but not in both. Some of the vertices may occur in both G1 and G2. In decomposition, isolated vertices are disregarded.

A graph containing m edges {e1, e2, , em} can be decomposed in 2m-1 -1 different ways into pairs of subgraphs G1, G2.DeletionIf vi is a vertex in graph G, then G - vi is a subgraph of G obtained by deleting vi from G. Deletion of a vertex always implies the deletion of all edges incident on that vertex.If ej is an edge in G, then G- ej 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 ej = G ej

FusionA 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.

ComplementLet G be a graph of n vertices, then the complement of G is G= Kn G

Cartesian Graph Product or Graph ProductLet G1 = (V1 , E1) and G2 = (V2, E2) be two vertex-disjoint graphs. Then the product G1 x G2 is the graph with vertex set V1 x V2 and A = (u1, v1) adjacent to B = (u2, v2) whenever [u1 = u2 and v1 adj v2] or [v1 = v2 or u1 adj u2]Travelling Salesman ProblemA 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 ei, there is associated a real number (the distance in miles, say) w(ei), where w(ei) is the weight of the edge ei. Such a graph is called a weighted graph.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)!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. Planar GraphA 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. 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 RepresentationPlanar Representation

Non-planar GraphKuratowskis Two Graphs

First Graph Complete graph of five vertices K5

Second Graph Regular connected graph with six vertices and nine edges K3,3

Theorem The complete graph of five vertices is non-planar.Proof Let v1, v2, v3, v4 and v5 be the five vertices of graph G

In a complete graph, there is an edge between every pair of vertices.

We have a circuit v1 - v2 - v3 - v4 - v5 . This pentagon divides the plane of the paper into two regions, one inside and the other outside.Suppose we draw an edge from v1 to v3 inside the pentagon.

Now we have to draw an edge from v2 to v4 and another edge from v2 to v5.

Since neither of these edges can be drawn inside the pentagon without crossing over the edge v1v3, we draw both these edges outside the pentagon.

The edge connecting v3 and v5 can not be drawn outside the pentagon without crossing the edge v2v4. v3 and v5 have to be connected with an edge inside the pentagon.

Now, we have yet to draw an edge between v1 and v4.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.Properties of Kuratowskis Two Graphs Both are non-planar graphs. Both are regular graphs. Removal of one edge or a vertex makes each a planar graph. Kuratowskis first graph is the non-planar graph with the smallest number of vertices, and Kuratowskis second graph is the non-planar graph with the smallest number of edges. Thus both are the simplest non-planar graphs. Theorem : Kuratowskis second graph is non-planar.RegionA 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.

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 R4 is infinite Characterized by a set of edges or vertices By changing the embedding of a planar graph, we can change the infinite regionMaximal Planar GraphA 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]Eulers 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 Kp be the number of p-sided regions. Sum of degrees of all regions = 2e

3.K3 + 4.K4 + 5.K5 + + r.Kr = 2.e 1) where Kr is the number of polygons with maximum edges.Also, K3 + K4 + K5 + + Kr = f 2)

Sum of all angles at each vertex = 2n 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).K3 + (4 - 2).K4 + (5 - 2).K5 + + (r - 2).(Kr 1)

Sum of all exterior angles of a p-sided polygon = 2.p - (p-2) = (2p p + 2) = (p + 2) Sum of the exterior angles of the infinite region = (r + 2)

Sum of all angles = (3K3 + 4K4 + 5K3 ++ rKr) - 2(K3 + K4 + K5 ++Kr) - (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 = 2n e f + 2 = nTherefore, the number of regions f = e n + 2 Hence ProvedTheoremIn 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 6Proof : 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 Eulers formula e 3 (e n + 2) /2 e 3n 6Detection of PlanarityTo find out if a given graph is planar or not .

Elementary ReductionStep 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.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 isA single edge, orA complete graph of four vertices, orA simple graph with n 5 and e 7. 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.

ThicknessThe least number of planar subgraphs whose union is the graph G is called the thickness of G.

Thickness of planar graph =1.Thickness of K5 = 2Thickness of K3,3 = 2Thickness of complete graph of 8 vertices = 2Thickness of complete graph of 9 vertices = 3Crossing Number the number of intersections needed in order to draw the graph in a plane.

Crossing number of planar graph = 0Crossing number of K5 = 1Crossing number of K3,3 = 1ColoringPainting 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. Observations A graph consisting of only isolated vertices is 1-chromatic.A graph with one or more edges (not a self-loop) is at least 2-chromatic.A complete graph of n vertices is n-chromatic , as all its vertices are adjacent. 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-chromatic6) The chromatic number of every bipartite graph is 2Theorem 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.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.