# Section 10.4 Connectivity (up to paths and isomorphism, not including)

Size: px
Start display at page:

Transcription

1 Toy w will isuss two stions: Stion 10.3 Rprsnting Grphs n Grph Isomorphism Stion 10.4 Conntivity (up to pths n isomorphism, not inluing) 1

2 10.3 Rprsnting Grphs n Grph Isomorphism Whn w r working on n lgorithm for grphs, it is inonvnint to gt th grphs s piturs. Thrfor, thr r svrl wys to rprsnt grphs so tht thy oul sily pross. 2

3 10.3 Rprsnting Grphs n Grph Isomorphism Anothr issu: th sm grph n rwn iffrntly. G 1 = (V 1,E 1 ) G 2 = (V 2,E 2 ) grphs G 1 n G 2 hv th sm vrtis n th sm gs: V 1 = V 2, E 1 = E 2 In suh s w sy tht th grphs r isomorphi. Grph rprsnttion(s) n hlp us with it. 3

4 10.3 Rprsnting Grphs n Grph Isomorphism Ajny list rprsnttion: - spify vrtis tht r jnt to h vrtx in th grph G = (V,E) An jny list for simpl grph G Vrtx Ajnt vrtis 4

5 10.3 Rprsnting Grphs n Grph Isomorphism Ajny list rprsnttion: - spify vrtis tht r jnt to h vrtx in th grph G = (V,E) An jny list for simpl grph G Vrtx, Ajnt vrtis 5

6 10.3 Rprsnting Grphs n Grph Isomorphism Ajny list rprsnttion: - spify vrtis tht r jnt to h vrtx in th grph G = (V,E) An jny list for simpl grph G Vrtx,,, Ajnt vrtis 6

7 10.3 Rprsnting Grphs n Grph Isomorphism Ajny list rprsnttion: - spify vrtis tht r jnt to h vrtx in th grph G = (V,E) An jny list for simpl grph G Vrtx,,,, Ajnt vrtis 7

8 10.3 Rprsnting Grphs n Grph Isomorphism Ajny list rprsnttion: - spify vrtis tht r jnt to h vrtx in th grph G = (V,E) An jny list for simpl grph G Vrtx,,,,,,, Ajnt vrtis 8

9 10.3 Rprsnting Grphs n Grph Isomorphism Ajny list rprsnttion: - spify vrtis tht r jnt to h vrtx in th grph G = (V,E) An jny list for simpl grph G Vrtx,,,,,,,,, Ajnt vrtis 9

10 10.3 Rprsnting Grphs n Grph Isomorphism Ajny list rprsnttion: - spify vrtis tht r jnt to h vrtx in th grph G = (V,E) An jny list for simpl grph G Vrtx,,,,,,,,, Ajnt vrtis An jny list for simpl grph G 10

11 10.3 Rprsnting Grphs n Grph Isomorphism Ajny list rprsnttion: - spify vrtis tht r jnt to h vrtx in th grph G = (V,E) Lt's tlk out tim it tks to rt th jny list n to lot n lmnt in it. An jny list for simpl grph G 11

12 10.3 Rprsnting Grphs n Grph Isomorphism Ajny list rprsnttion: - spify vrtis tht r jnt to h vrtx in th grph G = (V,E) th tim rquir to list th nighors of vrtx v is proportionl to g(v), th numr of vrtis to list. Thrfor, th totl tim will proportionl to g(v) v V An jny list for simpl grph G 12

13 10.3 Rprsnting Grphs n Grph Isomorphism Ajny list rprsnttion: - spify vrtis tht r jnt to h vrtx in th grph G = (V,E) th tim rquir to list th nighors of vrtx v is proportionl to g(v), th numr of vrtis to list. g(v) v V to trmin if {, } is n g, it is nough to sn th list of 's nighors or th list of 's nighors. In th worst s, th tim rquir is proportionl to th min( g(),g()). An jny list for simpl grph G 13

14 10.3 Rprsnting Grphs n Grph Isomorphism Ajny list rprsnttion: For irt grphs it is similr An jny list for irt grph G Vrtx Ajnt vrtis G = (V,E) 14

15 10.3 Rprsnting Grphs n Grph Isomorphism Ajny list rprsnttion: For irt grphs it is similr An jny list for irt grph G Vrtx,,,,,, Ajnt vrtis G = (V,E) 15

16 10.3 Rprsnting Grphs n Grph Isomorphism Ajny list rprsnttion: For irt grphs it is similr An jny list for irt grph G Vrtx,,,,,, Ajnt vrtis G = (V,E) An jny list for simpl grph G 16

17 10.3 Rprsnting Grphs n Grph Isomorphism Ajny mtrix rprsnttion: - using zro-on mtris 1, if {v - ij = i,v j } E 0, othrwis - vrtis shoul orr - ij = 1, if (v i,v j ) E 0, othrwis 17

18 10.3 Rprsnting Grphs n Grph Isomorphism Ajny mtrix rprsnttion: - using zro-on mtris 1, if {v - ij = i,v j } E 0, othrwis - ij = 1, if (v i,v j ) E 0, othrwis - vrtis shoul orr G = (V,E) jny mtrix rprsnttion of th grph G 18

19 10.3 Rprsnting Grphs n Grph Isomorphism pg 676 / 25 Prti Is vry zro-on squr mtrix tht is symmtri n hs zros on th igonl h jny mtrix of simpl grph? 19

20 10.3 Rprsnting Grphs n Grph Isomorphism Grphs with multipl gs: - using zro-on mtris #of gs {v - ij = i,v j }, if {v i,v j } E 0, othrwis similrly for irt grphs - vrtis shoul orr G = (V,E) jny mtrix rprsnttion of th grph G 20

21 10.3 Rprsnting Grphs n Grph Isomorphism Whn to us jny lists/mtris? 21

22 10.3 Rprsnting Grphs n Grph Isomorphism Whn to us jny lists/mtris? For sprs grphs, tht ontin rltivly fw gs, jny lists r prfrr. For ns grphs, tht ontin mor thn hlf of ll possil gs, jny mtris r prfrr. 22

23 10.3 Rprsnting Grphs n Grph Isomorphism Whn to us jny lists/mtris? For sprs grphs, tht ontin rltivly fw gs, jny lists r prfrr. For ns grphs, tht ontin mor thn hlf of ll possil gs, jny mtris r prfrr. Som things to onsir: mtris ontin V 2 ntris (for ny typ of grph) jny lists us lss sp (for sprs grphs) 23

24 10.3 Rprsnting Grphs n Grph Isomorphism Whn to us jny lists/mtris? For sprs grphs, tht ontin rltivly fw gs, jny lists r prfrr. For ns grphs, tht ontin mor thn hlf of ll possil gs, jny mtris r prfrr. Som things to onsir: mtris ontin V 2 ntris (for ny typ of grph) jny lists us lss sp (for sprs grphs) To trmin whthr vrtx v i is jnt to v j : Mtris: just xmin ij ntry Lists: n rquir up to C V, C Z+ omprisons 24

25 10.3 Rprsnting Grphs n Grph Isomorphism Inin mtris is nothr ommon wy to rprsnt unirt grphs. Inin mtris n us to rprsnt unirt grphs with multipl gs. For vrtis v 1,...v n n gs 1,..., m, th inin mtrix with rspt of orring V n E is n m mtrix M = [m ij ], whr m ij = 1 whn g j is inint with v i, 0 othrwis 25

26 10.3 Rprsnting Grphs n Grph Isomorphism Inin mtris Exmpl:rprsnt th givn grph with inint mtrix 26

27 10.3 Rprsnting Grphs n Grph Isomorphism Inin mtris Exmpl:rprsnt th givn grph with inint mtrix vrtis orr: ,,,,

28 10.3 Rprsnting Grphs n Grph Isomorphism Inin mtris Exmpl:rprsnt th givn grph with inint mtrix vrtis orr: ,,,,

29 10.3 Rprsnting Grphs n Grph Isomorphism Inin mtris Exmpl:rprsnt th givn grph with inint mtrix vrtis orr: ,,,, loops r olumns with xtly on ntry qul to 1 29

30 10.3 Rprsnting Grphs n Grph Isomorphism Inin mtris Exmpl:rprsnt th givn grph with inint mtrix vrtis orr: ,,,, multipl gs r olumns with intil ntris 30

