lec0422-Graphs-ann - Announcements: MP 7 available. EC Due...

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 6
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 8
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 10
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 12
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Announcements: MP 7 available. EC Due 4/22. 11 :59p. Due 5/2. 11:59p. Today: Graphs - Weiss, Chapter 9 How do we get from here to there? Need: . / I _ I. Pom/nan v a" (any/(21V _ 2. ét-(gp/r 1.01/9/PMPIfoRJ [on —- 3. 7-;‘(zs’er5a/ q. rz/Bnrl’f/IMS. q ,(u. ,(. Ingdentedges(6)’2$"a‘( ‘9 Graph Vocabulary: 1':i(q.v’2 ate 01 Vi Degree(6) ~ q Adjacent vertices(6) - 2 3,‘4.7 .0 Afiwt veV+(vl.U)eE V I U Path(G,) a3. \l.V. ".4; 5° LQ’WSE. V; Cyc|e(G w V. 2. ‘ Swarm?) 5 “0 Wt 5 6E; Graph Vocabulary: Su?raph(6) _ 5‘ , 5;», {-3, Xi '.’, f‘ ,2“ f, “Ir! raw" -,£« A" imp/irS 146-5” and v ,6.“ I”. Complete subgraph(G,)- K‘ a! 5 hi? ev 0: o l u q- (p (V,E) vevaéow Conn nt(G) - u 5»; E .‘a “M . Graphs: theory that will help us in analysis Vet-ZIP(5, (11d (/ry n/i‘en depend on m, {be How many edges? At least: '.’,/‘n a .—.)connected - n- ‘ f - M O quot connected - \ A! most: {ink-5 0/?90 rejporz’e-J In fermS oQ/k- [MI/"(£191. of- (Mgr!- nl‘ edgeS. 0 Relauonshl I p to degree sum. g deg( v) = m rEV Thm: Every minimally connected graph G=(V.E) has |V|-1 edges. Proof: Consider an arbitrary minimally connected graph G=(V.E). Lemma: Every connected subgraph of G is minimally connected. asy proof by contradiction) IH: For any] < |V|. any minimaly connected graph of] vertices has j-1 edges. suppose = 1: A minimally connected graph of 1 vertex has no edges. and O = 1-1. Suppose WI > 1: Graphs: Toward implementation. . .(ADT) Edges + some stmcture that reflects the connectivity of the graph Functions: (merely a smatteting...) insettVartax(pair koyData) insettEdge(vettex v1. vertex v2. pair keyData) removeEdoe(edge e); romovoVoctoxwomx v); lnddontEdgos(vortex v): areAdjaoenuvertex v1. vortex v2): origin(odgo e); destination(edge e); Graphs: Edge List (a first implementation) Some funcions we'l compare: hartVorthorux v) removeVedexwerlex v) ueAdiacenuvodex v. vedex u) hcidontEdgouvortox v) El - El - IE! - El - Graphs: Adjacency Matrix 0 Some funcions we“! compare: hudvmxworux v) d 0 0 O removeVertedverlex v) ueAdiacenuvedox v. vedex u) hcidontEdgouvortox v) EEIEIEJ Graphs: Adjacency List Som- funcions wc'l compare: hsoflVoflaAvoflox v) romovoVomdvodox v) qudjaconuvortox v. vortex u) hddontEdgofivonox v) Graphs: Asymptotic Performance 0 n VBI'fiOBS, m edges - no parallel edges Edge Adjacency Adjacency - no self-loops List List Matrix - Bounds are big-O M + "I M + I" I . incidentEd - es( v) areAdjacent (v. w insertVertex(u) insertEdgeo'. w, 0) removeVertex(v) removeEd o e(c) dcgi v) minidcg l'). dcg( wll mag-- -n n —— I. n I. — -_ — ‘ ‘ 4' dcg( v) ...
View Full Document

Page1 / 12

lec0422-Graphs-ann - Announcements: MP 7 available. EC Due...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online