Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
19 views

unit4-graph

Rgpv cs 3rd sem digital systems and discrete structures notes

Uploaded by

sankalpsohgaura
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
19 views

unit4-graph

Rgpv cs 3rd sem digital systems and discrete structures notes

Uploaded by

sankalpsohgaura
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 100
GRAPH Agraph G is mathematical structure consisting of two sets V and E where V is a non-empty set of vertices and E is a non-empty set of edges Example: , BASIC TERMINOLOGY (1) Trivial Graph : A graph consisting only one vertex and no edge Example : ° (2) Null Graph : A graph consisting n vertices and no edge. Example : (©) fe) ©) (3) Directed Graph : A graph consist the direction of edges then this is called directed graph. (4) Undirected Graph : A graph which is not directed then it is called undirected graph ZF (8) Self loop in a Graph : Ifedge having the same vertex as Y both its end vertices is called self loop v Example : e v (6) Proper edge : An edge which is not self loop is called proper edge. (7) Multi edge : A collection of two or more edges having identically end point. f Coa Example : are multiedge (8) Simple Graph : A graph does not contain any self loop and multiedge (9) Multigraph : A graph does not contain any self loop but contain multiedge is called multigraph Example : www.matt EEE O_o (10) Pseudo Graph : A graph contain both self loop and multiedge is called pseudo graph y Example : (11) Incidence and Adjacency : Let e, be an edge joining two vertices V & V then e, is said to be incident of V & V Two vertices are said to be adjacent if there exist an edge joining this vertices. v Example : Here e1 is incident of V, & V. and V, & V, are adjacent but V, & V. are not adjacent. (12) Degree of Vertex : The degree of vertex V in a graph G written as d(V) is equal to number of edges which are incident on V with self loop counted twice Example : Here d(V,) = 2, d(V.) = 4, d(V,) = 2, d(V.) =3 d(V.) = 2, d(V,) = 2, d(V.) = 1, d(V.) =0 uestions at : www. matt (13) Isolated Vertex & Pendant Vertex : A vertex having 0 is called isolated vertex and a vertex having degree 1 is called pendant vertex (14) Finite and Infinite graph : A graph with a finite number of vertices as well as edge is called finite graph otherwise it is an infinite graph Example : SOME IMPORTANT GRAPH Asimple connect graph is said to be complete if each vertex is connected to every 0 \ Example A graph G 1s said to be regular if every vertex has the same degree. If degree of ea! Gis K, then itis called k-regular graph Example elem (3) Bigraph (or Bipartite) : If the vertex set V of a graph G can be partitioned into two non-empty disjoint subsets X and Y in such a way that edge of G has one end in X and one end in Y. Then G is called bipartite Example : Here V = {V,, V., V,, V.. V.. V,. Vi} X = {V,, V,, V,, Vand Y = {V., V., VJ Your Questions a CONNECTED GRAPH An undirected graph is said to be connected if there is a path between every two vertices. Example : AL ee) Cc “"D Note : If a graph is connected then it will not bipartite (4) Complete Bipartite Graph : If every vertex in X is disjo is every vertex in Y, then it is called a complete bipartite graph. If X and Y condition m & n vertices then this graph is denoted byK,., é © Here X={V,, V) &Y=(V,,V)} It is denoted by K,. Example : v v, (5) Subgraph : Let G(V, E) be a graph. Let V’ be a subset of V and let E’ be a subset of E whose end point belong to V". Then G(V", E’) is a graph and called a subgraph of G(V, E) Example : DECOMPOSITION OF GRAPH Agraph is said to be decomposed into two subgraph G, and G, ifG, UG, =G&G, 0G, = null graph v. vy. v. Example : v. v, v, vy. v. v. y, 0" v. v, v. v, COMPLEMENT OF GRAPH The complement of a graph G is defined as a simple graph with the same vertex set as G and where two vertices u and v are adjacent only when they are not adjacent in G Example: * " 2 v PLANARE GRAPH Agraph which can be drawn in the plane so that its edges do not cross is called planare. Draw K,,, bipartite graph JZ “4 HANDSHAKING THEOREM The sum of the degree of the vertices of a graph G is equal to twice the number of edges in G Proof : Consider a graph G with 'e’ edges and 'n’ vertices V,, V., ...., V,. Since each edge contributes 2 degree in a graph the sum of the degree of all vertices will be a Ddegts,) = 2¢ >) deg(v, ) = 2x Number of edge: VERIFICATION y In the given graph v, v. deg(V,) = 1, deg(V.) = 3, deg(V,) = 2 deg(V.) = 2, deg(V,) = 2 Sum of degree of all vertices 1+3+2+2+2=10 Also number of edges are 5 Hence this theorem is verified MATRIX REPRESENTATION OF GRAPH (1) Adjacency Matrix : Let a, denote the number of edges (V, V) then A = [a]... is called adjacency matrix of G if {1 if(v,. V,) isan edges 4, lo otherwise (2) Incidence Matrix : Let G be a graph with m vertices Vy Vi os My and n edges @,. €,, 00... Let a matrix M = [m]..., defined by ey the vertex V, is incident on the e, m,=30 if V, is not indicent on ¢. if V, isanend of the loop ¢, (3) Path Matrix : Suppose G is a simple directed graph ae m vertices, then path matrix p and B. have same non-zero entries where B, =A+A + A’, where A is adjacency matrix Example : A Adjacency matrix A= 8 eRe TI A 0 1 1 fo} Cy a, Soo) c Consider the undirected graph G as shown below. Find the incidence matrix. Find the Adjacency matrix of graph Agraph is given by the following adjacency Vw OYE matrix . 6 12 3 1 2 1 0 e tm) (| [2] 2 o Write down the Adjacency & incidence matrix of graph. ISOMORPHISM OF GRAPH Two graphs G, and G, are said to be jorphic if there is one to one correspondance between the edge set E, & E, in such a way tha! {if e. is an edge with en the correspondin G u, & v, in G. which correspond to u. 8 Another Definition graphs Number of vertices are same Number of edges are same An equal number of vertices w iv) Vertex correspondance & edge correspondance valid (i) Number of vertices are same. (ii) Number of edges are same. (iii) An equal number of vertices with given degree. (iv) ou p v, q w = Both are isomorphic. x s y. t HOMEOMORPHIC GRAPH T be obtained from the same graph > graph G and G’ are said t > homeon if they can Note : If G & G’ are homeomorphic then th d not be isomorphic q Example 2 both are obtain from But they are not isomorphic, bec i) Number of vertices and edges are same (ii) Sequence of deg tices are same (iii) Mapping of v Show that the graph given below are not isomorphic Show that the following graphs are isomorphic. Show that graph are isomorphic b WALK, TRAIL AND PATH (1) Walk : A walk is a finite alternating sequence V.2.v,0.V,8, ..... @.v, of vertices and edges, beginning and ending with same or different vertices Example : : e, then (i) ae. fe,,ge,be,be.c is walk (ii) ae,.ge,,fe,ae.b (iii) ae,be.ge,ce,be.ge,,e (1) Length of the walk : The number of edges is called length of the walk. (2) Closed & open walk : Awalk is said to be closed if its origin & terminous vertex (v, = v,) is equal otherwise it is called open walk. Example : fe..ge,.ae fis closed walk Trail : Any walk having different edges is called trail Circuit : A closed trail is called circuit Example : ae fe,.ge.be.a Path : Awalk is called path if all vertices are not repeated. Cycle : A closed path is called cycle Example : ae,.ge.de.ee. fe.a EULERIAN PATH A path in a graph is said to be an Eulerian path if it traverses each edge in the graph once and only once Example : then ue,ve.we,xe,ye.w EULERIAN CIRCUIT A circuit in a graph is said to be an Eulerian circuit if it traverses each edge in the graph once & only once Example : EULERIAN GRAPH A connected graph which contain an Eulerian circuit is called Eulerian graph Example : ee HAMILTONIAN PATH Apath which contain every vertex of a graph G exactly once is called Hamiltonian Graph Example : then ue,ve.we.xe.y HAMILTONIAN CIRCUIT A circuit that passes through each of the vertices in a group G exactly one except the starting vertex & end vertex is called Hamiltonian circuit. Example then ue.ve.xe.ye.We,U then ue, ve,we.xe,ye.We,U is not Hamiltonian circuit because w vertex repeat athscare.c HAMILTONIAN GRAPH A connected graph which contain Hamiltonial circuit is called Hamiltonian Graph Example : is Hamiltonian Graph Example : ¢ is not Hamiltonian Graph Determine a minimum Hamiltonian circuit for the graph given below. a Draw a graph with six vertices containing a Hamiltonian circuit but not Eulerian Circuit. Check the graph is Hamiltonian or Euler. Va Ys (i) Draw Hamiltonian circuit and Hamiltonian path. (ii) Is it Hamiltonian Graph? (iii) Is it Euler Graph? Discuss the diagram show in below k Your Questions at : w SPANNING TREE tree in G is a subgroup T of G, which is a tree If G is any connected graph a spanning | Example : M4aVU IT 1iILd ur Questions at : www.m be a sequence, an equation connecting a. with a finite number of other terms as a,,, a a., of the sequence is called recurrence relation Example : fibonacci sequence Sfp 2,3) 0, Oo So, a, = a,, + a., is a recurrence relation Note : This relation is also called difference equation ORDER OF RECURRENCE RELATION The order of recurrence relation is difference between greatest suffix & least suffix. Example : Let a, = a,, + a,,, then ordern-(n-2)=2 LINEAR RECURRENCE RELATION A recurrence relation having only the first power of the sequence & not having any product terms is said to be linear. Example : 5a,- 3a, +a,,=0 LINEAR RECURRENCE RELATION WITH CONSTANT COEFFICIENT Arecurrence relation of the form Oya, + Oya, + nee Cran = (0) is called linear recurrence relation with constant coefficient, SOLUTION OF LINEAR RECURRENCE RELATION vera O CONSTANT COEFFICIENT Working Rule : (i) Find auxiliary equation. ., ii). Case-t : When roots are real & distinct then "y= (A(a)’+A(a)’.... Ala)’ where a,, a..... are roots. Case-2 : When roots are coincident, then =(A,+AX+AX AX” )a Case-3 : When roots are non-repeated complex numbers + iB then y, = F'(A,cosn0 + A.sinnd) where r = -Jeasss sk Your Questions at Ant Bhn-| tRIVAeO ned ( =o SOLUTION OF LINEAR RECURRENCE RELATION WITH CONSTANT COEFFICIENT Working Rule : (i) Find auxiliary equation (ii), Case-1 : When roots are real & distinct then y, = (A,(a,)’ +A,(a,)’..... Aa)” where a,, a,.... are roots. Case-2 : When roots are coincident, then Y= (AHA AX AX) 8 Case-3 : When roots are non-repeated complex numbers w+ if then y, = r(A.cosn0 + A,sinnd) where r = ya? +f? Ant 4On-\ + 4An-, SOLUTION OF LINEAR RECURRENCE RELATION An t&4n-\+4"-8=° — CONSTANT COEFFICIENT Working Rule : - 25° 5 Find auxiliary equation oy Case-1 : When roots are real & distinct then == (Ala) +A(a)’....A(ay’ where a,, a... are roots. : When roots are coincident, then fre abe (A, +A.X+AX). AX” Ja? (-/%) Case-3 : When roots are non-repeated complex numbers ) ap) %+iB then y, = F(A.cosnd + A.sinnd) where r = a? +p? k Your Questions at Example : Solve the recurrence relation a... - 3a... + 2a, = 0 Solution : Put a, = x then x” - 3x" +2x°=0 => x -3x+2=0 > x=2,1 So, solution a, =A,(2)' +A(1) =A, +A,(2’) PARTICULAR INTEGRAL Let recurrence relation is a, + Aa, , + Ba, . = f(n) Working Rule : (1) If f(n) = n, then general form of PI is (P,n + P,) ; (2) Iff(n) = n°, then general form of Pl is (P,n’ + P.n + P.) (3) If f(n) = a’, then general form of Pl is Pa (4) IFf(n) = na’, then general form of (P.n + P.)a Example : Solve the difference equation a. + 5a. + 6a,, = 42.4 olution : First we solve a. + Sa. + 6a. =0 Puta, =x then x’ + Sx”’ + 6x (1) Gm = +t] PARTICULAR INTEGRAL Ant £4n-5t 44 es Kr4 on) A= -9.9 Let recurrence relation is a, + Aa,, + Ba.» = f(n) Working Rule : “= + Ast) (-2) Fan= A (1) IFf(n) = n, then general form of PI (ene) (2) If f(n) = n°, then general form of PI is (P.n’ + P.n + P,) Fi)+ qlacurh)t 4(& a ly Tah then general form of Pl is Pa 40)n + Ce 404940 a then general form of (P,n + P.)a Int) Example : ane tlie difference equation a, + 5a,, + 6a,, = 42.4" OPrI2f,= 1 SA-Iz, Solution : First we solve a, + 5a.. + 6a., =0 4 a Puta, = x ae lez Pe mee a then x’ + 5x” + 6x"?=0 (1) 3k Your Questions a PARTICULAR INTEGRAL Let recurrence relation is a, + Aa,, + Ba, Sah = n(4)r Working Rule’: 7 = "(4) @) (1) Iff(n) = n, then general form of PI is/(P.n + P.) = f(n) (2) IF f{n) =n’, then general form of Pl is (P.n’ + P.n + P,) A Aree ee leas habe) +4 (By A say @ at then general form of PI is Pa - 4f, +4 f0)-aIf!(n) = na ea general form of (P.n + P.)a Example : Solve the difference equation a, + 5a, + 6a =424 Solution : First we solve a, + Sa_. + 6a Puta ss then x’ + 5x

You might also like