31 10.3 Rprsnting Grphs n Grph Isomorphism Pg 676 / 30 Prti Wht is th sum of th ntris in row of th inin mtrix for n unirt grph? 31

32 10.3 Rprsnting Grphs n Grph Isomorphism Isomorphism of Grphs Lt G = (V, E) n G'=(V',E') simpl grphs. G n G' r isomorphi if thr is ijtion f: V V' suh tht for vry pir of vrtis x, y V, {x, y} E if n only if {f(x), f(y)} E'. Th funtion f is ll n isomorphism from G to G'. Two simpl grphs tht r not isomorphi r ll nonisomorphi. 32

33 10.3 Rprsnting Grphs n Grph Isomorphism Isomorphism of Grphs Lt G = (V, E) n G'=(V',E') simpl grphs. G n G' r isomorphi if thr is ijtion f: V V' suh tht for vry pir of vrtis x, y V, {x, y} E if n only if {f(x), f(y)} E'. Th funtion f is ll n isomorphism from G to G'. Two simpl grphs tht r not isomorphi r ll nonisomorphi G 1 = (V 1,E 1 ) G 2 = (V 2,E 2 ) 33

34 10.3 Rprsnting Grphs n Grph Isomorphism Isomorphism of Grphs Lt G = (V, E) n G'=(V',E') simpl grphs. G n G' r isomorphi if thr is ijtion f: V V' suh tht for vry pir of vrtis x, y V, {x, y} E if n only if {f(x), f(y)} E'. Th funtion f is ll n isomorphism from G to G'. Two simpl grphs tht r not isomorphi r ll nonisomorphi. f: V 1 V G 1 = (V 1,E 1 ) 3 G 2 = (V 2,E 2 ) 34

35 10.3 Rprsnting Grphs n Grph Isomorphism Isomorphism of Grphs Lt G = (V, E) n G'=(V',E') simpl grphs. G n G' r isomorphi if thr is ijtion f: V V' suh tht for vry pir of vrtis x, y V, {x, y} E if n only if {f(x), f(y)} E'. Th funtion f is ll n isomorphism from G to G'. Two simpl grphs tht r not isomorphi r ll nonisomorphi. f: V 1 V G 1 = (V 1,E 1 ) 3 G 2 = (V 2,E 2 ) 35

36 10.3 Rprsnting Grphs n Grph Isomorphism Isomorphism of Grphs Lt G = (V, E) n G'=(V',E') simpl grphs. G n G' r isomorphi if thr is ijtion f: V V' suh tht for vry pir of vrtis x, y V, {x, y} E if n only if {f(x), f(y)} E'. Th funtion f is ll n isomorphism from G to G'. Two simpl grphs tht r not isomorphi r ll nonisomorphi. f: V 1 V G 1 = (V 1,E 1 ) 3 G 2 = (V 2,E 2 ) G 1 n G 2 r isomorphi 36

37 10.3 Rprsnting Grphs n Grph Isomorphism How to hk tht two grphs r isomorphi? To show tht funtion f :V 1 V 2 is n isomorphism w n to show tht f prsrvs th prsn n th sn of gs. On wy to o it: jny mtris 37

38 10.3 Rprsnting Grphs n Grph Isomorphism How to hk tht two grphs r isomorphi? To show tht funtion f :V 1 V 2 is n isomorphism w n to show tht f prsrvs th prsn n th sn of gs. On wy to o it: jny mtris G 1 = (V 1,E 1 ) f: V 1 V G 2 = (V 2,E 2 ) 38

39 10.3 Rprsnting Grphs n Grph Isomorphism How to hk tht two grphs r isomorphi? To show tht funtion f :V 1 V 2 is n isomorphism w n to show tht f prsrvs th prsn n th sn of gs. On wy to o it: jny mtris G 1 = (V 1,E 1 ) f: V 1 V G 2 = (V 2,E 2 ) 39

40 10.3 Rprsnting Grphs n Grph Isomorphism How to hk tht two grphs r isomorphi? To show tht funtion f :V 1 V 2 is n isomorphism w n to show tht f prsrvs th prsn n th sn of gs. On wy to o it: jny mtris G 1 = (V 1,E 1 ) f: V 1 V Mtris r qul G 2 = (V 2,E 2 )

41 10.3 Rprsnting Grphs n Grph Isomorphism How to hk tht two grphs r isomorphi? To show tht funtion f :V 1 V 2 is n isomorphism w n to show tht f prsrvs th prsn n th sn of gs. On wy to o it: jny mtris G 1 = (V 1,E 1 ) f: V 1 V G 2 = (V 2,E 2 )

42 10.3 Rprsnting Grphs n Grph Isomorphism How to hk tht two grphs r isomorphi? To show tht funtion f :V 1 V 2 is n isomorphism w n to show tht f prsrvs th prsn n th sn of gs. On wy to o it: jny mtris Drwk: if th givn funtion is not n isomorphism, it osn't gurnt tht two grphs r not isomorphi. Thr might nothr orrsponn of th vrtis in grphs tht is n isomorphism. 42

43 10.3 Rprsnting Grphs n Grph Isomorphism How to hk tht two grphs r isomorphi? To show tht funtion f :V 1 V 2 is n isomorphism w n to show tht f prsrvs th prsn n th sn of gs. On wy to o it: jny mtris Drwk: if th givn funtion is not n isomorphism, it osn't gurnt tht two grphs r not isomorphi. Thr might nothr orrsponn of th vrtis in grphs tht is n isomorphism. Th st lgorithms known for trmining whthr two grphs r isomorphi hv xponntil worst-s tim omplxity (in V ). W wnt polynomil on. 43

44 10.3 Rprsnting Grphs n Grph Isomorphism How to hk tht two grphs r isomorphi? If w r not givn orrsponn (funtion f) to hk, thn thr r V! possil ijtions (on-toon orrsponns) to hk, whih is imprtil for lrg V. Lt V = n v 1 n options v 2 (n-1) options v n 1 option Thrfor, w gt n (n-1) (n-2)... 1 = n! 44

45 10.3 Rprsnting Grphs n Grph Isomorphism How to hk tht two grphs r isomorphi? Somtims, it is sy to s tht two grphs r not isomorphi: hk th numr of vrtis n th numr of gs, thy shoul qul oringly. V 1 = V 2 E 1 = E 2 Also, th grs of vrtis in isomorphi grphs must th sm. grph invrint is proprty prsrv y isomorphism. Proprtis ov r grph invrints. 45

46 10.3 Rprsnting Grphs n Grph Isomorphism How to hk tht two grphs r isomorphi? Somtims, it is sy to s tht two grphs r not isomorphi: hk th numr of vrtis n th numr of gs, thy shoul qul oringly. V 1 = V 2 E 1 = E 2 th grs of vrtis in isomorphi grphs must th sm G 1 = (V 1,E 1 ) G 2 = (V 2,E 2 ) 3 46

47 10.3 Rprsnting Grphs n Grph Isomorphism How to hk tht two grphs r isomorphi? Somtims, it is sy to s tht two grphs r not isomorphi: hk th numr of vrtis n th numr of gs, thy shoul qul oringly. V 1 = V 2 E 1 = E 2 th grs of vrtis in isomorphi grphs must th sm G 1 = (V 1,E 1 ) G 2 = (V 2,E 2 ) 3 grphs r not isomorphi, us E 1 = 6, E 2 = 7 47

48 10.3 Rprsnting Grphs n Grph Isomorphism pg 677 / 57() Prti Ar th simpl grphs with th following jny mtris isomorphi?

49 10.3 Rprsnting Grphs n Grph Isomorphism pg 677 / 45 Prti Show tht isomorphism of simpl grphs is n quivln rltionship. (rll tht quivln rltion if it is rflxiv, symmtri n trnsitiv.) 49

50 10.3 Rprsnting Grphs n Grph Isomorphism Applitions of grph isomorphisms Chmistry: To mol hmil ompouns hmists us multigrphs, known s molulr grphs. vrtis: toms gs: hmil ouns twn th toms Two struturl isomrs, moluls with intil molulr formuls ut with toms on iffrntly, hv nonisomorphi molulr grphs. Whn potntilly nw hmil ompoun is synthsiz, ts of molulr grphs is hk to s whthr th molulr grph of th ompoun is th sm s on lry known. 50

