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