Ceist Eile is in development. Features, questions and prices may change while we refine it.

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

Dijkstra's algorithm, Higher Level(7 marks)

Quick ones on Dijkstra's algorithm.

(a)What does Dijkstra's algorithm find?
  1. A minimum spanning tree that links all the vertices
  2. The shortest path from a start vertex to the others
  3. The longest route from a start vertex to the others
(b)In Dijkstra's algorithm, which vertex is made permanent next?
  1. The one with the largest temporary label
  2. The one joined by the shortest single edge
  3. The one with the smallest temporary label
(c)Dijkstra: X has temporary label 14. Y is made permanent with label 9, and edge YX = 4. X's new label?
  1. 13
  2. 23
  3. 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

Your turn: Higher Level questions on Dijkstra's algorithm.

Higher Level

Asked on 2 of the last 3 Higher Level papers, most recently in 2025. most years

Every paper, year by year

YearWhere it came up
2025Q7
2024Not asked
2023Q2

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?

  1. A, B, C, D
  2. A, C, D, B
  3. 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?

  1. Yes, but at double the weight
  2. No, only in the direction of the arrow
  3. 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?

  1. The shortest distance from S to that vertex
  2. The weight of the last edge used to reach it
  3. 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

YearWhere it came up
2025Q4
2024Q6
2023Q4

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?

  1. 9
  2. 10
  3. 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?

  1. P, R, T
  2. P, R, Q, T
  3. 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…

  1. Never changes
  2. Can still be lowered
  3. 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

All of Leaving Cert Applied Maths