Data Structures & AlgorithmsVery hardGATE CS · Codeforces Div 2 B

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

  1. A. 2
  2. B. 13
  3. C. 14
  4. D. 15

Correct answer: B. 13

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

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic