Data Structures & AlgorithmsHardCodeforces Div 2 C · ICPC regional
Undirected weighted graph on vertices 0 to 4 with edges: 1–4 (1), 0–3 (14), 0–1 (9), 1–3 (13), 2–4 (12), 2–3 (13), 3–4 (11), 0–2 (3), 1–2 (11). Over all paths from 0 to 4, what is the smallest possible value of the heaviest edge on the path (the bottleneck or minimax path weight)?
- A. 10
- B. 24
- C. 3
- D. 9
Correct answer: D. 9
Adding edges in increasing weight until 0 and 4 become connected gives bottleneck 9. The minimum total path weight (10), the MST weight (24) and the lightest edge at 0 (3) answer different questions.
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 acyclic graph on vertices 0 to 6 with weighted edges (u→v (w)): 0→2 (1), 4→1 (5), 0→1 (4), 2→6 (2), 4→6 (4), 5→1 (7), 0→6 (9)…
- Directed acyclic graph on vertices 0 to 4 with weighted edges (u→v (w)): 1→2 (4), 2→3 (6), 0→2 (2), 2→4 (9), 3→4 (4). What is the largest…
- Directed acyclic graph on vertices 0 to 7 with weighted edges (u→v (w)): 5→2 (8), 1→3 (8), 6→3 (1), 2→3 (7), 0→2 (1), 6→2 (2), 4→7 (4)…
- Directed acyclic graph on vertices 0 to 7 with weighted edges (u→v (w)): 0→7 (7), 2→1 (5), 4→3 (7), 2→6 (5), 6→1 (3), 2→3 (9), 5→7 (7)…
- Directed acyclic graph on vertices 0 to 7 with weighted edges (u→v (w)): 1→7 (5), 0→4 (3), 2→7 (5), 4→2 (2), 5→4 (8), 0→1 (6), 5→6 (6)…
- Directed acyclic graph on vertices 0 to 7 with weighted edges (u→v (w)): 0→6 (6), 4→7 (9), 2→7 (6), 3→1 (9), 0→3 (6), 6→7 (2), 5→2 (6)…