Subjects · Leaving Cert Applied Maths
Leaving Cert Applied Maths: Dijkstra's algorithm
How often Dijkstra's algorithm comes up on the Applied Maths papers, every year it was asked, and questions to try.
HL Asked on 2 of the last 3 Higher Level papers, most recently in 2025. most years
OL Asked on 3 of the last 3 Ordinary Level papers, most recently in 2025. banker
Quick ones on Dijkstra's algorithm.
- A minimum spanning tree that links all the vertices
- The shortest path from a start vertex to the others
- The longest route from a start vertex to the others
- The one with the largest temporary label
- The one joined by the shortest single edge
- The one with the smallest temporary label
- 13
- 23
- 14
Show the answers
(a) The shortest path from a start vertex to the others
(b) The one with the smallest temporary label
(c) 13
Higher Level
Asked on 2 of the last 3 Higher Level papers, most recently in 2025. most years
Every paper, year by year
| Year | Where it came up |
|---|---|
| 2025 | Q7 |
| 2024 | Not asked |
| 2023 | Q2 |
Links open the State Examinations Commission’s paper for that year.
More Dijkstra's algorithm questions
Dijkstra's algorithm, 3 marks
Dijkstra from A: AB 3, AC 1, BC 1, BD 4, CD 6. Order in which vertices become permanent?
- A, B, C, D
- A, C, D, B
- A, C, B, D
Show the answer
A, C, B, D
A is 0. C gets 1 and becomes permanent. B = min(3, 1 + 1) = 2, then permanent. D = min(2 + 4, 1 + 6) = 6, permanent last. Always fix the smallest temporary label next.
Dijkstra's algorithm, 2 marks
Using Dijkstra's algorithm on a directed network, can you travel along an arc against its arrow?
- Yes, but at double the weight
- No, only in the direction of the arrow
- Yes, at the same weight as forwards
Show the answer
No, only in the direction of the arrow
An arc models a one-way link, such as a one-way street. Labels are only updated along arcs leaving the vertex just made permanent, in their own direction.
Dijkstra's algorithm, 2 marks
When Dijkstra's algorithm is run from S, what does a vertex's final permanent label give?
- The shortest distance from S to that vertex
- The weight of the last edge used to reach it
- The order in which it was made permanent
Show the answer
The shortest distance from S to that vertex
Permanent labels are the true least distances from the start. To recover the route itself, trace back from the end along edges whose weight equals the gap between labels.
Ordinary Level
Asked on 3 of the last 3 Ordinary Level papers, most recently in 2025. banker
Every paper, year by year
| Year | Where it came up |
|---|---|
| 2025 | Q4 |
| 2024 | Q6 |
| 2023 | Q4 |
Links open the State Examinations Commission’s paper for that year.
More Dijkstra's algorithm questions
Dijkstra's algorithm, 3 marks
SA 4, SB 1, BA 2, AT 5, BT 9 (undirected). Shortest distance from S to T?
- 9
- 10
- 8
Show the answer
8
Routes: S-A-T = 4 + 5 = 9, S-B-T = 1 + 9 = 10, S-B-A-T = 1 + 2 + 5 = 8. The route with more edges wins because they are shorter.
Dijkstra's algorithm, 3 marks
PQ 7, PR 3, RQ 2, QT 4, RT 8 (undirected). Shortest route from P to T?
- P, R, T
- P, R, Q, T
- P, Q, T
Show the answer
P, R, Q, T
P-R-Q-T = 3 + 2 + 4 = 9. P-Q-T = 7 + 4 = 11 and P-R-T = 3 + 8 = 11. So P, R, Q, T is shortest at 9.
Dijkstra's algorithm, 2 marks
Once a vertex has a permanent label in Dijkstra's algorithm, the label…
- Never changes
- Can still be lowered
- Is doubled at the end
Show the answer
Never changes
A permanent label is the final shortest distance to that vertex. Only temporary labels can be updated when a shorter route is found.
Other Applied Maths topics
- Calculus & variable acceleration
- Connected particles & pulleys
- Constant acceleration (suvat)
- Displacement & velocity graphs
- First-order difference equations
- Forces & Newton's laws
- Friction & inclined planes
- Graphs & network terminology
- Horizontal circular motion
- Loans, savings & finance models
- Matrices & adjacency
- Minimum spanning trees
- Momentum & direct collisions
- Oblique collisions
- Projectile motion
- Recurrence relations & differences
- Reducing second-order DEs
- Resisted motion & drag
- Second-order difference equations
- Separable differential equations
- The modelling cycle & assumptions
- Vectors & the dot product
- Vertical circular motion
- Dimensional analysis
- Dynamic programming & Bellman
- Project scheduling & critical path
- Work, energy & conservation
- Greedy vs dynamic algorithms
- Hooke's law & elastic energy