Floyd's algorithm

Floyd's algorithm Quiz

Spec 2.2 · Edexcel A-Level Further Maths: 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. 1. How many iterations does Floyd's algorithm need for a network with 6 vertices?

    • A. 44
    • B. 55
    • C. 66
    • D. 77
  2. 2. In iteration KK, d(X,Y)=10d(X,Y)=10, d(X,K)=4d(X,K)=4 and d(K,Y)=5d(K,Y)=5. What happens?

    • A. d(X,Y)d(X,Y) becomes 9 and the route entry (X,Y)(X,Y) is copied from (X,K)(X,K)
    • B. d(X,Y)d(X,Y) stays 10
    • C. d(X,Y)d(X,Y) becomes 14
    • D. d(X,Y)d(X,Y) becomes 9 and the route entry (X,Y)(X,Y) becomes KK
  3. 3. Roads AB=2AB=2, AC=5AC=5, BC=1BC=1. After the algorithm, what is the shortest distance from AA to CC?

    • A. 77
    • B. 55
    • C. 88
    • D. 33
  4. 4. What does the entry in row XX, column YY of the route table show?

    • A. The last vertex before YY
    • B. The first vertex to go to from XX on the way to YY
    • C. The shortest distance from XX to YY
    • D. The pivot used last
  5. 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

Quiz