Download presentation
Presentation is loading. Please wait.
Published byLawrence Oliver Modified over 9 years ago
1
22 15 32 14 21 10 16 Liskeard Launceston Callington St Austell Bodmin Starter Find the quickest route from St Austell to Launceston
2
Dijkstra’s Algorithm Aims: To be able to use Dijkstra’s algorithm to find the shortest path between two vertices on a network
4
Dijkstra’s Algorithm Invented by Edgar Dijkstra. Dutch computer scientist. Lived from 1930 to 2002. Worked at the University of Texas at Austin. Received many awards for his work in computer science.
5
Dijkstra’s Algorithm Is used to find the shortest path between two places. It does this by using temporary labels. These keep track on the best way to get to each place. When you are sure you have the shortest way you can make this a permanent label. Let’s have a go!
6
22 15 32 14 21 10 16 Liskeard Launceton Callington St Austell Bodmin Use Dijkstra’s Algorithm to find the quickest route from St Austell to Launceston
7
Dijkstra’s Step-by-Step 1)Label the starting vertex with 0. Place in a square box to show a permanent label. 2)Consider every vertex that connects to the starting and give a temporary label. 3)Put a box around the shortest temporary label, making it a permanent label. 4)Consider every place that connects to the new permanent label. a)Add temporary labels to places that do not have one. b)If there is a shorter way to get to a place already temporary labelled cross out and write the sorter distance down. c)If the distance is longer than the existing label do nothing. 5)Repeat steps 3 and 4 until complete. 6)Follow the backwards to find the shortest route.
8
Find the shortest path from A to F and state the route taken.
9
Find the shortest path from A to G and state the route taken.
11
Find the shortest path from F to C and state the route taken.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.