CS 310 Unit 18 Topological Sort and Strongly Connected Components

CS 310 Unit 18 Topological Sort and Strongly Connected Components

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

View Full Document Right Arrow Icon
CS 310  Unit 18 Topological Sort  and Strongly Connected  Components Furman Haddix Ph.D. Assistant Professor Minnesota State University,  Mankato Spring 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
Unit 18 Objectives Two Depth First Search Applications Topological sort Strongly connected components Text Chapter 22.4, 22.5
Background image of page 2
Topological Sort Idea of a topological sort is to produce an  ordered set from a partially ordered set, if  possible. The basic logic is provided by DFS. In  conclusion, listing the ordered set is based  on the finish times from the DFS in inverse  order.
Background image of page 3

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

View Full DocumentRight Arrow Icon
Example Topological Sort Instead of creating a DFS forest create a linked list,  tim e 1 belt jacket shoes shoes shoes LIST belt
Background image of page 4
Example Topological Sort 0 pants 0 tie 0 jacket belt shirt 0 shorts shoes socks watch 0 0 0 0 0 1 0 0 0 0 0 0 0 0 tim e 2 shoes pants socks jacket belt shorts tie watch shirt tie belt jacket jacket pants shoes shoes shoes LIST belt
Background image of page 5

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

View Full DocumentRight Arrow Icon
Example Topological Sort 0 pants 0 tie 0 jacket belt shirt 0 shorts shoes socks watch 2 0 0 0 0 1 0 0 0 0 0 0 0 0 tim e 3 shoes pants socks jacket belt shorts tie watch shirt tie belt jacket jacket pants shoes shoes shoes LIST belt
Background image of page 6
Example Topological Sort 0 pants 0 tie 0 jacket belt shirt 0 shorts shoes socks watch 2 0 0 0 0 1 0 0 0 0 3 0 0 0 tim e 4 shoes pants socks jacket belt shorts tie watch shirt tie belt jacket jacket pants shoes shoes shoes LIST belt
Background image of page 7

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

View Full DocumentRight Arrow Icon
Example Topological Sort 0 pants 0 tie 0 jacket belt shirt 0 shorts shoes socks watch 2 4 0 0 0 1 0 0 0 0 3 0 0 0 tim e 5 shoes pants socks jacket belt shorts tie watch shirt tie belt jacket jacket pants shoes shoes shoes LIST jacket belt
Background image of page 8
Example Topological Sort 0 pants 0 tie 0 jacket belt shirt 0 shorts shoes socks watch 2 4 0 0 0 1 0 5 0 0 3 0 0 0 tim e 6 shoes pants socks jacket belt shorts tie watch shirt tie belt jacket jacket pants shoes shoes shoes LIST jacket tie belt
Background image of page 9

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

View Full DocumentRight Arrow Icon
Example Topological Sort 0 pants 0 tie 0 jacket belt shirt 0 shorts shoes socks watch 2 4 0 0 0 1 6 5 0 0 3 0 0 0 tim e 7 shoes pants socks jacket belt shorts tie watch shirt tie belt jacket jacket pants shoes shoes shoes LIST belt jacket tie
Background image of page 10
Example Topological Sort 0 pants 0 tie 0 jacket belt shirt 0 shorts shoes socks watch 2 4 0 7 0 1 6 5 0 0 3 0 0 0 tim e 8 shoes pants socks jacket belt shorts tie watch shirt tie belt jacket jacket pants shoes shoes shoes LIST belt belt jacket tie
Background image of page 11

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

View Full DocumentRight Arrow Icon
Example Topological Sort 0 pants 0 tie 0 jacket belt shirt 0 shorts shoes socks watch 2 4 0 7 8 1 6 5 0 0 3 0 0 0 tim e 9 shoes pants socks jacket belt shorts tie watch shirt tie belt jacket jacket pants shoes shoes shoes LIST belt shirt belt jacket tie
Background image of page 12
Example Topological Sort 0 pants 0 tie 0 jacket belt shirt 0 shorts shoes socks watch 2 4 0 7 8 1 6 5 0 9 3 0 0 0 tim e 10 shoes pants socks jacket belt shorts tie watch shirt tie belt jacket jacket pants shoes shoes shoes LIST belt shirt belt jacket tie
Background image of page 13

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

View Full DocumentRight Arrow Icon
Example Topological Sort 0 pants 0 tie 0 jacket belt shirt 0 shorts shoes socks watch 2 4 0 7 8 1 6 5 0 10 3 0 0 0 tim e 11 shoes pants socks jacket belt shorts tie watch shirt tie belt jacket jacket pants shoes shoes shoes LIST belt shirt belt jacket tie watch
Background image of page 14
Example Topological Sort 11 pants 0 tie 0
Background image of page 15

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

View Full DocumentRight Arrow Icon
Image of page 16
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/09/2008 for the course CS 310 taught by Professor Furmanhaddix during the Spring '08 term at Minnesota State University, Mankato.

Page1 / 73

CS 310 Unit 18 Topological Sort and Strongly Connected Components

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

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