CS223-0304-TopoSort

CS223-0304-TopoSort - 4 An Example An Example Ordering 1:...

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

View Full Document Right Arrow Icon
CS223 Advanced Data Structures and Algorithms 1 Topological Sort Topological Sort Neil Tang Neil Tang 03/04/2008 03/04/2008
Background image of page 1

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

View Full DocumentRight Arrow Icon
CS223 Advanced Data Structures and Algorithms 2 Class Overview Class Overview Basic concepts An application Algorithm 1 Algorithm 2
Background image of page 2
CS223 Advanced Data Structures and Algorithms 3 Basic Concepts Basic Concepts A topological sort is an ordering of vertices in a DAG , such that if there is a path from v i to v j , then v j appears after v i in the ordering. The topological sort may not be unique for a DAG. Indegree/outdegree: the number of incoming/outgoing edges
Background image of page 3

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

View Full DocumentRight Arrow Icon
CS223 Advanced Data Structures and Algorithms
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
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 4 An Example An Example Ordering 1: 1,2,5,4,3,7,6 Ordering 2: 1,2,5,4,7,3,6 CS223 Advanced Data Structures and Algorithms 5 An Application An Application CS223 Advanced Data Structures and Algorithms 6 Topological Sort: Algorithm 1 Topological Sort: Algorithm 1 CS223 Advanced Data Structures and Algorithms 7 Topological Sort: Algorithm 2 Topological Sort: Algorithm 2 Time complexity: O(|V|+|E|) CS223 Advanced Data Structures and Algorithms 8 Topological Sort: Algorithm 2 Topological Sort: Algorithm 2...
View Full Document

Page1 / 8

CS223-0304-TopoSort - 4 An Example An Example Ordering 1:...

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

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