Graph Traversals Flashcards

1
Q

Two types

A
  • DFS (depth-first search)

- BFS (breadth-first search)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Properties of DFS

A

1: visits all the vertices and edges in the connected component of v
2: the discovery edges from a spanning tree of the connected component of v

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

DFS

A
  • discovery edges: paths taken

- back edge: w is an ancestor of v

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

BFS

A
  • discovery edge: path taken

- cross edge: w is in the same level as v or in the next level

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Directed DFS and BFS

A
  • discovery arc: arcs leading to unvisited nodes in the traversal
  • back arc: goes from a node to one of its ancestors
  • forward arc: a non-spanning arc that goes from a node to a proper descendant
  • cross arc: arcs that go from one node to another that is neither an ancestor nor a descendant
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

String connectivity

A

Each vertex can reach all other vertices

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Reach ability

A

Vertices reachable from v via directed paths

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

String connected components (SCC)

A

-is a maximal set of nodes in which there is a path from any node in the set to any other node in the set

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Equivalence classes

A

Such that v and w are equivalent iff there is a path from v to w and a path from w to v

How well did you know this?
1
Not at all
2
3
4
5
Perfectly