Min-Cost Flow: LP Formulation

Formulate the min-cost flow problem as a linear program: decision variables on each arc, a linear cost objective, flow-conservation constraints at each node, and capacity bounds on each arc.

Step 1 of 157%

Tutorial

The Min-Cost Flow LP: Variables, Objective, and Capacities

In a min-cost flow problem, we have a directed network G=(V,E)G=(V,E) in which each arc (i,j)(i,j) has a capacity uij0u_{ij}\ge 0 and a per-unit shipping cost cijc_{ij}. We must ship dd units of flow from a source ss to a sink tt as cheaply as possible.

We model this as a linear program. The decision variable on each arc is

xij=units of flow sent along arc (i,j).x_{ij} = \text{units of flow sent along arc } (i,j).

The objective minimizes the total shipping cost:

min(i,j)Ecijxij.\min \sum_{(i,j)\in E} c_{ij}\, x_{ij}.

Each flow variable must respect the arc's capacity bound:

0xijuijfor every arc (i,j)E.0 \le x_{ij} \le u_{ij}\quad\text{for every arc } (i,j)\in E.

The lower bound 00 enforces that flow only moves in the arc's stated direction.

For example, suppose the network has three arcs with the following data:

Arccijuij(s,a)23(s,t)52(a,t)14\begin{array}{c|cc} \text{Arc} & c_{ij} & u_{ij} \\ \hline (s,a) & 2 & 3 \\ (s,t) & 5 & 2 \\ (a,t) & 1 & 4 \end{array}

The objective and the capacity bounds of the LP are

min  2xsa+5xst+xat,\min\; 2x_{sa} + 5x_{st} + x_{at}, 0xsa3,0xst2,0xat4.0\le x_{sa}\le 3,\quad 0\le x_{st}\le 2,\quad 0\le x_{at}\le 4.

We still need flow-conservation constraints, which we'll add shortly.

navigate · Enter open · Esc close · ⌘K/Ctrl K toggle