51 10.3 Rprsnting Grphs n Grph Isomorphism Applitions of grph isomorphisms Eltril nginring: Eltroni iruits r mol using grphs whih vrtis: omponnts gs: onntions twn omponnts Morn intgrt iruits (hips) r minituriz ltroni iruits, oftn with millions of trnsistors n onntions twn thm. Automtion tools r us to sign hips us of th omplxity. Grph isomorphism is th sis for th vrifition tht prtiulr lyout of iruit prou y n utomt 51 tools orrspons to th originl shmtis of th sign.

52 10.3 Rprsnting Grphs n Grph Isomorphism Applitions of grph isomorphisms Eltril nginring: Eltroni iruits r mol using grphs whih vrtis: omponnts gs: onntions twn omponnts Morn intgrt iruits (hips) r minituriz ltroni iruits, oftn with millions of trnsistors n onntions twn thm. Automtion tools r us to sign hips us of th omplxity. Grph isomorphism n lso us to trmin whthr hip from on ompny inlus intlltul proprty from iffrnt vnor y looking for lrg isomorphi sugrphs in th grphs moling ths hips. 52

53 10.4 Conntivity A pth from u to v in n unirt grph G is squn of gs of G tht strts t vrtx u n ns t vrtx v: {u,v 1 }, {v 1,v 2 },..., {v n-1,v} A pth n lso not y th squn of vrtis u, v1,..., v whn th grph is simpl. 53

54 10.4 Conntivity A pth from u to v in n unirt grph G is squn of gs of G tht strts t vrtx u n ns t vrtx v: {u,v 1 }, {v 1,v 2 },..., {v n-1,v} A pth n lso not y th squn of vrtis u, v1,..., v whn th grph is simpl. Th lngth of pth is th numr of gs in th wlk. 54

55 10.4 Conntivity A pth from u to v in n unirt grph G is squn of gs of G tht strts t vrtx u n ns t vrtx v: {u,v 1 }, {v 1,v 2 },..., {v n-1,v} A pth n lso not y th squn of vrtis u, v1,..., v whn th grph is simpl. Th lngth of pth is th numr of gs in th wlk. Th pth is iruit if it gins n ns t th sm vrtx, i.. u = v, n hs lngth grtr thn zro. 55

56 10.4 Conntivity A pth from u to v in n unirt grph G is squn of gs of G tht strts t vrtx u n ns t vrtx v: {u,v 1 }, {v 1,v 2 },..., {v n-1,v} A pth n lso not y th squn of vrtis u, v1,..., v whn th grph is simpl. Th lngth of pth is th numr of gs in th wlk. Th pth is iruit if it gins n ns t th sm vrtx, i.. u = v, n hs lngth grtr thn zro. A pth / iruit is si to pss through th vrtis u, v 1, v 2,..., v n-1, v or trvrs th gs 1,, n. 56

57 10.4 Conntivity A pth from u to v in n unirt grph G is squn of gs of G tht strts t vrtx u n ns t vrtx v: {u,v 1 }, {v 1,v 2 },..., {v n-1,v} A pth n lso not y th squn of vrtis u, v1,..., v whn th grph is simpl. Th lngth of pth is th numr of gs in th wlk. Th pth is iruit if it gins n ns t th sm vrtx, i.. u = v, n hs lngth grtr thn zro. A pth / iruit is si to pss through th vrtis u, v 1, v 2,..., v n-1, v or trvrs th gs 1,, n. A pth or iruit is simpl if it osn't ontin th sm g mor thn on. 57

58 10.4 Conntivity A pth of lngth zro onsists of singl vrtx. Whn w o not istinguish twn multipl gs: w will not pth 1, 2,, n, whr i is ssoit with { x i-1,x i } for i = 1, 2,, n y its vrtx squn x 1, x 2,, x n not tht it is not uniqu pth pth:,,, pth:,,, 58

59 10.4 Conntivity A pth from u to v in irt grph G is squn of gs of G tht strts t vrtx u n ns t vrtx v: (u,v 1 ), (v 1,v 2 ),..., (v n-1,v) A pth n lso not y th squn of vrtis u, v1,..., v whn thr is no multipl gs. Th lngth of pth is th numr of gs in th wlk. f pth: (,f), (f,), (,), (,) or pth:, f,,, lngth of th pth: 4 59

60 10.4 Conntivity Th pth is iruit / yl if it gins n ns t th sm vrtx, i.. u = v, n hs lngth grtr thn zro. A pth / iruit is si to pss through th vrtis u, v 1, v 2,..., v n-1, v or trvrs th gs 1,, n. A pth or iruit is simpl if it osn't ontin th sm g mor thn on. f pth: (,f), (f,), (,), (,), (,), (,), (,) or pth:, f,,,,,, lngth of th pth: 7 60

61 10.4 Conntivity A pth of lngth zro onsists of singl vrtx. Whn w o not istinguish twn multipl gs: w will not pth 1, 2,, n, whr i is ssoit with { x i-1,x i } for i = 1, 2,, n y its vrtx squn x 1, x 2,, x n not tht it is not uniqu pth f pth:, f,,, f pth:, f,,, 61

62 10.4 Conntivity Mny prolms n mol with pths form y trvling long th gs of th grphs. Exmpls: - mssg xhng twn two omputrs - plnning ffiiny routs for livris, grg pikup, n so forth. 62

63 10.4 Conntivity Mor xmpls: Pths in quintnship grphs: Thr is pth twn two popl if thr is hin of popl linking thm. Mny soil sintists hv onjtur tht lmost vry pir of popl in th worl r link y smll hin of popl, prhps ontining just 5 or fwr popl. Th ply Six Dgrs of Sprtion, writtn y Amrin plywright John Gur tht prmir in 1990, xplors th xistntil prmis tht vryon in th worl is onnt to vryon ls in th worl y hin of no mor thn six quintns, thus, "six grs of 63 sprtion".

64 10.4 Conntivity Conntnss in unirt grphs: [Df] n unirt grph is onnt if thr is pth twn vry pir of istint vrtis of th grph. 64

65 10.4 Conntivity Conntnss in unirt grphs: [Df] n unirt grph is onnt if thr is pth twn vry pir of istint vrtis of th grph. An unirt grph whih is not onnt is ll isonnt. 65

66 10.4 Conntivity Conntnss in unirt grphs: [Df] n unirt grph is onnt if thr is pth twn vry pir of istint vrtis of th grph. An unirt grph whih is not onnt is ll isonnt. To isonnt grph: rmov vrtis or gs, or oth, to prou isonnt grph. 66

67 10.4 Conntivity Conntnss in unirt grphs: [Df] n unirt grph is onnt if thr is pth twn vry pir of istint vrtis of th grph. An unirt grph whih is not onnt is ll isonnt. To isonnt grph: rmov vrtis or gs, or oth, to prou isonnt grph. Exmpl: ny two omputrs in ntwork n ommunit if n only if th grph of this ntwork is onnt. 67

68 10.4 Conntivity Conntnss in unirt grphs: Exmpls: f onnt grph f isonnt grph 68

69 10.4 Conntivity Conntnss in unirt grphs: [Thorm] thr is simpl pth twn ny pir of istint vrtis of n unirt onnt grph. 69

70 10.4 Conntivity Conntnss in unirt grphs: [Thorm] thr is simpl pth twn ny pir of istint vrtis of n unirt onnt grph. Proof: Lt G = (V,E) unirt onnt grph,n lt u,v V. 70

71 10.4 Conntivity Conntnss in unirt grphs: [Thorm] thr is simpl pth twn ny pir of istint vrtis of n unirt onnt grph. Proof: Lt G = (V,E) unirt onnt grph,n lt u,v V. G is onnt, thrfor thr is t lst on pth twn u n v. Lt x 0 = u, x 1,, x n = v pth twn vrtis u n v of lst lngth. 71

72 10.4 Conntivity Conntnss in unirt grphs: [Thorm] thr is simpl pth twn ny pir of istint vrtis of n unirt onnt grph. Proof: Lt G = (V,E) unirt onnt grph,n lt u,v V. G is onnt, thrfor thr is t lst on pth twn u n v. Lt x 0 = u, x 1,, x n = v pth twn vrtis u n v of lst lngth. This pth must simpl. 72

