10.3 The Bellman-Ford Algorithm Flashcards

1
Q

What does excluding negative cycles mean for the shortest walk in a graph (including negative weights)

A
  • It is a path. Ie will not take any cycles since pos weight
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Why doesn’t Dijksta’s algorithm work for negative weights?

A
  • Built on principle that the shortest path out of set is the best
  • Not true for negative weights
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the dynamic programming idea for weighted interval scheduling (ie how to break up problem)

A
  • Always think about choices with DP
  • We choose which vertex to go to next (then take best path from there)
  • Can recursively evaluate this
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the slow recursive algorithm for weighted interval scheduling

A
  • Recurse on the graph without that node
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the trick for consolodating weighted interval scheduling calls (ie reframing the problem)

A
  • Make it a walk with at most k edges (will thus be a path)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the recursive psuedocode for the reframed weighted interval scheduling problem

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