dijkstras_ex

# dijkstras_ex - Dijkstra’s Algorithm Priority Queue...

This preview shows pages 1–9. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Dijkstra’s Algorithm Priority Queue: Dequeued Paths: Start: C Find: E Use Dijkstra’s algorithm to find the shortest path from C to E in terms of optimal cost. Show your queue and dequeued paths to the right. Dijkstra’s Algorithm Priority Queue: 0 - C Dequeued Paths: Start: C Find: E Step: Enqueue start node with cost 0. Dijkstra’s Algorithm Priority Queue: 0 - C 0 - C Dequeued Paths: 0 - C Start: C Find: E Step: Dequeue min path. Dijkstra’s Algorithm Priority Queue: 0 - C 4 - A,C 2 - F,C Dequeued Paths: 0 - C Start: C Find: E Step: Enqueue paths to all adjacent nodes that have not already been visited. Dijkstra’s Algorithm Priority Queue: 0 - C 4 - A,C 2 - F,C Dequeued Paths: 0 - C 2 - F,C Start: C Find: E Step: Dequeue min path. Dijkstra’s Algorithm Priority Queue: 0 - C 4 - A,C 2 - F,C 3 - A,F,C 10 - G,F,C 7 - J,F,C Dequeued Paths: 0 - C 2 - F,C Start: C Find: E Step: Enqueue paths to all adjacent nodes that have not already been visited. Dijkstra’s Algorithm Priority Queue: 0 - C 4 - A,C 2 - F,C 3 - A,F,C 10 - G,F,C 7 - J,F,C Dequeued Paths: 0 - C 2 - F,C 3 - A,F,C Start: C Find: E Step: Dequeue min path. Dijkstra’s Algorithm Priority Queue:...
View Full Document

{[ snackBarMessage ]}

### Page1 / 19

dijkstras_ex - Dijkstra’s Algorithm Priority Queue...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online