Download presentation
Presentation is loading. Please wait.
Published byEllen Cooper Modified over 9 years ago
1
Quickest Route B St Li C La time matrix (minutes) 22 14 16 15 21 10 Liskeard Launceston Callington St Austell Bodmin 32 What is the quickest route from St Austell to Launceston?
2
Dijkstra’s Algorithm Step 1Give the permanent label 0 to the starting vertex. Step 2 Give temporary labels to each vertex that is connected directly to the starting vertex. Step 3 Find the vertex with the smallest temporary label, number it and make it permanent. Step 4 Give temporary labels to each vertex that is connected directly to the previous vertex. Then find the vertex with the smallest temporary label, number it and make it permanent. Step 5 Repeat Step 4 until you have given a permanent label to the finishing vertex. Step 6 Use the permanent labels to trace back through the network to find the shortest path.
3
32 15 22 14 21 10 16 Liskeard Launceston Callington St Austell Bodmin Using Dijkstra’s Algorithm to find the quickest route from St Austell to Launceston 10 0 15 21 215 37 3 21 31 4 53 31 537 45 The quickest route is: St Austell to Bodmin then Launceston
4
12 17 11 8 13 22 Shortest Path B St Li C La distance matrix (miles) Liskeard Launceston Callington St Austell Bodmin 16 What is the shortest route from St Austell to Launceston?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.