73 10.4 Conntivity Conntnss in unirt grphs: [Thorm] thr is simpl pth twn ny pir of istint vrtis of n unirt onnt grph. Proof: Lt G = (V,E) unirt onnt grph,n lt u,v V. G is onnt, thrfor thr is t lst on pth twn u n v. Lt x 0 = u, x 1,, x n = v pth twn vrtis u n v of lst lngth. This pth must simpl. Assum it is not so. 73

74 10.4 Conntivity Conntnss in unirt grphs: [Thorm] thr is simpl pth twn ny pir of istint vrtis of n unirt onnt grph. Proof: Lt G = (V,E) unirt onnt grph,n lt u,v V. G is onnt, thrfor thr is t lst on pth twn u n v. Lt x 0 = u, x 1,, x n = v pth twn vrtis u n v of lst lngth. This pth must simpl. Assum it is not so. Thn, for som i,j with 0 i <j, x i = x j. v v lt th u f gs u f 74

75 10.4 Conntivity Conntnss in unirt grphs: [Thorm] thr is simpl pth twn ny pir of istint vrtis of n unirt onnt grph. Proof: Lt G = (V,E) unirt onnt grph,n lt u,v V. G is onnt, thrfor thr is t lst on pth twn u n v. Lt x 0 = u, x 1,, x n = v pth twn vrtis u n v of lst lngth. This pth must simpl. Assum it is not so. Thn, for som i,j with 0 i <j, x i = x j. So lt's lt th gs orrsponing to th squn x i,...,x j-1 from th pth w will gt th pth x 1,...,x i-1,x j,...,x n of smllr lngth this ontrits our ssumption. 75 Thrfor, th pth x 0 = u, x 1,, x n = v is simpl. q...

76 10.4 Conntivity Connt omponnts [Df] sugrph of grph G = (V,E) is grph H=(W,F) whr W V, F E. Grph H is propr sugrph of G is H G. [Df] A onnt omponnt of grph G is onnt sugrph of G tht is not propr sugrph of nothr onnt sugrph of G. i.. mximl onnt sugrph of G. H 2 H H 1 3 G grph G n its onnt omponnts H 1, H 2, n H 3. 76

77 10.4 Conntivity How onnt is th grph? Imgin grph rprsnting omputr ntwork. If it is onnt, thn ny two omputrs n ommunit. Howvr, w n to know how rlil th ntwork is. If on ommunition link fils, will ll omputr still l to ommunit with h othr? 77

78 10.4 Conntivity How onnt is th grph? If vrtx n ll inint gs r rmov from th grph, n th prou sugrph hs mor onnt omponnts, thn suh vrtx is ll ut vrtx or rtiultion point. Th rmovl of ut vrtx from onnt grph prous unonnt sugrph. 78

79 10.4 Conntivity How onnt is th grph? If n g rmov from th grph prous sugrph with mor onnt omponnts thn in th originl grph, thn suh n g is ll ut g or rig. In omputr ntwork grph, ut vrtx n ut g rprsnt n ssntil routr n n ssntil link tht nnot fil for ll omputrs to l to ommunit. Not ll grphs hv ut vrtis or ut g. Suh grphs r ll nonsprl grphs. 79

80 10.4 Conntivity How onnt is th grph? Exmpl: Fin th ut vrtis n ut gs in th grph low. K 4 80

81 10.4 Conntivity How onnt is th grph? Exmpl: Fin th ut vrtis n ut gs in th grph low. onnt grph K 4 K 3 Hn K 4 osn't hv ut vrtis 81

82 10.4 Conntivity How onnt is th grph? Exmpl: Fin th ut vrtis n ut gs in th grph low. onnt grphs K 4 Hn K 4 osn't hv ut gs ithr 82

83 10.4 Conntivity How onnt is th grph? Exmpl: Fin th ut vrtis n ut gs in th grph low. K 4 nonsprl grph 83

84 10.4 Conntivity How onnt is th grph? Exmpl: Fin th ut vrtis n ut gs in th grph low. G 84

85 10.4 Conntivity How onnt is th grph? Exmpl: Fin th ut vrtis n ut gs in th grph low. ut vrtis:,,,f,g h g G f 85

86 10.4 Conntivity How onnt is th grph? Exmpl: Fin th ut vrtis n ut gs in th grph low. ut gs: (,), (,), (,), (f,), h g G f 86

87 10.4 Conntivity How onnt is th grph? Exmpl: Fin th ut vrtis n ut gs in th grph low. ut gs:..., (f,), (,g), (g,h) h g f 87

### Paths. Connectivity. Euler and Hamilton Paths. Planar graphs.

