Network Flow Reductions

Context: FIT2004_MOC Β· the W11 applied sheet the lecture’s matching agency the W12 applied matching and min-cut drills β€” LO1: transform the input so stock Ford-Fulkerson answers a new problem Β· the flow-world sibling of State-Space Graph Modelling Parent Framework: Ford-Fulkerson Method

Quick Revision

  • 🎯 Objective: build a network whose max flow (or min cut) is the answer βž” run FF unmodified βž” read the answer off the flow value, the middle-edge flows, or the cut sides.
  • πŸ“¦ Core Components: super source/sink | vertex split | bipartite with quotas (incl. DAG path cover) | unit capacities disjoint paths | min cut cheapest two-way split, edges as hard constraints Β· lower bounds and fixed demands βž” Circulation with Demands and Lower Bounds.
  • ⚑ Key Constraint: every answer owes three things β€” the construction (vertices, edges, capacities), why max flow the answer, and the read-off rule. Never modify FF: β€œreduce the problem by transforming the input” (applied footnote).

πŸ“ How It Works

1. Many Sources or Sinks β€” Super Source and Super Sink (applied P2 Β· [P,C,D,HD])

  • Construction βž” new with an edge to each source , capacity total out-capacity of Β· new with an edge from each sink , capacity total in-capacity of βž” FF from to .
  • Why the capacities βž” big enough never to bind, so they add no constraint that the original problem lacked.
  • Contrast with BFS βž” the BFS super source shifts distances by (State-Space Graph Modelling Β§5); here nothing shifts β€” the flow value is unchanged.

2. Vertex Capacities β€” Split Every Vertex (applied P5 Β· [P,C,D,HD])

  • Construction βž” each becomes with capacity Β· every edge into now enters , every edge out of leaves Β· delete .
  • Why βž” all flow through must cross the single edge , so the vertex limit becomes an edge limit FF already enforces β€” conservation pushes everything through it, the capacity constraint caps it.

3. Bipartite Matching and Quota Assignment (lecture Β· applied P3 [C,D,HD] credit discussion Β· P7)

  • Matching agency (lecture) βž” men , women , a preference is an edge of capacity Β· capacity , capacity βž” max flow max number of matches Β· matched pairs middle edges carrying .
  • Why FF beats greedy βž” a greedy pairing stalls at on the lecture example where is possible; a backward edge re-assigns an earlier match to free a partner.
  • Quotas βž” the source edge’s capacity is how many matches that vertex may take (β€œif Zach pays more” ⟹ ) Β· in general supply, demand, how many times that pair may be used.
  • matrix with row sums , column sums (P3) βž” cap Β· cap Β· cap βž” feasible max flow (every source edge saturated) βž” Β· the lecturer’s drill , is Β§Applied Β· a 3D version was set on the 2026 S1 D/HD paper.
  • Radio songs (P7) βž” eras genres, cap , cap number of distinct songs in that pair, cap βž” feasible max flow βž” how many songs to pick from that pair.
  • Integrality is load-bearing βž” FF on integer capacities returns an integer flow on every edge (Ford-Fulkerson Method Β§5), so a middle edge carries exactly or β€” a valid matrix entry or match, never a fraction.
  • Circulation with demands (applied P3 aside, taught in W12) βž” demand , demand , no /; the / construction above is exactly that problem’s reduction βž” Circulation with Demands and Lower Bounds Β§2.
  • Minimum path cover of a DAG (W12 applied P2) βž” cover every vertex with vertex-disjoint paths (single-vertex paths allowed), as few as possible.
    • Construction βž” two copies of , left and right Β· DAG edge ⟹ Β· maximum bipartite matching by flow.
    • Answer βž” minimum paths .
    • Why βž” matching to choosing as β€˜s successor Β· capacity on both sides ⟹ successor and predecessor per vertex ⟹ the chosen edges form disjoint paths Β· unmatched a path end, unmatched a path start ⟹ paths ends , minimised by maximising .

4. Disjoint Paths β€” Unit Capacities (applied P6 Β· [P,C,D,HD] Β· past-year question)

  • Edge-disjoint βž” every edge capacity βž” max flow maximum number of edge-disjoint – paths.
  • Both directions βž” disjoint paths ⟹ send along each ⟹ a flow of Β· an integral flow of on unit edges ⟹ trace paths from , each using its own saturated edges Β· a vertex carries at most paths, matching its flow limit.
  • Vertex-disjoint (P6c) βž” add vertex capacity to every , then split as in Β§2 β€” without the split a vertex still carries as many paths as its degree allows.

