Comparing Dijkstra's & Floyd's Algorithms (Edexcel A Level Further Maths: Decision Maths 1)

Revision Note

Paul

Author

Paul

Last updated

Comparing Dijkstra's & Floyd's Algorithms

What is the difference between Dijkstra's and Floyd's algorithms?

  • Both algorithms find the shortest path, and its weight (length) between nodes on a graph
  • Dijkstra's algorithm finds the shortest path between a fixed starting node and every other node in the network
    • This would be useful where a starting point cannot be moved
      • e.g.  a power station, a distribution warehouse
    • The advantage of Dijkstra's algorithm are speed
      • the algorithm can be stopped once the desired end node is reached
    • The disadvantage of Dijkstra's algorithm is the limited information it provides (compared to Floyd's)
  • Floyd's algorithm finds the shortest path between any pair of start and end nodes
    • This would be useful where a starting point can be anywhere on the network
      • e.g. a robot inspecting a network of pipelines
    • The advantage of Floyd's algorithm is the amount of information it provides (compared to Dijkstra)
    • The disadvantage of Floyd's algorithm is the time it takes (especially manually without a computer!)
  • Repeating Dijkstra's algorithm, taking each node in turn as the starting node, would produce the same information as Floyd's algorithm

You've read 0 of your 5 free revision notes this week

Sign up now. It’s free!

Join the 100,000+ Students that ❤️ Save My Exams

the (exam) results speak for themselves:

Did this page help you?

Paul

Author: Paul

Expertise: Maths

Paul has taught mathematics for 20 years and has been an examiner for Edexcel for over a decade. GCSE, A level, pure, mechanics, statistics, discrete – if it’s in a Maths exam, Paul will know about it. Paul is a passionate fan of clear and colourful notes with fascinating diagrams – one of the many reasons he is excited to be a member of the SME team.