Data Structures & AlgorithmsVery hardICPC regional · Codeforces Div 2 D

Directed graph on vertices 0 to 5 with edges: 3→5, 5→1, 4→0, 3→4, 3→2, 1→4, 0→4, 1→3, 3→1, 0→2, 3→0, 4→3, 0→5, 5→4, 1→5, 5→3, 4→5, 1→2. What is the smallest number of edges whose deletion makes vertex 5 unreachable from 0?

  1. A. 2
  2. B. 3
  3. C. 4
  4. D. 1

Correct answer: A. 2

By max-flow min-cut with unit capacities, the answer equals the maximum number of edge-disjoint paths from 0 to 5, which is 2. The source's out-edges (3) and the edges on one shortest path (1) are not cuts in general.

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic