Data Structures & AlgorithmsVery hardGATE CS · ICPC regional

Directed flow network on vertices 0 to 5 (source 0, sink 5) with capacities (u→v (c)): 2→0 (6), 0→3 (3), 0→5 (9), 4→1 (9), 0→1 (6), 2→4 (8), 1→2 (1), 5→1 (3), 3→4 (1), 2→5 (5), 2→1 (7), 1→5 (7). What is the maximum amount of flow that can be sent from 0 to 5 while respecting every capacity?

  1. A. 9
  2. B. 16
  3. C. 18
  4. D. 21

Correct answer: B. 16

Max-flow equals min-cut and here is 16. The single best path carries only 9, while the source's total outgoing capacity (18) and the sink's total incoming capacity (21) are only upper bounds.

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic