ShortestPathLP

Top | recent changes | Preferences


shortest path

input: a directed graph G=(V,E) with edge costs c, a source vertex s, and a destination vertex t

goal: find the minimum-cost path from s to t

primal: ("embedding on a line")

Use a variable d(v) for each vertex v ∈ E.

Maximize d(t)-d(s) subject to:
d(v)-d(u) ≤ c(u,v) for each edge (u,v) ∈ E.

prove: the cost of any feasible solution is a lower bound on the cost of the shortest path.

prove: the solution given by d(v) = shortest path distance from s to v is feasible, and therefore optimal.

dual: (min-cost flow of one unit from s to t)

Use a variable f(e) for each edge e in E.

Minimize u,v c(u,v) f(u,v) subject to:
(conservation) v f(w,v) - u f(u,w) = 0 for each vertex w other than s and t,
(flow out of s is 1) v f(s,v) - u f(u,s) = 1
(flow into t is 1) v f(t,v) - u f(u,t) = -1
f(u,v) >= 0 for each edge (u,v) ∈ E.

A "flow on a path" is a feasible solution that sends 1 unit of flow on a single path.

prove: any feasible solution is a weighted combination of flows on paths, where the sum of the weights is 1.

prove: for any feasible solution f, there is a path of cost at most cost(f) = u,v c(u,v) f(u,v).

Caution: the constraints in the dual above are equality constraints rather than inequalities because the corresponding variable in the primal is not restricted to be non-negative.  This is true in general: if, in the primal linear program, a constraint is an equality constraint, then the corresponding variable in the primal will not be constrained to be non-negative.   Likewise, if a variable in the primal is not constrained to be non-negative, then the corresponding constraint in the dual will be an equality constraint.  One way to understand this is to work carefully through the reasoning behind weak duality, and consider what role the non-negativivity of the variables plays.



Top | recent changes | Preferences
This page is read-only | View other revisions
Last edited January 23, 2004 4:09 pm by NealYoung (diff)
Search: