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

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

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic