Solve network flow problems

8 steps · about 4 h 40 min · Intermediate

  1. Model the network (guide, Wikipedia, 35 min)

    Represent directed capacities, conservation and the source and sink without hiding real constraints.

  2. State the objective (guide, Wikipedia, 35 min)

    Distinguish feasible flow from the task of maximising total value through the network.

  3. Construct residual choices (guide, Wikipedia, 30 min)

    Track remaining forward capacity and reversible earlier decisions after each augmentation.

  4. Implement augmenting paths (guide, Wikipedia, 40 min)

    Increase flow along valid residual paths while preserving capacity and conservation invariants.

  5. Choose paths predictably (guide, Wikipedia, 35 min)

    Use breadth-first augmenting paths to obtain a clear polynomial running-time bound.

  6. Prove optimality with a cut (guide, Wikipedia, 35 min)

    Connect a saturated separating cut with an upper bound matching the constructed flow.

  7. Reduce bipartite matching (guide, Wikipedia, 35 min)

    Convert compatible pairs into a unit-capacity network and translate the selected edges back.

  8. Extend to demands (guide, Wikipedia, 35 min)

    Recognise allocation variants with lower bounds or supplies and reduce them to a feasible circulation.