Data Structures & AlgorithmsHardGATE CS · ICPC regional
Directed flow network on vertices 0 to 4 (source 0, sink 4) with capacities (u→v (c)): 4→1 (5), 1→2 (5), 0→1 (10), 0→3 (1), 4→0 (7), 2→3 (2), 3→4 (8), 4→2 (2). What is the maximum amount of flow that can be sent from 0 to 4 while respecting every capacity?
- A. 3
- B. 2
- C. 11
- D. 8
Correct answer: A. 3
Max-flow equals min-cut and here is 3. The single best path carries only 2, while the source's total outgoing capacity (11) and the sink's total incoming capacity (8) are only upper bounds.
Practise more Trees, Graphs, Recursion and Dynamic Programming questionsTrees, Graphs, Recursion and Dynamic Programming: notes and key points
More Trees, Graphs, Recursion and Dynamic Programming questions
- 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…
- Directed flow network on vertices 0 to 5 (source 0, sink 5) with capacities (u→v (c)): 2→3 (8), 5→0 (8), 1→5 (6), 3→2 (10), 5→3 (6), 0→3…
- Directed flow network on vertices 0 to 4 (source 0, sink 4) with capacities (u→v (c)): 2→3 (5), 0→3 (10), 1→4 (5), 1→3 (9), 3→4 (6), 0→4…
- Directed flow network on vertices 0 to 6 (source 0, sink 6) with capacities (u→v (c)): 4→1 (9), 6→0 (8), 1→0 (1), 0→4 (2), 2→0 (6), 0→6…
- Directed flow network on vertices 0 to 5 (source 0, sink 5) with capacities (u→v (c)): 4→3 (1), 3→5 (4), 4→2 (3), 0→3 (7), 4→1 (10), 0→4…
- Directed flow network on vertices 0 to 4 (source 0, sink 4) with capacities (u→v (c)): 0→1 (4), 3→2 (7), 4→0 (2), 3→4 (8), 4→2 (1), 1→4…