Single-Commodity Network Flow

Introduces flow networks for routing a single commodity (such as passengers) through a capacitated directed graph. Covers the definition of a flow, the capacity and conservation constraints, the value of a flow, and how to increase it by augmenting along an s-t path.

Step 1 of 157%

Tutorial

Flow Networks and Valid Flows

A flow network is a directed graph G=(V,E)G=(V,E) together with a nonnegative capacity c(u,v)0c(u,v) \geq 0 on each edge, and two distinguished vertices: a source ss and a sink tt. We interpret c(u,v)c(u,v) as the maximum amount that can travel along edge (u,v)(u,v). In a routing context, c(u,v)c(u,v) is the number of seats available on the flight from airport uu to airport vv.

A flow is a function ff assigning a value f(u,v)f(u,v) to every edge so that two rules hold:

  1. Capacity constraint: 0f(u,v)c(u,v)0 \leq f(u,v) \leq c(u,v) for every edge (u,v)E(u,v) \in E.
  2. Conservation: for every vertex vs,tv \neq s, t,
u:(u,v)Ef(u,v)  =  w:(v,w)Ef(v,w).\sum\limits_{u : (u,v)\in E} f(u,v) \;=\; \sum\limits_{w : (v,w)\in E} f(v,w).

Conservation says that no internal airport accumulates passengers — everyone who arrives must depart.

For a small illustration, take the two-edge network sats \to a \to t with c(s,a)=5c(s,a) = 5 and c(a,t)=5c(a,t) = 5. Setting f(s,a)=f(a,t)=3f(s,a) = f(a,t) = 3 gives a valid flow: 353 \leq 5 on each edge, and vertex aa has 33 units in and 33 units out.

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