Data Structures & AlgorithmsVery hardGATE CS · Codeforces Div 2 B

A connected undirected graph has the vertices I, K, N, P, U, W and the edges U–W, U–N, U–P, W–K, W–I, N–K, N–I. How many bridges does it have (edges whose removal disconnects the graph)?

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

Correct answer: D. 1

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

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic