10.4 The Real Bellman-Ford algorithm Flashcards
1
Q
How can we cache the edges for Weighted Interval Scheduling (using a table)
A
- Start from k=0 and build corresponding path using best value on prev line
2
Q
How do we cache the values for weighted interval scheduling without using a table
A
- Can either 1) store prev line (all we use) or 2) just store current line (turns out it works better)
- Current line will mean that you can jump to better solution faster (ie maybe k is inconsistent) but not a problem
- All initialised to infinity (and store their edge)
3
Q
What is the final psuedocode for the Bellman-Ford algorithm (weighted interval scheduling)
A
- Start with k = 0, build up values. For each itteration check the best path from each vertex.
- At end traverse best path to output it
4
Q
What are some other pathfinding algorithms to be aware of
A