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 (1), S→B (6), C→B (9), D→A (9), D→T (8), B→D (4), B→A (5), B→T (6), A→T (6). What is the maximum flow from S to T?

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

Correct answer: B. 7

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

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic