CSC 00 Disrt Struturs : Introuon to Grph Thory Grphs Grphs CSC 00 Disrt Struturs Villnov Univrsity Grphs r isrt struturs onsisng o vrs n gs tht onnt ths vrs. Grphs n us to mol: omputr systms/ntworks mthml rlons logi iruit lyout jos/prosss Qus%ons n isomorphism n yls/pths n plnrity n oloring Grphs: Bsi Trminology A grph is in s G = (V, E) with th st o vrs V n st o gs E Two vrs u n v in n unirt grph G r jnt (or nighors) i {u, v} is n g o G. Th g is si to onnt (or to inint with) u n v. orr o grph = numr o vrs G = ({v, v,,v }, {, }) grph o orr g: g onnts v n v v v v G Dirt Grphs By inion, th gs o irt grph r orr pirs. In irt grph, i w hv g = (u,v), thn u is si to jnt to v, th trminl vrtx v is si to jnt rom u, th inil vrtx = (,) = (,) = (,) = (,) = (,) Dr Pplskri
CSC 00 Disrt Struturs : Introuon to Grph Thory Typ Typs o Grphs Egs Multipl Egs? Simpl grph Unirt No No Multigrph Unirt Ys No Psuogrph Unirt Ys Ys Dirt grph Dirt No Ys Dirt multigrph Dirt Ys Ys Trminology vris sur to hk inions whn onsulng othr ooks/rls Loops? Dgr o vrtx Th gr o vrtx v is th numr o gs inint on v. Dnot g(v) A loop on v ontriuts to th g(v) Exmpl: g() = g() = g() = g() = 0 g() = Hnshking Lmm In n unirt grph, th sum o th grs o th vrs is twi th numr o gs. Thror, th sum o th grs o ll th vrs is vn. Σ g(v) = E. v V Corollry: An unirt grph hs n vn numr o vrs o o gr. Pth A wlk gins t vrtx v 0, ollows n g to v, ollows nothr g to v A wlk is rprsnt without gs whn thr r no prlll gs (v 0, v, v, v n ) Si to o lngth n A tril rom v 0 to v n is wlk with no rpt gs. A pth rom v 0 to v n is wlk with no rpt vrs. A wlk is los i it strts n ns in th sm vrtx; othrwis th wlk is si to opn Dr Pplskri
CSC 00 Disrt Struturs : Introuon to Grph Thory Ciruits n yls A iruit is los tril o lngth grtr thn. Som yls: (,,,,,) (,,,,,,) (,,,,,,) (,,,,,,) (,,,,,) A yl (or simpl iruit) is iruit rom v to v with no rpt vrtx, xpt v. -yl or tringl: yl o lngth k-yl: yl o lngth k Connt Grph A grph G is onnt i givn ny vrs v n v in G, thr is pth rom v to v. Connt onnt omponnts Not Connt Biprt Grph A simpl grph is ll ipr@t i its vrtx st V n pron into isjoint sts V n V suh tht vry g in th grph onnts vrtx in V to vrtx in V. Bipr%t V = {,,} V = {,} V V Not Bipr%t Aionl onpts (s txt) mulprt rig ut- vrtx isonnt onnt omponnt Dr Pplskri
CSC 00 Disrt Struturs : Introuon to Grph Thory Spil Grphs Cyl C n Cyl P n Whls W n Complt grph K n Complt Biprt K n,m -rgulr: ll vrs hv gr n-rgulr: ll vrs hv gr n. Tr: onnt grph with no yls Forst: grph with no yls Complmnt Lt G = (V, E) Th omplmnt G = (V, E ) whr E = {{u,v} u V n v V n {u,v} E} Exmpl: Wht is th omplmnt o G? G G Union Th union o G =(V,E ) n G =(V,E ) is th grph: G G = (V V, E E ) Exmpl: G A onnt omponnt o grph is sugrph tht is onnt. G G Sugrph H is sugrph o G i V(H) V(G) n E(H) E(G) Exmpl: G is sugrph o G G H Dr Pplskri
CSC 00 Disrt Struturs : Introuon to Grph Thory Sugrphs H is n inu sugrph o G i whnvr two vrs o H r jnt in G, thy r lso jnt in H. in othr wors, H onsists o sust o G s vrs n ll th gs twn thm A sugrph H o grph G is spnning sugrph o G i V(H) = V(G). Rprsnton o Grphs V E {{,,,, }, {{,}, {,}, {,}, {,}, {,}, {,}, {,}} 7 Ajny list Ajny mtrix :,, :, :, :,, :,, mulst rprsnton (llows rpon) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 It mns two grphs r ssnlly th sm (my rwn irntly n r-ll) Sm numr o vrs Sm numr o gs Sm gr squn G Isomorphism G Somms it is hr to tll r ths ssnlly th sm grph? nssry ut NOT suiint onions Isomorphism Dinion: Two grphs G, G r isomorphi i thr xists ijon h : V(G ) à V(G ) suh tht {v, w} E(G ) i {h(v), h(w)} E(G ) In othr wors, h is ijon twn th vrs o th two grphs tht prsrvs gs In this s, th isomorphism unon is th inty unon. h() = h() = h() = h() = h() = h() = Dr Pplskri
CSC 00 Disrt Struturs : Introuon to Grph Thory Isomorphism Dinion: Two grphs G, G r isomorphi i thr xists ijon h : V(G ) à V(G ) suh tht {v, w} E(G ) i {h(v), h(w)} E(G ) In othr wors, h is ijon twn th vrs o th two grphs tht prsrvs gs i w rnumr th vrs, th grphs r sll isomorphi, ut w gt irnt isomorphism unon h() = h() = h() = h() = h() = h() = Isomorphism It mns two grphs r ssnlly th sm (my rwn irntly n r-ll) Sm numr o vrs Sm numr o gs Sm gr squn G Somms it is hr to tll r ths ssnlly th sm grph? G nssry ut NOT suiint onions NO G is -rgulr, whrs G is not (g, vrtx hs gr ) Isomorphism G Somms it is hr to tll r ths ssnlly th sm grph? G YES è Isomorphism unon: h() = h() = h() = h() = h() = h() = Dr Pplskri