Connetiit in Grphs CSH: Disrete Mthemtis Grph Theor II Instrtor: Işıl Dillig Tpil qestion: Is it possile to get from some noe to nother noe? Emple: Trin netork if there is pth from to, possile to tke trin from to n ie ers. If it s possile to get from to, e s n re onnete n there is pth eteen n Instrtor: Işıl Dillig, CSH: Disrete Mthemtis Grph Theor II / Instrtor: Işıl Dillig, CSH: Disrete Mthemtis Grph Theor II / Pths Emple A pth eteen n is seqene of eges tht strts t erte, moes long jent eges, n ens in. Emple:,,, is pth, t,, n,, re not Consier grph ith erties {,, z, } n eges (, ), (, ), (, z), (, z) Wht re ll the simple pths from z to? Length of pth is the nmer of eges trerse, e.g., length of,,, is A simple pth is pth tht oes not repet n eges Wht re ll the simple pths from to? Ho mn pths (n e non-simple) re there from to?,,, is simple pth t,, is not Instrtor: Işıl Dillig, CSH: Disrete Mthemtis Grph Theor II / Instrtor: Işıl Dillig, CSH: Disrete Mthemtis Grph Theor II / Conneteness Emple A grph is onnete if there is pth eteen eer pir of erties in the grph Emple: This grph not onnete; e.g., no pth from to Proe: Sppose grph G hs etl to erties of o egree, s n. Then G ontins pth from to. A onnete omponent of grph G is miml onnete sgrph of G Instrtor: Işıl Dillig, CSH: Disrete Mthemtis Grph Theor II / Instrtor: Işıl Dillig, CSH: Disrete Mthemtis Grph Theor II /
Cirits Cles A irit is pth tht egins n ens in the sme erte.,,,, n,,, re oth irits A simple irit oes not ontin the sme ege more thn one,,, is simple irit, t,,,, is not Length of irit is the nmer of eges it ontins, e.g., length of,,, is A le is simple irit ith no repete erties other thn the first n lst ones. For instne,,,,,,, is irit t not le Hoeer,,,, is le In this lss, e onl onsier irits of length or more Instrtor: Işıl Dillig, CSH: Disrete Mthemtis Grph Theor II 7/ Instrtor: Işıl Dillig, CSH: Disrete Mthemtis Grph Theor II 8/ Emple Proe: If grph hs n o length irit, then it lso hs n o length le. Hh? Rell tht not eer irit is le. Aoring to this theorem, if e n fin n o length irit, e n lso fin o length le. Proof Proe: If grph hs n o length irit, then it lso hs n o length le. Proof strong intion on the length of the irit. Emple:,,,,, is n o length irit, t grph lso ontins o length le Instrtor: Işıl Dillig, CSH: Disrete Mthemtis Grph Theor II 9/ Instrtor: Işıl Dillig, CSH: Disrete Mthemtis Grph Theor II 0/ Proof, ont. Proof, ont. Proe: If grph hs n o length irit, then it lso hs n o length le. Proe: If grph hs n o length irit, then it lso hs n o length le. Instrtor: Işıl Dillig, CSH: Disrete Mthemtis Grph Theor II / Instrtor: Işıl Dillig, CSH: Disrete Mthemtis Grph Theor II /
Colorilit n Cles Emple Proe: If grph is -olorle, then ll les re of een length. Is this grph -olorle? Instrtor: Işıl Dillig, CSH: Disrete Mthemtis Grph Theor II / Instrtor: Işıl Dillig, CSH: Disrete Mthemtis Grph Theor II / Distne Beteen Verties More Colorilit n Cles The istne eteen to erties n is the length of the shortest pth eteen n Wht is the istne eteen n? Proe: If grph hs no o length les, then grph is -olorle. To proe this, e first onsier n lgorithm for oloring the grph ith to olors. Wht is the istne eteen n? Wht is the istne eteen n? Then, e ill sho tht this lgorithm orks if grph oes not he o length les. Instrtor: Işıl Dillig, CSH: Disrete Mthemtis Grph Theor II / Instrtor: Işıl Dillig, CSH: Disrete Mthemtis Grph Theor II / The Algorithm Pik n erte in the grph. If erte hs o istne from, olor it le Otherise, olor it re Proof We ill no proe: If the grph oes not he o length les, the lgorithm is orret. Corretness of the lgorithm implies grph is -olorle. e Proof ontrition. f Sppose grph oes not he o length les, t the lgorithm proes n inli oloring. Mens there eist to erties n tht re ssigne the sme olor. Instrtor: Işıl Dillig, CSH: Disrete Mthemtis Grph Theor II 7/ Instrtor: Işıl Dillig, CSH: Disrete Mthemtis Grph Theor II 8/
Proof, ont. Cse : The re oth ssigne re Ptting It All Together We kno n, m re oth een n m This mens e no he n o-length irit inoling n, m B theorem from erlier, this implies tht grph hs o length le, i.e., ontrition Theorem: A grph is -olorle if n onl if it oes not he o-length les Corollr: A grph is iprtite if n onl if it oes not he o-length les Emple: Consier grph G ith erties,,,, e, f Is G prtitle if its eges re (, f ), (e, f ), (e, ), (, ), (, )? Cse is etl the sme. Instrtor: Işıl Dillig, CSH: Disrete Mthemtis Grph Theor II 9/ Instrtor: Işıl Dillig, CSH: Disrete Mthemtis Grph Theor II 0/ Trees A tree is onnete nirete grph ith no les. Ft Aot Trees Emples n non-emples: Theorem: An nirete grph G is tree if n onl if there is niqe simple pth eteen n to of its erties. 7 7 e An nirete grph ith no les is forest. Instrtor: Işıl Dillig, CSH: Disrete Mthemtis Grph Theor II / Instrtor: Işıl Dillig, CSH: Disrete Mthemtis Grph Theor II / Lees of Tree Gien tree, erte of egree is lle lef. Internl noes Lees Importnt ft: Eer tree ith more thn noes hs t lest to lees. 7 Wh is this tre? Instrtor: Işıl Dillig, CSH: Disrete Mthemtis Grph Theor II / Instrtor: Işıl Dillig, CSH: Disrete Mthemtis Grph Theor II /
Nmer of Eges in Tree Roote Trees Theorem: A tree ith n erties hs n eges. Proof is intion on n Bse se: n = Intion: Assme propert for tree ith n erties, n sho tree T ith n + erties hs n eges Constrt T remoing lef from T ; T is tree ith n erties (tree ese onnete n no les) B IH, T hs n eges A roote tree hs esignte root erte n eer ege is irete from the root. Verte is prent of erte if there is n ege from to ; n is lle hil of Verties ith the sme prent re lle silings Verte is n nestor of if is s prent or n nestor of s prent. Verte is esennt of if is s nestor A lef k: n + erties n n eges Instrtor: Işıl Dillig, CSH: Disrete Mthemtis Grph Theor II / Instrtor: Işıl Dillig, CSH: Disrete Mthemtis Grph Theor II / Qestions ot Roote Trees Strees Sppose tht erties n re silings in roote tree. Gien roote tree n noe, the stree roote t inles n its esennts. Whih sttements ot n re tre?. The mst he the sme nestors. The n he ommon esennt. If is lef, then mst lso e lef Leel of erte is the length of the pth from the root to. The height of tree is the mimm leel of its erties. Instrtor: Işıl Dillig, CSH: Disrete Mthemtis Grph Theor II 7/ Instrtor: Işıl Dillig, CSH: Disrete Mthemtis Grph Theor II 8/ Tre-Flse Qestions. To silings n mst e t the sme leel.. A lef erte oes hot he stree.. The strees roote t n n he the sme height onl if n re silings. m-r Trees A roote tree is lle n m-r tree if eer erte hs no more thn m hilren. An m-r tree here m = is lle inr tree. A fll m-r tree is tree here eer internl noe hs etl m hilren. Whih re fll inr trees?. The leel of the root erte is. Instrtor: Işıl Dillig, CSH: Disrete Mthemtis Grph Theor II 9/ Instrtor: Işıl Dillig, CSH: Disrete Mthemtis Grph Theor II 0/
Usefl Theorem Corollr Theorem: An m-r tree of height h ontins t most m h lees. Proof is intion on height h. Corollr: If m-r tree hs height h n n lees, then h log m n Instrtor: Işıl Dillig, CSH: Disrete Mthemtis Grph Theor II / Instrtor: Işıl Dillig, CSH: Disrete Mthemtis Grph Theor II / Qestions Blne Trees An m-r tree is lne if ll lees re t leels h or h Wht is mimm nmer of lees in inr tree of height? If inr tree hs 00 lees, ht is loer on on its height? If inr tree hs lees, ht is n pper on on its height? Eer fll tree mst e lne. tre or flse? Eer lne tree mst e fll. tre or flse? Instrtor: Işıl Dillig, CSH: Disrete Mthemtis Grph Theor II / Instrtor: Işıl Dillig, CSH: Disrete Mthemtis Grph Theor II /