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