4.2 Depth first search Flashcards

1
Q

What is depth first search used for

A
  • Finding path from x to y
  • Explore the entire component of G containing x
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the core idea behind depth first search

A
  • Explore first edge until no unexplored left, then backtrack and try edge 2 etc. (So long as the edge is unexplored)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the psuedocode for DFS

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

What is the time complexity for DFS

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

Prove DFS explores every vertex in the component

A

In a strongly connected graph there exists a path from u to v

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

Prove this for DFS

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

What are the 2 properties of a DFS tree

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