1
Lecture 4/5
Shortest Path Problems
Example
Following your suggestions (based on MST), the executive
board of your company built the connecting wires between the
cities. However, they chose to include additional power lines
(to have a reliable network).
Now they approach you again hoping to get an answer for a
somewhat different problem:
A power plant has been built in Albany, and the produced
power should be sent to Trenton. But there are different ways
to achieve this in the constructed network. The specific
question is:
What is the shortest path in the network
from Albany to Trenton?

This
** preview**
has intentionally

**sections.**

*blurred***to view the full version.**

*Sign up*
2
Example 1
1
2
3
4
5
6
3
3
2
3
4
2
2
Albany
Trenton
(see Winston, Example 1, page 414)
Given a graph with edge weights c
ij
≥
0. Find a
shortest path from node 1 to node 6.
Solution: Dijkstra’s algorithm
Idea: Instead of computing the shortest path from node 1
to 6, we compute all
shortest paths from node 1 to node i
(i=2,..,6).