Pths.. Eulr n Hmilton Pths.. Pth D. A pth rom s to t is squn o gs {x 0, x 1 }, {x 1, x 2 },... {x n 1, x n }, whr x 0 = s, n x n = t. D. Th lngth o pth is th numr o gs in it. {, } {, } {, } {, } {, } {,

### Graphs. CSC 1300 Discrete Structures Villanova University. Villanova CSC Dr Papalaskari

Grphs CSC 1300 Disrt Struturs Villnov Univrsity Grphs Grphs r isrt struturs onsis?ng of vr?s n gs tht onnt ths vr?s. Grphs n us to mol: omputr systms/ntworks mthm?l rl?ons logi iruit lyout jos/prosss f

### Graphs. Graphs. Graphs: Basic Terminology. Directed Graphs. Dr Papalaskari 1

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

### V={A,B,C,D,E} E={ (A,D),(A,E),(B,D), (B,E),(C,D),(C,E)}

Introution Computr Sin & Enginring 423/823 Dsign n Anlysis of Algorithms Ltur 03 Elmntry Grph Algorithms (Chptr 22) Stphn Sott (Apt from Vinohnrn N. Vriym) I Grphs r strt t typs tht r pplil to numrous

### 12/3/12. Outline. Part 10. Graphs. Circuits. Euler paths/circuits. Euler s bridge problem (Bridges of Konigsberg Problem)

12/3/12 Outlin Prt 10. Grphs CS 200 Algorithms n Dt Struturs Introution Trminology Implmnting Grphs Grph Trvrsls Topologil Sorting Shortst Pths Spnning Trs Minimum Spnning Trs Ciruits 1 Ciruits Cyl 2 Eulr

### 5/9/13. Part 10. Graphs. Outline. Circuits. Introduction Terminology Implementing Graphs

Prt 10. Grphs CS 200 Algorithms n Dt Struturs 1 Introution Trminology Implmnting Grphs Outlin Grph Trvrsls Topologil Sorting Shortst Pths Spnning Trs Minimum Spnning Trs Ciruits 2 Ciruits Cyl A spil yl

### V={A,B,C,D,E} E={ (A,D),(A,E),(B,D), (B,E),(C,D),(C,E)}

s s of s Computr Sin & Enginring 423/823 Dsign n Anlysis of Ltur 03 (Chptr 22) Stphn Sott (Apt from Vinohnrn N. Vriym) s of s s r strt t typs tht r pplil to numrous prolms Cn ptur ntitis, rltionships twn

### An undirected graph G = (V, E) V a set of vertices E a set of unordered edges (v,w) where v, w in V

Unirt Grphs An unirt grph G = (V, E) V st o vrtis E st o unorr gs (v,w) whr v, w in V USE: to mol symmtri rltionships twn ntitis vrtis v n w r jnt i thr is n g (v,w) [or (w,v)] th g (v,w) is inint upon

### CS200: Graphs. Graphs. Directed Graphs. Graphs/Networks Around Us. What can this represent? Sometimes we want to represent directionality:

CS2: Grphs Prihr Ch. 4 Rosn Ch. Grphs A olltion of nos n gs Wht n this rprsnt? n A omputr ntwork n Astrtion of mp n Soil ntwork CS2 - Hsh Tls 2 Dirt Grphs Grphs/Ntworks Aroun Us A olltion of nos n irt

### CSE 373: More on graphs; DFS and BFS. Michael Lee Wednesday, Feb 14, 2018

CSE 373: Mor on grphs; DFS n BFS Mihl L Wnsy, F 14, 2018 1 Wrmup Wrmup: Disuss with your nighor: Rmin your nighor: wht is simpl grph? Suppos w hv simpl, irt grph with x nos. Wht is th mximum numr of gs

### Graph Isomorphism. Graphs - II. Cayley s Formula. Planar Graphs. Outline. Is K 5 planar? The number of labeled trees on n nodes is n n-2

Grt Thortil Is In Computr Sin Vitor Amhik CS 15-251 Ltur 9 Grphs - II Crngi Mllon Univrsity Grph Isomorphism finition. Two simpl grphs G n H r isomorphi G H if thr is vrtx ijtion V H ->V G tht prsrvs jny

### Math 61 : Discrete Structures Final Exam Instructor: Ciprian Manolescu. You have 180 minutes.

Nm: UCA ID Numr: Stion lttr: th 61 : Disrt Struturs Finl Exm Instrutor: Ciprin nolsu You hv 180 minuts. No ooks, nots or lultors r llow. Do not us your own srth ppr. 1. (2 points h) Tru/Fls: Cirl th right

### CS 241 Analysis of Algorithms

CS 241 Anlysis o Algorithms Prossor Eri Aron Ltur T Th 9:00m Ltur Mting Lotion: OLB 205 Businss HW6 u lry HW7 out tr Thnksgiving Ring: Ch. 22.1-22.3 1 Grphs (S S. B.4) Grphs ommonly rprsnt onntions mong

### Outline. Circuits. Euler paths/circuits 4/25/12. Part 10. Graphs. Euler s bridge problem (Bridges of Konigsberg Problem)

4/25/12 Outlin Prt 10. Grphs CS 200 Algorithms n Dt Struturs Introution Trminology Implmnting Grphs Grph Trvrsls Topologil Sorting Shortst Pths Spnning Trs Minimum Spnning Trs Ciruits 1 2 Eulr s rig prolm

### Module graph.py. 1 Introduction. 2 Graph basics. 3 Module graph.py. 3.1 Objects. CS 231 Naomi Nishimura

Moul grph.py CS 231 Nomi Nishimur 1 Introution Just lik th Python list n th Python itionry provi wys of storing, ssing, n moifying t, grph n viw s wy of storing, ssing, n moifying t. Bus Python os not

### CS 461, Lecture 17. Today s Outline. Example Run

Prim s Algorithm CS 461, Ltur 17 Jr Si Univrsity o Nw Mxio In Prim s lgorithm, th st A mintin y th lgorithm orms singl tr. Th tr strts rom n ritrry root vrtx n grows until it spns ll th vrtis in V At h

### The University of Sydney MATH2969/2069. Graph Theory Tutorial 5 (Week 12) Solutions 2008

Th Univrsity o Syny MATH2969/2069 Grph Thory Tutoril 5 (Wk 12) Solutions 2008 1. (i) Lt G th isonnt plnr grph shown. Drw its ul G, n th ul o th ul (G ). (ii) Show tht i G is isonnt plnr grph, thn G is

### 1. Determine whether or not the following binary relations are equivalence relations. Be sure to justify your answers.

Mth 0 Exm - Prti Prolm Solutions. Dtrmin whthr or not th ollowing inry rltions r quivln rltions. B sur to justiy your nswrs. () {(0,0),(0,),(0,),(,),(,),(,),(,),(,0),(,),(,),(,0),(,),(.)} on th st A =

### CSC Design and Analysis of Algorithms. Example: Change-Making Problem

CSC 801- Dsign n Anlysis of Algorithms Ltur 11 Gry Thniqu Exmpl: Chng-Mking Prolm Givn unlimit mounts of oins of nomintions 1 > > m, giv hng for mount n with th lst numr of oins Exmpl: 1 = 25, 2 =10, =

### b. How many ternary words of length 23 with eight 0 s, nine 1 s and six 2 s?

MATH 3012 Finl Exm, My 4, 2006, WTT Stunt Nm n ID Numr 1. All our prts o this prolm r onrn with trnry strings o lngth n, i.., wors o lngth n with lttrs rom th lpht {0, 1, 2}.. How mny trnry wors o lngth

### CSE 373. Graphs 1: Concepts, Depth/Breadth-First Search reading: Weiss Ch. 9. slides created by Marty Stepp

CSE 373 Grphs 1: Conpts, Dpth/Brth-First Srh ring: Wiss Ch. 9 slis rt y Mrty Stpp http://www.s.wshington.u/373/ Univrsity o Wshington, ll rights rsrv. 1 Wht is grph? 56 Tokyo Sttl Soul 128 16 30 181 140

### Garnir Polynomial and their Properties

Univrsity of Cliforni, Dvis Dprtmnt of Mthmtis Grnir Polynomil n thir Proprtis Author: Yu Wng Suprvisor: Prof. Gorsky Eugny My 8, 07 Grnir Polynomil n thir Proprtis Yu Wng mil: uywng@uvis.u. In this ppr,

### CS61B Lecture #33. Administrivia: Autograder will run this evening. Today s Readings: Graph Structures: DSIJ, Chapter 12

Aministrivi: CS61B Ltur #33 Autogrr will run this vning. Toy s Rings: Grph Struturs: DSIJ, Chptr 12 Lst moifi: W Nov 8 00:39:28 2017 CS61B: Ltur #33 1 Why Grphs? For xprssing non-hirrhilly rlt itms Exmpls:

### Why the Junction Tree Algorithm? The Junction Tree Algorithm. Clique Potential Representation. Overview. Chris Williams 1.

Why th Juntion Tr lgorithm? Th Juntion Tr lgorithm hris Willims 1 Shool of Informtis, Univrsity of Einurgh Otor 2009 Th JT is gnrl-purpos lgorithm for omputing (onitionl) mrginls on grphs. It os this y

### Algorithmic and NP-Completeness Aspects of a Total Lict Domination Number of a Graph

Intrntionl J.Mth. Comin. Vol.1(2014), 80-86 Algorithmi n NP-Compltnss Aspts of Totl Lit Domintion Numr of Grph Girish.V.R. (PES Institut of Thnology(South Cmpus), Bnglor, Krntk Stt, Ini) P.Ush (Dprtmnt

### Numbering Boundary Nodes

Numring Bounry Nos Lh MBri Empori Stt Univrsity August 10, 2001 1 Introution Th purpos of this ppr is to xplor how numring ltril rsistor ntworks ffts thir rspons mtrix, Λ. Morovr, wht n lrn from Λ out

### Chapter 9. Graphs. 9.1 Graphs

Chptr 9 Grphs Grphs r vry gnrl lss of ojt, us to formliz wi vrity of prtil prolms in omputr sin. In this hptr, w ll s th sis of (finit) unirt grphs, inluing grph isomorphism, onntivity, n grph oloring.

### Planar Upward Drawings

C.S. 252 Pro. Rorto Tmssi Computtionl Gomtry Sm. II, 1992 1993 Dt: My 3, 1993 Sri: Shmsi Moussvi Plnr Upwr Drwings 1 Thorm: G is yli i n only i it hs upwr rwing. Proo: 1. An upwr rwing is yli. Follow th

### Cycles and Simple Cycles. Paths and Simple Paths. Trees. Problem: There is No Completely Standard Terminology!

Outlin Computr Sin 331, Spnnin, n Surphs Mik Joson Dprtmnt o Computr Sin Univrsity o Clry Ltur #30 1 Introution 2 3 Dinition 4 Spnnin 5 6 Mik Joson (Univrsity o Clry) Computr Sin 331 Ltur #30 1 / 20 Mik

### Outline. 1 Introduction. 2 Min-Cost Spanning Trees. 4 Example

Outlin Computr Sin 33 Computtion o Minimum-Cost Spnnin Trs Prim's Alorithm Introution Mik Joson Dprtmnt o Computr Sin Univrsity o Clry Ltur #33 3 Alorithm Gnrl Constrution Mik Joson (Univrsity o Clry)

### Constructive Geometric Constraint Solving

Construtiv Gomtri Constrint Solving Antoni Soto i Rir Dprtmnt Llngutgs i Sistms Inormàtis Univrsitt Politèni Ctluny Brlon, Sptmr 2002 CGCS p.1/37 Prliminris CGCS p.2/37 Gomtri onstrint prolm C 2 D L BC

### 0.1. Exercise 1: the distances between four points in a graph

Mth 707 Spring 2017 (Drij Grinrg): mitrm 3 pg 1 Mth 707 Spring 2017 (Drij Grinrg): mitrm 3 u: W, 3 My 2017, in lss or y mil (grinr@umn.u) or lss S th wsit or rlvnt mtril. Rsults provn in th nots, or in

### 1 Introduction to Modulo 7 Arithmetic

1 Introution to Moulo 7 Arithmti Bor w try our hn t solvin som hr Moulr KnKns, lt s tk los look t on moulr rithmti, mo 7 rithmti. You ll s in this sminr tht rithmti moulo prim is quit irnt rom th ons w

### Graph Theory. Vertices. Vertices are also known as nodes, points and (in social networks) as actors, agents or players.

Stphn P. Borgtti Grph Thory A lthough grph thory is on o th youngr rnhs o mthmtis, it is unmntl to numr o ppli ils, inluing oprtions rsrh, omputr sin, n soil ntwork nlysis. In this hptr w isuss th si onpts

### Exam 1 Solution. CS 542 Advanced Data Structures and Algorithms 2/14/2013

CS Avn Dt Struturs n Algorithms Exm Solution Jon Turnr //. ( points) Suppos you r givn grph G=(V,E) with g wights w() n minimum spnning tr T o G. Now, suppos nw g {u,v} is to G. Dsri (in wors) mtho or

### (2) If we multiplied a row of B by λ, then the value is also multiplied by λ(here lambda could be 0). namely

. DETERMINANT.. Dtrminnt. Introution:I you think row vtor o mtrix s oorint o vtors in sp, thn th gomtri mning o th rnk o th mtrix is th imnsion o th prlllppi spnn y thm. But w r not only r out th imnsion,

### Weighted graphs -- reminder. Data Structures LECTURE 15. Shortest paths algorithms. Example: weighted graph. Two basic properties of shortest paths

Dt Strutur LECTURE Shortt pth lgorithm Proprti of hortt pth Bllmn-For lgorithm Dijktr lgorithm Chptr in th txtook (pp ). Wight grph -- rminr A wight grph i grph in whih g hv wight (ot) w(v i, v j ) >.

### , each of which is a tree, and whose roots r 1. , respectively, are children of r. Data Structures & File Management

nrl tr T is init st o on or mor nos suh tht thr is on sint no r, ll th root o T, n th rminin nos r prtition into n isjoint susts T, T,, T n, h o whih is tr, n whos roots r, r,, r n, rsptivly, r hilrn o

### N=4 L=4. Our first non-linear data structure! A graph G consists of two sets G = {V, E} A set of V vertices, or nodes f

lulu jwtt pnlton sin towr ounrs hpl lpp lu Our irst non-linr t strutur! rph G onsists o two sts G = {V, E} st o V vrtis, or nos st o E s, rltionships twn nos surph G onsists o sust o th vrtis n s o G jnt

### Present state Next state Q + M N

Qustion 1. An M-N lip-lop works s ollows: I MN=00, th nxt stt o th lip lop is 0. I MN=01, th nxt stt o th lip-lop is th sm s th prsnt stt I MN=10, th nxt stt o th lip-lop is th omplmnt o th prsnt stt I

### Outline. Computer Science 331. Computation of Min-Cost Spanning Trees. Costs of Spanning Trees in Weighted Graphs

Outlin Computr Sin 33 Computtion o Minimum-Cost Spnnin Trs Prim s Mik Joson Dprtmnt o Computr Sin Univrsity o Clry Ltur #34 Introution Min-Cost Spnnin Trs 3 Gnrl Constrution 4 5 Trmintion n Eiiny 6 Aitionl

### 12. Traffic engineering

lt2.ppt S-38. Introution to Tltrffi Thory Spring 200 2 Topology Pths A tlommunition ntwork onsists of nos n links Lt N not th st of nos in with n Lt J not th st of nos in with j N = {,,,,} J = {,2,3,,2}

### 5/7/13. Part 10. Graphs. Theorem Theorem Graphs Describing Precedence. Outline. Theorem 10-1: The Handshaking Theorem

Thorm 10-1: Th Hnshkin Thorm Lt G=(V,E) n unirt rph. Thn Prt 10. Grphs CS 200 Alorithms n Dt Struturs v V (v) = 2 E How mny s r thr in rph with 10 vrtis h of r six? 10 * 6 /2= 30 1 Thorm 10-2 An unirt

### More Foundations. Undirected Graphs. Degree. A Theorem. Graphs, Products, & Relations

Mr Funtins Grphs, Pruts, & Rltins Unirt Grphs An unirt grph is pir f 1. A st f ns 2. A st f gs (whr n g is st f tw ns*) Friy, Sptmr 2, 2011 Ring: Sipsr 0.2 ginning f 0.4; Stughtn 1.1.5 ({,,,,}, {{,}, {,},

### COMP108 Algorithmic Foundations

Grdy mthods Prudn Wong http://www.s.liv..uk/~pwong/thing/omp108/01617 Coin Chng Prolm Suppos w hv 3 typs of oins 10p 0p 50p Minimum numr of oins to mk 0.8, 1.0, 1.? Grdy mthod Lrning outoms Undrstnd wht

### Solutions for HW11. Exercise 34. (a) Use the recurrence relation t(g) = t(g e) + t(g/e) to count the number of spanning trees of v 1

Solutions for HW Exris. () Us th rurrn rltion t(g) = t(g ) + t(g/) to ount th numr of spnning trs of v v v u u u Rmmr to kp multipl gs!! First rrw G so tht non of th gs ross: v u v Rursing on = (v, u ):

### COMPLEXITY OF COUNTING PLANAR TILINGS BY TWO BARS

OMPLXITY O OUNTING PLNR TILINGS Y TWO RS KYL MYR strt. W show tht th prolm o trmining th numr o wys o tiling plnr igur with horizontl n vrtil r is #P-omplt. W uil o o th rsults o uquir, Nivt, Rmil, n Roson

### Trees as operads. Lecture A formalism of trees

Ltur 2 rs s oprs In this ltur, w introu onvnint tgoris o trs tht will us or th inition o nroil sts. hs tgoris r gnrliztions o th simpliil tgory us to in simpliil sts. First w onsir th s o plnr trs n thn

### CSE 373: AVL trees. Warmup: Warmup. Interlude: Exploring the balance invariant. AVL Trees: Invariants. AVL tree invariants review

rmup CSE 7: AVL trs rmup: ht is n invrint? Mihl L Friy, Jn 9, 0 ht r th AVL tr invrints, xtly? Disuss with your nighor. AVL Trs: Invrints Intrlu: Exploring th ln invrint Cor i: xtr invrint to BSTs tht

### This chapter covers special properties of planar graphs.

Chptr 21 Plnr Grphs This hptr ovrs spil proprtis of plnr grphs. 21.1 Plnr grphs A plnr grph is grph whih n b rwn in th pln without ny gs rossing. Som piturs of plnr grph might hv rossing gs, but it s possibl

### QUESTIONS BEGIN HERE!

Points miss: Stunt's Nm: Totl sor: /100 points Est Tnnss Stt Univrsity Dprtmnt of Computr n Informtion Sins CSCI 710 (Trnoff) Disrt Struturs TEST for Fll Smstr, 00 R this for strtin! This tst is los ook

### Announcements. Not graphs. These are Graphs. Applications of Graphs. Graph Definitions. Graphs & Graph Algorithms. A6 released today: Risk

Grphs & Grph Algorithms Ltur CS Spring 6 Announmnts A6 rls toy: Risk Strt signing with your prtnr sp Prlim usy Not grphs hs r Grphs K 5 K, =...not th kin w mn, nywy Applitions o Grphs Communition ntworks

### ECE COMBINATIONAL BUILDING BLOCKS - INVEST 13 DECODERS AND ENCODERS

C 24 - COMBINATIONAL BUILDING BLOCKS - INVST 3 DCODS AND NCODS FALL 23 AP FLZ To o "wll" on this invstition you must not only t th riht nswrs ut must lso o nt, omplt n onis writups tht mk ovious wht h

### CS September 2018

Loil los Distriut Systms 06. Loil los Assin squn numrs to msss All ooprtin prosss n r on orr o vnts vs. physil los: rport tim o y Assum no ntrl tim sour Eh systm mintins its own lol lo No totl orrin o

### ECE 407 Computer Aided Design for Electronic Systems. Circuit Modeling and Basic Graph Concepts/Algorithms. Instructor: Maria K. Michael.

0 Computr i Dsign or Eltroni Systms Ciruit Moling n si Grph Conptslgorithms Instrutor: Mri K. Mihl MKM - Ovrviw hviorl vs. Struturl mols Extrnl vs. Intrnl rprsnttions Funtionl moling t Logi lvl Struturl

### Counting Paths Between Vertices. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs

Isomorphism of Grphs Definition The simple grphs G 1 = (V 1, E 1 ) n G = (V, E ) re isomorphi if there is ijetion (n oneto-one n onto funtion) f from V 1 to V with the property tht n re jent in G 1 if

### MAT3707. Tutorial letter 201/1/2017 DISCRETE MATHEMATICS: COMBINATORICS. Semester 1. Department of Mathematical Sciences MAT3707/201/1/2017

MAT3707/201/1/2017 Tutoril lttr 201/1/2017 DISCRETE MATHEMATICS: COMBINATORICS MAT3707 Smstr 1 Dprtmnt o Mtmtil Sins SOLUTIONS TO ASSIGNMENT 01 BARCODE Din tomorrow. univrsity o sout ri SOLUTIONS TO ASSIGNMENT

### Register Allocation. Register Allocation. Principle Phases. Principle Phases. Example: Build. Spills 11/14/2012

Rgistr Allotion W now r l to o rgistr llotion on our intrfrn grph. W wnt to l with two typs of onstrints: 1. Two vlus r liv t ovrlpping points (intrfrn grph) 2. A vlu must or must not in prtiulr rhitturl

### learning objectives learn what graphs are in mathematical terms learn how to represent graphs in computers learn about typical graph algorithms

rp loritms lrnin ojtivs loritms your sotwr systm sotwr rwr lrn wt rps r in mtmtil trms lrn ow to rprsnt rps in omputrs lrn out typil rp loritms wy rps? intuitivly, rp is orm y vrtis n s twn vrtis rps r

### QUESTIONS BEGIN HERE!

Points miss: Stunt's Nm: Totl sor: /100 points Est Tnnss Stt Univrsity Dprtmnt o Computr n Inormtion Sins CSCI 2710 (Trno) Disrt Struturs TEST or Sprin Smstr, 2005 R this or strtin! This tst is los ook

### Solutions to Homework 5

Solutions to Homwork 5 Pro. Silvia Frnánz Disrt Mathmatis Math 53A, Fall 2008. [3.4 #] (a) Thr ar x olor hois or vrtx an x or ah o th othr thr vrtis. So th hromati polynomial is P (G, x) =x (x ) 3. ()

### Solutions for HW9. Bipartite: put the red vertices in V 1 and the black in V 2. Not bipartite!

Solutions for HW9 Exerise 28. () Drw C 6, W 6 K 6, n K 5,3. C 6 : W 6 : K 6 : K 5,3 : () Whih of the following re iprtite? Justify your nswer. Biprtite: put the re verties in V 1 n the lk in V 2. Biprtite:

### Graph Contraction and Connectivity

Chptr 17 Grph Contrtion n Conntivity So r w hv mostly ovr thniqus or solving prolms on grphs tht wr vlop in th ontxt o squntil lgorithms. Som o thm r sy to prllliz whil othrs r not. For xmpl, w sw tht

### NP-Completeness. CS3230 (Algorithm) Traveling Salesperson Problem. What s the Big Deal? Given a Problem. What s the Big Deal? What s the Big Deal?

NP-Compltnss 1. Polynomil tim lgorithm 2. Polynomil tim rution 3.P vs NP 4.NP-ompltnss (som slis y P.T. Um Univrsity o Txs t Dlls r us) Trvling Slsprson Prolm Fin minimum lngth tour tht visits h ity on

### Seven-Segment Display Driver

7-Smnt Disply Drivr, Ron s in 7-Smnt Disply Drivr, Ron s in Prolm 62. 00 0 0 00 0000 000 00 000 0 000 00 0 00 00 0 0 0 000 00 0 00 BCD Diits in inry Dsin Drivr Loi 4 inputs, 7 outputs 7 mps, h with 6 on

### Page 1. Question 19.1b Electric Charge II Question 19.2a Conductors I. ConcepTest Clicker Questions Chapter 19. Physics, 4 th Edition James S.

ConTst Clikr ustions Chtr 19 Physis, 4 th Eition Jms S. Wlkr ustion 19.1 Two hrg blls r rlling h othr s thy hng from th iling. Wht n you sy bout thir hrgs? Eltri Chrg I on is ositiv, th othr is ngtiv both

### CSE303 - Introduction to the Theory of Computing Sample Solutions for Exercises on Finite Automata

CSE303 - Introduction to th Thory of Computing Smpl Solutions for Exrciss on Finit Automt Exrcis 2.1.1 A dtrministic finit utomton M ccpts th mpty string (i.., L(M)) if nd only if its initil stt is finl

### Grade 7/8 Math Circles March 4/5, Graph Theory I- Solutions

ulty o Mtmtis Wtrloo, Ontrio N ntr or ution in Mtmtis n omputin r / Mt irls Mr /, 0 rp Tory - Solutions * inits lln qustion. Tr t ollowin wlks on t rp low. or on, stt wtr it is pt? ow o you know? () n

### Problem solving by search

Prolm solving y srh Tomáš voo Dprtmnt o Cyrntis, Vision or Roots n Autonomous ystms Mrh 5, 208 / 3 Outlin rh prolm. tt sp grphs. rh trs. trtgis, whih tr rnhs to hoos? trtgy/algorithm proprtis? Progrmming

### Walk Like a Mathematician Learning Task:

Gori Dprtmnt of Euction Wlk Lik Mthmticin Lrnin Tsk: Mtrics llow us to prform mny usful mthmticl tsks which orinrily rquir lr numbr of computtions. Som typs of problms which cn b on fficintly with mtrics

### Similarity Search. The Binary Branch Distance. Nikolaus Augsten.

Similrity Srh Th Binry Brnh Distn Nikolus Augstn nikolus.ugstn@sg..t Dpt. of Computr Sins Univrsity of Slzurg http://rsrh.uni-slzurg.t Vrsion Jnury 11, 2017 Wintrsmstr 2016/2017 Augstn (Univ. Slzurg) Similrity

### EE1000 Project 4 Digital Volt Meter

Ovrviw EE1000 Projt 4 Diitl Volt Mtr In this projt, w mk vi tht n msur volts in th rn o 0 to 4 Volts with on iit o ury. Th input is n nlo volt n th output is sinl 7-smnt iit tht tlls us wht tht input s

### # 1 ' 10 ' 100. Decimal point = 4 hundred. = 6 tens (or sixty) = 5 ones (or five) = 2 tenths. = 7 hundredths.

How os it work? Pl vlu o imls rprsnt prts o whol numr or ojt # 0 000 Tns o thousns # 000 # 00 Thousns Hunrs Tns Ons # 0 Diml point st iml pl: ' 0 # 0 on tnth n iml pl: ' 0 # 00 on hunrth r iml pl: ' 0

### Announcements. These are Graphs. This is not a Graph. Graph Definitions. Applications of Graphs. Graphs & Graph Algorithms

Grphs & Grph Algorithms Ltur CS Fll 5 Announmnts Upoming tlk h Mny Crrs o Computr Sintist Or how Computr Sin gr mpowrs you to o muh mor thn o Dn Huttnlohr, Prossor in th Dprtmnt o Computr Sin n Johnson

### Chapter 18. Minimum Spanning Trees Minimum Spanning Trees. a d. a d. a d. f c

Chptr 8 Minimum Spnning Trs In this hptr w ovr importnt grph prolm, Minimum Spnning Trs (MST). Th MST o n unirt, wight grph is tr tht spns th grph whil minimizing th totl wight o th gs in th tr. W irst

### CMSC 451: Lecture 2 Graph Basics Thursday, Aug 31, 2017

Dv Mount CMSC 45: Ltur Grph Bsis Thursy, Au, 07 Rin: Chpt. in KT (Klinr n Tros) n Chpt. in DBV (Dsupt, Ppimitriou, n Vzirni). Som o our trminoloy irs rom our txt. Grphs n Dirphs: A rph G = (V, E) is strutur

### Complete Solutions for MATH 3012 Quiz 2, October 25, 2011, WTT

Complt Solutions or MATH 012 Quiz 2, Otor 25, 2011, WTT Not. T nswrs ivn r r mor omplt tn is xpt on n tul xm. It is intn tt t mor omprnsiv solutions prsnt r will vlul to stunts in stuyin or t inl xm. In

### Integration Continued. Integration by Parts Solving Definite Integrals: Area Under a Curve Improper Integrals

Intgrtion Continud Intgrtion y Prts Solving Dinit Intgrls: Ar Undr Curv Impropr Intgrls Intgrtion y Prts Prticulrly usul whn you r trying to tk th intgrl o som unction tht is th product o n lgric prssion

### Register Allocation. How to assign variables to finitely many registers? What to do when it can t be done? How to do so efficiently?

Rgistr Allotion Rgistr Allotion How to ssign vrils to initly mny rgistrs? Wht to o whn it n t on? How to o so iintly? Mony, Jun 3, 13 Mmory Wll Disprity twn CPU sp n mmory ss sp improvmnt Mony, Jun 3,

### Plan. I Gale-Shapley Running Time. I Graphs. I Motivation and definitions I Graph traversal: BFS and DFS

Pln CS : Grphs: BFS n DFS Dn Shlon Gl-Shply Running Tim Grphs Motivtion n finitions Grph trvrsl: BFS n DFS Frury, 0 Running Tim of Gl-Shply? nitilly ll ollgs n stunts r fr whil som ollg is fr n hsn t m

### Using the Printable Sticker Function. Using the Edit Screen. Computer. Tablet. ScanNCutCanvas

SnNCutCnvs Using th Printl Stikr Funtion On-o--kin stikrs n sily rt y using your inkjt printr n th Dirt Cut untion o th SnNCut mhin. For inormtion on si oprtions o th SnNCutCnvs, rr to th Hlp. To viw th

### Computational Biology, Phylogenetic Trees. Consensus methods

Computtionl Biology, Phylognti Trs Consnsus mthos Asgr Bruun & Bo Simonsn Th 16th of Jnury 2008 Dprtmnt of Computr Sin Th univrsity of Copnhgn 0 Motivtion Givn olltion of Trs Τ = { T 0,..., T n } W wnt

### Scientific Programming. Graphs

Sintifi Progrmming Grphs Alrto Montrsor Univrsità i Trnto 08//07 This work is lins unr Crtiv Commons Attriution-ShrAlik 4.0 Intrntionl Lins. Tl of ontnts Introution Exmpls Dfinitions Spifition Rprsnttions

### (a) v 1. v a. v i. v s. (b)

Outlin RETIMING Struturl optimiztion mthods. Gionni D Mihli Stnford Unirsity Rtiming. { Modling. { Rtiming for minimum dly. { Rtiming for minimum r. Synhronous Logi Ntwork Synhronous Logi Ntwork Synhronous

### Graph Theory. Simple Graph G = (V, E). V={a,b,c,d,e,f,g,h,k} E={(a,b),(a,g),( a,h),(a,k),(b,c),(b,k),...,(h,k)}

Grph Theory Simple Grph G = (V, E). V ={verties}, E={eges}. h k g f e V={,,,,e,f,g,h,k} E={(,),(,g),(,h),(,k),(,),(,k),...,(h,k)} E =16. 1 Grph or Multi-Grph We llow loops n multiple eges. G = (V, E.ψ)

### a b c cat CAT A B C Aa Bb Cc cat cat Lesson 1 (Part 1) Verbal lesson: Capital Letters Make The Same Sound Lesson 1 (Part 1) continued...

Progrssiv Printing T.M. CPITLS g 4½+ Th sy, fun (n FR!) wy to tch cpitl lttrs. ook : C o - For Kinrgrtn or First Gr (not for pr-school). - Tchs tht cpitl lttrs mk th sm souns s th littl lttrs. - Tchs th

### Section 3: Antiderivatives of Formulas

Chptr Th Intgrl Appli Clculus 96 Sction : Antirivtivs of Formuls Now w cn put th is of rs n ntirivtivs togthr to gt wy of vluting finit intgrls tht is ct n oftn sy. To vlut finit intgrl f(t) t, w cn fin

### Quartets and unrooted level-k networks

Phylogntis Workshop, Is Nwton Institut or Mthmtil Sins Cmrig 21/06/2011 Qurtts n unroot lvl-k ntworks Philipp Gmtt Outlin Astrt n xpliit phylognti ntworks Lvl-k ntworks Unroot lvl-1 ntworks n irulr split

### Analysis for Balloon Modeling Structure based on Graph Theory

Anlysis for lloon Moling Strutur bs on Grph Thory Abstrt Mshiro Ur* Msshi Ym** Mmoru no** Shiny Miyzki** Tkmi Ysu* *Grut Shool of Informtion Sin, Ngoy Univrsity **Shool of Informtion Sin n Thnology, hukyo

### Minimum Spanning Trees

Minimum Spnning Trs Minimum Spnning Trs Problm A town hs st of houss nd st of rods A rod conncts nd only houss A rod conncting houss u nd v hs rpir cost w(u, v) Gol: Rpir nough (nd no mor) rods such tht:

### MULTIPLE-LEVEL LOGIC OPTIMIZATION II

MUTIPE-EVE OGIC OPTIMIZATION II Booln mthos Eploit Booln proprtis Giovnni D Mihli Don t r onitions Stnfor Univrsit Minimition of th lol funtions Slowr lgorithms, ttr qulit rsults Etrnl on t r onitions

### Greedy Algorithms, Activity Selection, Minimum Spanning Trees Scribes: Logan Short (2015), Virginia Date: May 18, 2016

Ltur 4 Gry Algorithms, Ativity Sltion, Minimum Spnning Trs Sris: Logn Short (5), Virgini Dt: My, Gry Algorithms Suppos w wnt to solv prolm, n w r l to om up with som rursiv ormultion o th prolm tht woul

### Last time: introduced our first computational model the DFA.

Lctur 7 Homwork #7: 2.2.1, 2.2.2, 2.2.3 (hnd in c nd d), Misc: Givn: M, NFA Prov: (q,xy) * (p,y) iff (q,x) * (p,) (follow proof don in clss tody) Lst tim: introducd our first computtionl modl th DFA. Tody

### A Simple Code Generator. Code generation Algorithm. Register and Address Descriptors. Example 3/31/2008. Code Generation

A Simpl Co Gnrtor Co Gnrtion Chptr 8 II Gnrt o for singl si lok How to us rgistrs? In most mhin rhitturs, som or ll of th oprnsmust in rgistrs Rgistrs mk goo tmporris Hol vlus tht r omput in on si lok

### Discovering Pairwise Compatibility Graphs

Disovring Pirwis Comptiility Grphs Muhmm Nur Ynhon, M. Shmsuzzoh Byzi, n M. Siur Rhmn Dprtmnt of Computr Sin n Enginring Bnglsh Univrsity of Enginring n Thnology nur.ynhon@gmil.om, shms.yzi@gmil.om, siurrhmn@s.ut..

### S i m p l i f y i n g A l g e b r a SIMPLIFYING ALGEBRA.

S i m p l i y i n g A l g r SIMPLIFYING ALGEBRA www.mthltis.o.nz Simpliying SIMPLIFYING Algr ALGEBRA Algr is mthmtis with mor thn just numrs. Numrs hv ix vlu, ut lgr introus vrils whos vlus n hng. Ths

### CIT 596 Theory of Computation 1. Graphs and Digraphs

CIT 596 Theory of Computtion 1 A grph G = (V (G), E(G)) onsists of two finite sets: V (G), the vertex set of the grph, often enote y just V, whih is nonempty set of elements lle verties, n E(G), the ege

### Discovering Frequent Graph Patterns Using Disjoint Paths

Disovring Frqunt Grph Pttrns Using Disjoint Pths E. Gus, S. E. Shimony, N. Vntik {hu,shimony,orlovn}@s.gu..il Dpt. of Computr Sin, Bn-Gurion Univrsity of th Ngv, Br-Shv, Isrl Astrt Whrs t-mining in strutur