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)?

  1. A. 5
  2. B. 1
  3. C. 6
  4. 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.

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic