Data Structures & AlgorithmsHardCodeforces Div 2 C · GATE CS

A flow network has source S and sink T, with directed arcs and capacities in brackets: S→E (6), S→A (2), S→C (2), S→T (6), E→T (2), D→A (1), D→C (4), D→T (2), A→C (8), C→D (7). What is the maximum flow from S to T?

  1. A. 16
  2. B. 10
  3. C. 3
  4. D. 11

Correct answer: B. 10

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

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic