Data Structures & AlgorithmsHardICPC regional · Codeforces Div 2 D
Directed graph on vertices 0 to 6 with edges: 2→4, 4→5, 6→2, 0→6, 5→4, 3→0, 0→4, 6→3, 3→6, 6→0, 0→5, 2→5, 3→5, 1→4, 5→0, 5→6, 2→6, 5→1. What is the smallest number of edges whose deletion makes vertex 6 unreachable from 0?
- A. 3
- B. 2
- C. 4
- D. 1
Correct answer: B. 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 (3) and the edges on one shortest path (1) are not cuts in general.
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 graph on vertices 0 to 5 with edges: 4→5, 5→1, 3→4, 0→5, 5→3, 0→1, 2→1, 3→1, 5→0, 4→3, 3→5, 5→2, 0→3, 3→2, 2→0, 2→5, 2→3. What is…
- 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…
- Directed graph on vertices 0 to 6 with edges: 6→5, 5→0, 0→4, 1→5, 1→0, 0→6, 1→2, 5→4, 4→2, 1→4, 5→1, 0→1, 5→6, 0→5, 2→1, 3→6, 0→2, 1→6…
- Directed graph on vertices 0 to 6 with edges: 2→5, 0→6, 2→4, 4→2, 1→0, 3→1, 3→6, 1→5, 3→5, 4→6, 6→2, 0→5, 2→1, 0→1, 4→1, 6→4, 1→6, 4→3…
- Directed graph on vertices 0 to 5 with edges: 0→4, 2→1, 0→5, 1→2, 5→1, 1→5, 3→0, 3→1, 5→4, 5→0, 2→5, 3→4, 0→2, 5→3, 3→5. What is the…
- Directed graph on vertices 0 to 5 with edges: 3→1, 3→2, 3→5, 3→4, 5→3, 1→0, 5→0, 0→4, 5→1, 1→5, 2→4, 3→0, 0→5, 0→3, 1→3, 2→5, 2→3. What is…