Data Structures & AlgorithmsHardICPC regional · GATE CS

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 have (edges whose removal disconnects the graph)?

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

Correct answer: A. 1

Removing each edge in turn and recounting components finds 1 bridge(s). The cycle rank m−n+1 = 3 counts independent cycles, not cuts, and the cut vertices (2) and leaves (0) answer different questions.

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic