Data Structures & AlgorithmsHardICPC regional · GATE CS
Connected simple undirected graph on vertices 0 to 8 with edges: 4–5, 2–4, 6–7, 2–8, 0–8, 3–6, 2–5, 1–5, 2–7. How many bridges does it have (edges whose removal disconnects the graph)?
- A. 5
- B. 1
- C. 6
- D. 3
Correct answer: C. 6
Removing each edge in turn and recounting components finds 6 bridge(s). The cycle rank m−n+1 = 1 counts independent cycles, not cuts, and the cut vertices (5) and leaves (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
- Connected simple undirected graph on vertices 0 to 7 with edges: 0–4, 2–4, 4–5, 4–7, 1–5, 3–5, 3–6, 5–7. How many articulation points…
- Connected simple undirected graph on vertices 0 to 6 with edges: 3–5, 2–4, 1–5, 0–6, 3–4, 0–2, 4–5, 2–6, 1–3. How many bridges does it…
- Connected simple undirected graph on vertices 0 to 7 with edges: 5–7, 4–6, 4–5, 0–5, 2–6, 1–3, 1–7, 2–5. How many bridges does it have…
- Connected simple undirected graph on vertices 0 to 7 with edges: 1–5, 3–4, 2–6, 0–5, 1–6, 3–5, 3–7, 2–5. How many articulation points…
- Connected simple undirected graph on vertices 0 to 6 with edges: 1–2, 0–2, 2–6, 1–5, 1–6, 0–4, 2–5, 3–4, 0–3. How many articulation points…
- Connected simple undirected graph on vertices 0 to 7 with edges: 1–7, 1–2, 2–4, 2–6, 4–6, 2–3, 0–7, 4–5. How many bridges does it have…