Data Structures & AlgorithmsHardICPC regional · Codeforces Div 2 D

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

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

Correct answer: D. 2

By max-flow min-cut with unit capacities, the answer equals the maximum number of edge-disjoint paths from 0 to 6, which is 2. The source's out-edges (5) 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