Photo AI
Last Updated Sep 27, 2025
Revision notes with simplified explanations to understand Dijkstra's Algorithm quickly and effectively.
294+ students studying
Dijkstra's algorithm is a method for finding the shortest path from a starting node (source) to all other nodes in a weighted graph. This algorithm is widely used in network routing and optimisation problems.
For the current node, calculate the tentative distance to each of its unvisited neighbours: =
If this calculated distance is less than the currently recorded tentative distance for that neighbour, update the neighbour's tentative distance.
Example Find the shortest path from node to all other nodes in the weighted graph below:
Node Pair | Weight |
---|---|
A → B | 4 |
A → C | 2 |
B → C | 5 |
B → D | 10 |
C → D | 3 |
C → E | 4 |
D → E | 1 |
Initialisation
Step 1: Explore Neighbours of
Step 2**: Move to** (Smallest Tentative Distance)
Step 3: Move to (Next Smallest Tentative Distance)
Step 4**: Move to**
Step 5**: Move to**
Final Tentative Distances
The shortest paths from are:
Incorrect Initialisation Forgetting to set the starting node's distance to and all others to .
Skipping Updates Failing to update the tentative distance of a node when a shorter path is found.
Revisiting Visited Nodes Including already visited nodes in further calculations.
Ignoring Edge Weights Treating all edges as having equal weight instead of using the given values.
Stopping Prematurely Not exploring all nodes, leading to incomplete or incorrect paths.
Enhance your understanding with flashcards, quizzes, and exams—designed to help you grasp key concepts, reinforce learning, and master any topic with confidence!
30 flashcards
Flashcards on Dijkstra's Algorithm
Revise key concepts with interactive flashcards.
Try Further Maths Decision Maths 1 Flashcards3 quizzes
Quizzes on Dijkstra's Algorithm
Test your knowledge with fun and engaging quizzes.
Try Further Maths Decision Maths 1 Quizzes29 questions
Exam questions on Dijkstra's Algorithm
Boost your confidence with real exam questions.
Try Further Maths Decision Maths 1 Questions27 exams created
Exam Builder on Dijkstra's Algorithm
Create custom exams across topics for better practice!
Try Further Maths Decision Maths 1 exam builder50 papers
Past Papers on Dijkstra's Algorithm
Practice past papers to reinforce exam experience.
Try Further Maths Decision Maths 1 Past PapersDiscover More Revision Notes Related to Dijkstra's Algorithm to Deepen Your Understanding and Improve Your Mastery
96%
114 rated
Shortest Path Algorithms
Comparing Dijkstra's & Floyd's Algorithms
342+ studying
187KViewsJoin 500,000+ A-Level students using SimpleStudy...
Join Thousands of A-Level Students Using SimpleStudy to Learn Smarter, Stay Organized, and Boost Their Grades with Confidence!
Report Improved Results
Recommend to friends
Students Supported
Questions answered