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