Purpose: Alexander Karzanov’s 1974 maximum flow algorithm — the first to introduce the preflow, the concept that push-relabel would later build its entire framework on.

The key concept: preflow

A flow requires conservation at every internal vertex (inflow = outflow). A preflow relaxes this to

allowing vertices to hold excess. This is a huge liberation: you can push flow forward aggressively without checking whether it can all get through, and clean up afterwards.

Algorithm

Within each level graph (as in Dinic):

  1. Saturate every edge out of , creating a preflow with excess at ‘s neighbours.
  2. Forward phase. Process vertices by increasing level. At each vertex with excess, push as much as possible along outgoing level-graph edges.
  3. Backward phase. Some excess cannot reach (the downstream capacity ran out). Process vertices by decreasing level, returning excess back toward along the edges it arrived on.
  4. Repeat until no excess remains anywhere. The preflow is now a genuine blocking flow.
  5. Rebuild the level graph and repeat; phases suffice.

Complexity

  • Blocking flow:
  • Total:
  • Space: with an adjacency matrix

Historical importance

The preflow idea is Karzanov’s lasting contribution. Goldberg and Tarjan’s push-relabel algorithm (1986) took the preflow and discarded the level graph entirely, replacing it with a height function and purely local push/relabel operations. That change turned a phase-structured algorithm into a fully local one, which is what made it parallelisable and, in practice, the fastest max-flow family.

The lineage of flow

AlgorithmYearMechanism
Karzanov1974preflow + forward/backward phases
MPM1978vertex potentials, min-potential pushes
Goldberg-Tarjan push-relabel1986preflow + height function, fully local

All three achieve ; push-relabel with the highest-label rule and the gap heuristic is the one that survives in practice.

Variants / Use Cases

  • Push-relabel — the descendant you should implement
  • Dinic — the level-graph framework
  • Maximum Flow — the topic page
  • Karzanov’s other results — he also proved the bound for unit-capacity Dinic and worked extensively on multicommodity flow