Search the courses, subjects, tracks, games and features, or jump straight to a page.
2 cards from this section. Quick, good the night before a test.
What is the All-pairs Shortest Paths problem?
Think about a scenario involving multiple locations.
Can a graph have negative cycles?
Consider the implications of having a cycle with negative weights.
What does the Floyd-Warshall algorithm calculate?
Consider which type of paths it handles.
True or False: Negative cycles allow for well-defined shortest paths.
Think about what happens to path lengths in a loop.
Modify the Floyd-Warshall algorithm to handle graphs with different weight ranges or constraints. Describe the thought process and adjustments needed.
Think about how constraints might affect path calculations.
Create a graph with four vertices and specific weights, then manually apply the Floyd-Warshall algorithm step-by-step. Illustrate the changes at each stage.
Keep track of which vertex is serving as an intermediary at each step.
4 more questions in this section. Enroll free to practise them all.
Enroll free