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
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
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
4
Q
What is the slow recursive algorithm for weighted interval scheduling
A
- Recurse on the graph without that node
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)
6
Q
What is the recursive psuedocode for the reframed weighted interval scheduling problem
A