Solve network flow problems
8 steps · about 4 h 40 min · Intermediate
- Model the network (guide, Wikipedia, 35 min)
Represent directed capacities, conservation and the source and sink without hiding real constraints.
- State the objective (guide, Wikipedia, 35 min)
Distinguish feasible flow from the task of maximising total value through the network.
- Construct residual choices (guide, Wikipedia, 30 min)
Track remaining forward capacity and reversible earlier decisions after each augmentation.
- Implement augmenting paths (guide, Wikipedia, 40 min)
Increase flow along valid residual paths while preserving capacity and conservation invariants.
- Choose paths predictably (guide, Wikipedia, 35 min)
Use breadth-first augmenting paths to obtain a clear polynomial running-time bound.
- Prove optimality with a cut (guide, Wikipedia, 35 min)
Connect a saturated separating cut with an upper bound matching the constructed flow.
- Reduce bipartite matching (guide, Wikipedia, 35 min)
Convert compatible pairs into a unit-capacity network and translate the selected edges back.
- Extend to demands (guide, Wikipedia, 35 min)
Recognise allocation variants with lower bounds or supplies and reduce them to a feasible circulation.