Lecture 9: T sort, Tarjan's Articulation Points Algorithm Flashcards

1
Q

Proof: There must be at least one “sink vertex” with no outgoing edges in any DAG

A

Proof by contradiction

Suppose there isn’t. Pick an arbitrary vertex B and begin exploring from it to C->D and continue for n vertices since all vertices have outgoing edges. Then we follow n arcs, and we will have seen n+1 vertices. Via the pigeon-hole principle, we must have seen some vertex twice -> cycle and not DAG

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

Proof: Does every DAG have atleast one topological ordering?

A

Base case (n=2): n is the number of vertices in Graph G

Inductive Hypothesis: Assume our base case holds for k vertices. We will prove that it also holds for k+1 vertices.

Given an arbitrary connected graph G with k+1 vertices that is a DAG, find a random node with no outgoing edges (sink vertex) and remove it to create G’

It must be the case that G’ is a DAG as well.

We can concatenate (G’) + v to get the original
QED

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

Tarjan’s Articulation Point Algorithm

A

Used to detect articulation points

DFS tree of discovery

Root: if parent[x] is null or -1 and x has two or more children in the tree of discovery, x is an articulation point (so graph not biconnected

  1. Time stamp each vertex during DFS with entry_time[]
  2. For every node, we need to discover the earliest discovered vertex that can be reached from the subtree rooted at x.
    - use low[], initially low[x] = entry_time[x]
    - when backtracking low[x] = min(low[x], low[w])
  3. When backtracking, if low[neighbor] >= entry_time[x], it means that no descendant of x has an escape route better than x (x is articulation point)

N.B: refer to graph in notes (Lecture 10)
low[neighbor] >= entry_time[x]

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

Articulation points:

The root of a tree is always thought of as an articulation point. What if we have a graph where the children of the root have edges/paths between them further down in the tree of discovery?

A

The DFS tree of undirected graphs cannot contain forward or cross edges since in those cases the edge would’ve been traversed.

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