Floyd's algorithm Quiz
Studying this course? Keep your progress in one place.
Pick an answer for each. Quizzes never use energy.
5 questions, one answer each
Each answer is checked as you go, with why.
See all 5 questions
1. How many iterations does Floyd's algorithm need for a network with 6 vertices?
- A.
- B.
- C.
- D.
2. In iteration , , and . What happens?
- A. becomes 9 and the route entry is copied from
- B. stays 10
- C. becomes 14
- D. becomes 9 and the route entry becomes
3. Roads , , . After the algorithm, what is the shortest distance from to ?
- A.
- B.
- C.
- D.
4. What does the entry in row , column of the route table show?
- A. The last vertex before
- B. The first vertex to go to from on the way to
- C. The shortest distance from to
- D. The pivot used last
5. What is the main advantage of Floyd's algorithm over Dijkstra's?
- A. It works only on small networks
- B. It needs no tables
- C. It gives the shortest distance between every pair of vertices in one run
- D. It always uses fewer steps