Lesson 4.3.6.1

4.3.6.1 Dijkstra's shortest path algorithm Quiz: AQA Computer Science, Unit 3

20 questions

In partnership with Revision Ninja

Lesson 4.3.6.1, Dijkstra's shortest path algorithm: 20 multiple choice questions for the AQA Computer Science (7517), Unit 3: Fundamentals of algorithms, written with Revision Ninja.

Host it live on the board and students join with a game code on their own devices, or revise alone with Free Play. The answers are revealed in the game.

Host this setFree Play

The 20 questions

  1. What does Dijkstra's algorithm find on a weighted graph?

    • Maximum flow
    • Shortest path
    • Topological sort
    • Minimum spanning tree
  2. Dijkstra's shortest path algorithm belongs to which category in the specification?

    • Sorting
    • Optimisation
    • Encryption
    • Parsing
  3. Dijkstra's algorithm requires edge weights to be which kind of values?

    • Non-negative
    • Integers only
    • Negative only
    • All equal to 1
  4. Which real-world application uses Dijkstra's algorithm?

    • File compression
    • Syntax parsing
    • Database indexing
    • Sat-nav route planning
  5. Which node does Dijkstra's algorithm select next at each step?

    • Nearest unvisited node
    • Most connected node
    • Furthest unvisited node
    • Random unvisited node
  6. What skill is required for Dijkstra's algorithm in AQA exams?

    • Tracing the algorithm
    • Writing pseudo-code
    • Proving correctness
    • Recalling the code
  7. Graph: S-A weight 4, S-B weight 1, B-A weight 2, A-T weight 3, B-T weight 6. What is the shortest distance from S to T?

    • 6
    • 4
    • 7
    • 10
  8. In the same graph (S-A 4, S-B 1, B-A 2, A-T 3, B-T 6), what is the shortest distance from S to A?

    • 3
    • 2
    • 6
    • 4
  9. In the same graph, which node is finalised first after the source S?

    • B, with tentative distance 1
    • All nodes simultaneously
    • A, with tentative distance 4
    • T, with tentative distance 6
  10. On a graph where every edge has weight 1, Dijkstra's algorithm gives the same result as which search?

    • Binary search
    • Breadth-first search
    • Bubble sort
    • Depth-first search
  11. Graph: S-A weight 2, A-T weight 2, S-T weight 5. What is the shortest distance from S to T?

    • 5
    • 2
    • 4
    • 7
  12. Which edge property can cause Dijkstra's algorithm to fail?

    • Negative weights
    • Directed edges
    • Large weights
    • Zero weights
  13. Dijkstra's algorithm is an example of which kind of algorithm?

    • Greedy
    • Randomised
    • Brute force
    • Backtracking
  14. Graph: A-B weight 1, B-C weight 1, C-D weight 1, A-D weight 5. What is the shortest distance from A to D?

    • 7
    • 3
    • 5
    • 1
  15. During Dijkstra's algorithm the source has distance 0, and a neighbour X is joined to it by an edge of weight 7. What tentative distance does X receive?

    • Infinity
    • 0
    • 7
    • 14
  16. With a binary heap, what is the usual time complexity of Dijkstra's algorithm on V vertices and E edges?

    • O(V^2) only
    • O(n) always
    • O(2^V)
    • O((V + E) log V)
  17. In a satnav graph, what do edge weights represent?

    • Road names
    • Traffic lights
    • Travel cost
    • Node count
  18. Graph: S-A 1, S-B 4, A-B 2, B-T 1, A-T 6. What is the shortest distance from S to T?

    • 5
    • 6
    • 7
    • 4
  19. Dijkstra's algorithm finds the shortest path from a single source under which condition?

    • Acyclic graphs only
    • Negative edge weights
    • Unweighted edges only
    • Non-negative edge weights
  20. What does breadth-first search minimise when finding a path in a graph?

    • Maximum edge weight
    • Number of edges
    • Node traversal speed
    • Total edge weight

All AQA Computer Science quizzes