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?
- A. 2
- B. 13
- C. 14
- 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.
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
- A flow network has source S and sink T, with directed arcs and capacities in brackets: S→B (7), S→T (6), A→B (5), A→T (3), E→B (2), B→C…
- Starting from the integer 3, one operation either adds 1, subtracts 1, or doubles the current value. Values may be any non-negative…
- A pile holds p stones. In one move a player removes exactly s stones, where s is one of {4, 5, 6} and s ≤ the pile size. The player who…
- A pile holds p stones. In one move a player removes exactly s stones, where s is one of {2, 3, 5} and s ≤ the pile size. The player who…
- A directed acyclic graph has the vertices A, E, F, J, S, U and the arcs A→E, A→S, A→F, E→J, E→S, E→F, E→U, J→U, F→U. Two players…
- A pile holds p stones. In one move a player removes exactly s stones, where s is one of {3, 4, 6} and s ≤ the pile size. The player who…