Data Structures & AlgorithmsVery hardICPC regional · GATE CS

Connected simple undirected graph on vertices 0 to 8 with edges: 2–5, 5–6, 3–5, 3–4, 0–1, 1–4, 5–7, 7–8, 4–6. How many bridges does it have (edges whose removal disconnects the graph)?

  1. A. 4
  2. B. 1
  3. C. 3
  4. D. 5

Correct answer: D. 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 (4) and leaves (3) answer different questions.

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic