CS223-0304-TopoSort

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

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

CS223 Advanced Data Structures and Algorithms 1 Topological Sort Topological Sort Neil Tang Neil Tang 03/04/2008 03/04/2008

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

View Full Document
CS223 Advanced Data Structures and Algorithms 2 Class Overview Class Overview Basic concepts An application Algorithm 1 Algorithm 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

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

View Full Document
CS223 Advanced Data Structures and Algorithms

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

View Full Document

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

View Full Document
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

## This note was uploaded on 04/17/2008 for the course CS 223 taught by Professor Tang during the Spring '07 term at MSU Bozeman.

### 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
Ask a homework question - tutors are online