5. Min Cut as a Cheapest Two-Way Split (W11 applied P4 [C,D,HD] credit discussion Β· W12 applied P3, P5)

  • Problem βž” each job runs on computer or at known costs; related pairs on different computers pay a penalty βž” minimise total cost.
  • Construction βž” cap cost on computer-s Β· cap cost on computer-t (the sheet’s computers and ) Β· each related pair gets two edges and , cap penalty.
  • Why min cut min cost βž” every – cut puts each job on one side and pays: cuts (computer-s cost) Β· cuts (computer-t cost) Β· a related pair split across the cut cuts exactly one of its two edges (the one) ⟹ penalty paid once.
  • Read-off β€” reversed βž” a job runs on the computer whose edge is cut ⟹ side ⟹ computer-t, side ⟹ computer-s Β· minimum cost max flow value Β· the sides come from residual reachability (Min-Cut Max-Flow Theorem Β§5) Β· in class the lecturer reads saturation instead (the job’s saturated terminal edge) β€” same answer whenever exactly one of its two terminal edges is full Β· worked on the lecturer’s network in Β§Applied.
  • Why two opposite edges βž” one edge only charges when , ; the reverse split would be free.
  • edge hard constraint βž” an edge of capacity never crosses in a finite min cut ⟹ ” chosen ⟹ chosen” Β· of pins to .
  • Project selection (W12 P3) βž” cap for profit Β· cap for profit Β· cap when is a prerequisite of .
    • Read-off βž” side projects done, side skipped Β· a profitable drags every prerequisite into through the edges.
    • What the cut pays βž” cost of unprofitable projects forced into (their ) profit given up on profitable projects left in (their ).
    • Answer βž” max profit with the min cut.
  • Land fencing / segmentation (W12 P5) βž” cells ending as ground, cells ending as holes Β· boundary cell cap (may never become a hole) Β· other ground cell cap Β· hole cap Β· each adjacent pair gets two opposite edges cap βž” minimum cost min cut max flow.
    • Why no double count βž” a separated pair has exactly one of its two edges going , and a cut’s capacity counts only those.
    • Same shape as the job split βž” two terminal costs per item a penalty per separated neighbour pair β€” the lecture’s β€œimage segmentation” application.

βš–οΈ Complexity

FF costs on the built network; the construction is .

ConstructionBound on Total
Super source/sinksourcessinksunchanged
Vertex splitunchanged
Matching,
matrix
Edge-disjoint paths
Job split, jobs, pairs (cut ), pseudo-polynomial
DAG path cover
Project selection, projects, prerequisites (cut ), pseudo-polynomial
Fencing, grid (cut ), pseudo-polynomial

βš–οΈ Core Decision Matrix

Cue in the questionConstructionAnswer read-off
”several sources / sinks”super , (Β§1)flow value
”each node can handle at most β€œsplit cap (Β§2)flow value
”pair items from two groups, each used once / times”, quotas on the outer edges (Β§3)middle edges with flow
”exactly per row / per category”outer edges quotas (Β§3)feasible quotas
”paths sharing no edge / no vertex”unit capacities, split for vertices (Β§4)flow value path count
”assign each item to one of two options, penalty when related items split”, , paired penalty edges (Β§5)min cut sides, value cost
”choose a subset for max profit, prerequisites must hold”profits from , costs to , prerequisite edges (Β§5) side; profit min cut
”fewest vertex-disjoint paths covering a DAG” per edge, matching (Β§3)
β€œat least ” on a link, or fixed supplies and needsCirculation with Demands and Lower Boundsfeasible super-edges saturated

When It Flips: the question asks how much / how many ⟹ read the max-flow value · asks which assignment ⟹ read the edge flows · asks which side / which option ⟹ read the min cut.

πŸ“Š Exam Execution Trace & Applied Exercises

Applied Exercise β€” matrix, feasible and infeasible

Problem: (i) the lecturer’s drill , Β· (ii) , . Decide each by max flow.

Final Extracted Output: (i) feasible β€” every and saturated, matrix read off the middle edges (other max flows give other valid matrices) Β· (ii) infeasible β€” column needs two s but only row has any, and a cell holds at most one ; the unsaturated is the evidence.

Applied Exercise β€” supercomputer network (W11 applied P4, the lecturer’s diagram)

Problem: , , (computer-s costs) Β· , , (computer-t costs) Β· and at (split penalty). Find the minimum cost and the assignment, then say how changes it.

Final Extracted Output: minimum cost Β· , on computer-t () Β· on computer-s () Β· split penalty Β· saturation agrees: , , are the full terminal edges.

When It Flips: keeps and apart (cost ) Β· forces them together β€” both on computer-t () or both on computer-s (), either way ⟹ total Β· ties Β· stays on computer-t for every , since and it has no penalty edge.

⚠️ Common Mistakes

  • πŸ’‘ Stopping at β€œrun max flow” βž” feasibility questions need the test ” quotas” and the read-off; without them the answer earns half.
  • πŸ’‘ Job allocation sides swapped βž” side runs on computer-t: a job in pays through its cut edge.
  • πŸ’‘ One edge per related pair βž” penalties then charge only one direction of split; use two opposite edges.
  • πŸ’‘ Vertex-disjoint without the split βž” unit edge capacities alone still let several paths share a vertex.
  • πŸ’‘ Project selection: min cut reported as the profit βž” the cut is what you lose; profit .
  • πŸ’‘ Prerequisite edge reversed βž” ” is a prerequisite of ” is (doing forces ), never .

🧠 Active Recall