Data Structures & AlgorithmsVery hardGATE CS · ICPC regional

A flow network has source S and sink T, with directed arcs and capacities in brackets: S→A (9), D→T (3), A→D (1), A→T (4), B→D (4), B→T (3). What is the maximum flow from S to T?

  1. A. 4
  2. B. 5
  3. C. 6
  4. D. 9

Correct answer: B. 5

Edmonds–Karp (augmenting paths with residual capacities) gives maximum flow 5, which equals the minimum cut capacity. Sending along a single best path only carries 4; the total out of S is 9; and minimising the number of cut arcs (ignoring capacity) gives 1.

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic