0% found this document useful (0 votes)
21 views1 page

Linear Programming Formulation: Graph

This document discusses a linear programming formulation for finding the shortest path in a directed graph between a source node s and target node t. The formulation defines variables xij to indicate whether each edge (i, j) is part of the shortest path, and aims to minimize the total weight of selected edges subject to the constraint that it forms a valid path from s to t. The solution to this linear program will always be integral, selecting either 0 or 1 edge for each variable to identify the shortest path. The dual program relates to consistent heuristics used in the A* shortest path search algorithm.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views1 page

Linear Programming Formulation: Graph

This document discusses a linear programming formulation for finding the shortest path in a directed graph between a source node s and target node t. The formulation defines variables xij to indicate whether each edge (i, j) is part of the shortest path, and aims to minimize the total weight of selected edges subject to the constraint that it forms a valid path from s to t. The solution to this linear program will always be integral, selecting either 0 or 1 edge for each variable to identify the shortest path. The dual program relates to consistent heuristics used in the A* shortest path search algorithm.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

GRAPH

Linear programming formulation


There is a natural linear programming formulation for the shortest path problem, given below. It
is very simple compared to most other uses of linear programs in discrete optimization,
however it illustrates connections to other concepts.
Given a directed graph (V, A) with source node s, target node t, and cost wij for each edge (i, j)
in A, consider the program with variables xij

minimize

subject to

and for

all i,
The intuition behind this is that

is an indicator variable for whether edge (i, j) is part of

the shortest path: 1 when it is, and 0 if it is not. We wish to select the set of edges with
minimal weight, subject to the constraint that this set forms a path from s to t (represented
by the equality constraint: for all vertices except s and t the number of incoming and
outcoming edges that are part of the path must be the same (i.e., that it should be a path
from s to t).
This LP has the special property that it is integral; more specifically, every basic optimal
solution (when one exists) has all variables equal to 0 or 1, and the set of edges whose
variables equal 1 form an s-t dipath. See Ahuja et al.[12] for one proof, although the origin of
this approach dates back to mid-20th century.
The dual for this linear program is
maximize yt ys subject to for all ij, yj yi wij
and feasible duals correspond to the concept of a consistent heuristic for the A*
algorithm for shortest paths. For any feasible dual y the reduced
costs

are nonnegative and A* essentially runs Dijkstra's

algorithm on these reduced costs

You might also like