Data Structures & AlgorithmsModerateGATE CS · ICPC regional

A connected undirected graph has the vertices A, I, J, N, O, X, Z and the edges A–X, A–O, X–O, X–I, O–Z, O–N, I–N, I–J. How many bridges does it have (edges whose removal disconnects the graph)?

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

Correct answer: B. 2

Removing each edge in turn and testing connectivity finds 2 bridges. The cyclomatic number m − n + 1 = 2 counts independent cycles, not bridges; there are 2 articulation vertices, and 2 vertices of degree 1.

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic