directed graphs n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Directed Graphs PowerPoint Presentation
Download Presentation
Directed Graphs

Loading in 2 Seconds...

play fullscreen
1 / 8

Directed Graphs - PowerPoint PPT Presentation


  • 187 Views
  • Uploaded on

Directed Graphs. Types of Edges. Forward, back, cross and tree edges. DAGs. Odd to mention them now, but they will come up later and now’s as good a place as any. They have unique search characteristics. acyclic == linearizability == no back edges. Strongly Connected Components.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Directed Graphs' - shandi


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
types of edges
Types of Edges

Forward, back, cross and tree edges.

slide3
DAGs
  • Odd to mention them now, but they will come up later and now’s as good a place as any.
  • They have unique search characteristics.

acyclic == linearizability == no back edges.

strongly connected components
Strongly Connected Components

Set of vertices such that each vertex is reachable from every other vertex—including itself.

Directed analogue of a biconnected component.

finding sccs
Finding SCCs
  • Book assumes you know G^R
  • We’ll assume you don’t.
tarjan s algorithm
Tarjan’s Algorithm

Input: Graph G = (V, E)

index = 0 // DFS node number counter

S = empty // An empty stack of nodes

forall v in V do

if (v.index is undefined) // Start a DFS at each node

tarjan(v) // we haven't visited yet

procedure tarjan(v)

v.index = index // Set the depth index for v

v.lowlink = index

index = index + 1

S.push(v) // Push v on the stack

forall (v, v') in E do // Consider successors of v

if (v'.index is undefined) // Was successor v' visited?

tarjan(v') // Recurse

v.lowlink = min(v.lowlink, v'.lowlink)

else if (v' is in S) // Was successor v' in stack S?

v.lowlink = min(v.lowlink, v'.index)

if (v.lowlink == v.index) // Is v the root of an SCC?

print "SCC:"

repeat

v' = S.pop

print v'

until (v' == v)

tarjan s algorithm1
Tarjan’s Algorithm
  • Does it work?
  • How fast is it?
  • Can we do better?
  • Is it parallelizable?