Lecture 6 - Shortest Path The shortest path problem...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Shortest Path The shortest path problem Unweighted shortest path Weighted shortest path Summary Applications
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 The Shortest Path Problem You are going from Central to HKUST by taxi. The driver needs to choose the best route, i.e., the shortest or the quickest Tom lives in the Central. He can choose from the following three routes to go to HKUST: Central by MTR (change at Mong Kok) to Choi Hung, then by minibus to HKUST Central by MTR (change at North Point and Yau Tong) to Choi Hong, then by minibus to HKUST Central by MTR (change at North Point) to Hang Hau, then by minibus to HKUST
Background image of page 2
3 Shortest Path: Distance If Tom wants to minimize the total travel time from home to HKUST, he can construct a shortest path problem, with the weight of an edge as the travel time between the two nodes (mean waiting time plus travel time); e.g., 16 minutes from Choi Hung to UST 1 2 3 4 5 Choi Hung Yau Tong HKUST 16 12 * * * * 6 North Point *
Background image of page 3

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

View Full DocumentRight Arrow Icon
4 Shortest Path: Cost If Tom wants to minimize the transportation cost from home to HKUST, he can construct a shortest path problem, with the weight of an edge as the ticket fair between the two nodes; e.g., $5.5 from Choi Hung to UST 1 2 3 4 5 Choi Hung Yau Tong HKUST 5.5 4 * * * 6 North Point *
Background image of page 4
5 Which Route Will You Choose? The above problem can be easily solved. When there is a large number of nodes, the problem can be much harder If Tom has a car and drives from Central to HKUST. There are more routes to choose from Many problems can be formulated as shortest path problems and may have much more options to consider
Background image of page 5

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

View Full DocumentRight Arrow Icon
6 Terminology Node (vertex): usually assigned an index, e.g., node i Arc (edge): an arc ( i , j ) exists if and only if there is a direct connection from node i to node j Weight: each arc ( i , j ) is associated with a cost – the cost to traverse the edge – may represent distance, cost Source node (node s ): the node from which we start Destination node (node d ) , i j c v 1 v 2 v 5 v 3 v 6 v 7 v 4
Background image of page 6
7
Background image of page 7

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

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/05/2011 for the course IELM IELM202 taught by Professor D during the Fall '10 term at HKUST.

Page1 / 37

Lecture 6 - Shortest Path The shortest path problem...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online