# graph theory,graph terminologies,planar graph & graph colouring

Post on 20-Jun-2015

1.103 views

Embed Size (px)

DESCRIPTION

8.1 Graph Models 8.2 Graph Terminologies 8.7 Planar Graphs 8.8 Graph colouringTRANSCRIPT

- 1. GRAPH THEORYRAJAT(3026)RAJESH()SAURABH (3174)SHAFAQ (3122)

2. CONTENTS 8.1 GRAPH & GRAPH MODELS 8.2 GRAPH TERMINOLOGIES 8.7 PLANAR GRAPH 8.8 GRAPH COLOURING 3. IntroductionWhat is a graph ? It is a pair G = (V, E), where V = V(G) = set of vertices E = E(G) = set of edges Example: V = {s, u, v, w, x, y, z} E = {(x,s), (x,v), (x,u), (v,w),(s,v), (s,u), (s,w), (s,y), (w,y),(u,y), (u,z),(y,z)} 4. Edges An edge may be labeled by a pair of vertices, for instancee = (v,w). e is said to be incident on v and w. Isolated vertex = a vertex without incident edges. 5. Simple graphA simple graph G (V , E)consists of a non-empty set ofvertices V and a set E ofedges,such that each edge ebelongs to E is associated withan unordered pair of distinctvertices, called its endpoints.It is a simple graph.loopMultipleedgesIt is not simple graph. 6. Multigraphs (or Pseudo-graphs) Loop : An edge whose endpoints are same Multiple edges : Edges have the same pair of endpointsLoopMultipleedgesUnlike simplegraphs, it containsthe edges withsame endpoints.Note: Multigraphs doesnt contain loops. 7. DigraphsA digraph is a pair G = (V , A) of a set V, whose elements arecalled vertices or nodes,With a set A of ordered pairs of vertices, called arcs, directededges, or arrows (and sometimes simply edges with thecorresponding set named E instead of A).multiple arcarcloopnode 8. Graph TerminologyType Edges Multiple EdgesAllowed?Loops Allowed?Simple graph Undirected No NoMultigraph Undirected Yes NoPseudo graph Undirected Yes YesSimple DirectedgraphDirected No NoDirected Multigraph Directed Yes YesMixed graph Undirected &DirectedYes Yes 9. Graph Models1. NICHE OVERLAPGraphs in EcosystemGraphs are used in manymodels involving theinteraction of different speciesof animals. For instance, thecompetition b/w species in anecosystem can be modeledusing a niche overlap graph. 10. 2. Round-RobinTournamentsA tournament where eachteam plays each other teamexactly once is called a round-robintournament. Suchtournaments can be modeledusing directed graphs whereeach team is represented by avertex.Note: (a , b) is an edge if teama beats team b and if the edgeis directed in the vertex thenthat team is defeated by theother one and vice-versa. 11. Degree of graphThe degree of a vertex in a simple graph, denoted by deg(v), isthe number of edges incident on it.Degree also means number of adjacent vertices.For a Node, The number of head endpoints adjacent to a node is calledthe Indegree and it is denoted by deg- (v). The number of tail endpoints adjacent to a node is calledOutdegree and it is denoted by deg+ (v). 12. For example in thedigraph,Out-deg(1) = 2In-deg(1) = 0Out-deg(2) = 2In-deg(2) = 2Out-deg(3) = 1In-deg(3) = 4And so on. 13. Handshaking LemmaLet G = (V , E) be an undirected graph with e edges. Then,2e = ( ).For example,How many edges are there in a graph with 10 vertices eachof degree six?Solution:deg( ) = 6*10 = 60which follows 2e = 60 ,i.e., e = 30 14. Corollary of Handshaking theoremTheorem:In any simple graph, there are an even number of vertices of odddegree.Proof :Let V1 and V2be the set of vertices of even degree and the set of vertices ofodd degree, respectively, in an undirected graph G = (V , E). Then2e= deg = 1deg + 2degBecause deg( ) is even for v V1. Since the L.H.S. that is 2e is even thus thesecond term in last inequality ,which is 2deg , must be even.Because all the terms in this sum are odd, there must be even number of suchterms. Thus, there are an even number of vertices of odd degree. 15. Some Special Graphs1. Complete graph Kn :The complete graph Kn is thegraph with n vertices and everypair of vertices is joined by anedge , like in Mesh topology.The figure representsK2,K3,,K7. 16. 2. Cycle Graph :A cycle graph Cn , where n >= 3, sometimes simply knownas an n- Cycle, is a graph on n nodes , 1,2,.,n , andedges {1,2} , {2,3} , . , {n-1,n} , {n,1}.C5CCC3 46 17. 3. Wheel Graph :A Wheel graph Wn contain an additional vertex to the cycleCn, for n>=3 , and connect this new vertex to each of the nvertices in Cn, by new edges. The wheels W3 , W4 , W5 , W6are displayed below.W5WWW3 46 18. 4. N-Cube :The n-cube (hypercube) Qn is the graph whose verticesrepresent 2n bit strings of length n. Two vertices are adjacent ifand only if the bit strings differ in exactly one position.100000110 111101010 011001Figure representsQ3 19. Bipartite Graphs A bipartite graph G is agraph such that V(G) = V(G1) V(G2) |V(G1)| = m, |V(G2)| = n V(G1) V(G2) = No edges exist between anytwo vertices in the samesubset V(Gk), k = 1,2G1 G2 20. Complete Bipartite graph Km,nA bipartite graph is the completebipartite graph Km,n if every vertexin V(G1) is joined to a vertex inV(G2) and conversely,|V(G1)| = m , |V(G2)| = n 21. Bipartite Graphs in terms ofGraph ColoringTheorem:A simple graph is bipartite if and only if it is possibleto assign one of two different colors to each vertex of thegraph so that no two adjacent vertices are assigned the samecolor.K2 , 3 V V2 1 22. Proof:First, suppose that G = (V , E) is a simple graph. Then V = V1 UV2, where V1 and V2 are disjoint sets and every edge in E connects avertex in V1 and a vertex in V2. If we assign one color to each vertex inV1 and a second color to each vertex in V2, then no two adjacentvertices are assigned the same color.Now suppose that it is possible to assign colors to the vertices ofthe graph using just two colors so that no two adjacent vertices areassigned the same color. Let V1 be the set of vertices assigned one colorand V2 be the set of vertices assigned the other color. Then, V1 and V2are disjoint and V = V1 U V2. Furthermore, every edge connects avertex in V1 and a vertex in V2 because no two adjacent vertices areeither both in V1 or both in V2.Consequently, G is bipartite. 23. Applications of Special Types of Graphs1. Job Assignments :Suppose that there are m employees in a group and j differentjobs that need to be done where m=3, then e = 3rHence,(2/3)e >= rUsing r = e v + 2(Eulers theorem)e v + 2