lec0427-GraphTraversals - Announcements MP 7 available EC...

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

View Full Document Right Arrow Icon
Announcements: MP 7 available. EC Due 12/01, 11:59p. Due 12/08, 11:59p. Final exam, 5/11, 7-10p. Locations tba via Exams page. Today: Graph Traversal n vertices, m edges • no parallel edges • no self-loops • Bounds are big-O Edge List Adjacency List Adjacency Matrix Space n + m n + m n 2 incidentEdges( v ) m deg( v ) n areAdjacent ( v, w ) m min(deg( v ), deg( w )) 1 insertVertex( o ) 1 1 n 2 insertEdge( v, w, o ) 1 1 1 removeVertex( v ) m deg( v ) n 2 removeEdge( e ) 1 1 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
Graphs – traversal Objective: Visit every vertex and every edge, in the graph, Purpose: We can search for interesting substructures in the graph, Contrast graph traversal to BST traversal: •Ordered •Obvious start
Background image of page 2
Graphs: Traversal - DFS http://www.cs.duke.edu/csed/jawaa2/examples/DFS.html http://www.student.seas.gwu.edu/~idsv/idsv.html http://www.youtube.com/watch?v=8qrZ1clEp-Y Ariadne, Theseus, and the Minotaur
Background image of page 3

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

View Full DocumentRight Arrow Icon
Algorithm DFS(G) Input: graph G Output: labeling of the edges of G as discovery edges and
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/26/2012 for the course CS CS 225 taught by Professor Heeren during the Spring '09 term at University of Illinois, Urbana Champaign.

Page1 / 12

lec0427-GraphTraversals - Announcements MP 7 available EC...

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

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