Data Structures & AlgorithmsHardGATE CS · ICPC regional

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

  1. A. 4
  2. B. 6
  3. C. 1
  4. D. 7

Correct answer: B. 6

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

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic