Data Structures & AlgorithmsHardGATE CS · Codeforces Div 2

Connected undirected graph on vertices A, B, C, D, E, F, G, H with edges A–D (1), A–H (1), B–D (1), B–E (1), B–F (1), B–H (1), C–F (1), C–G (1) (weights ignored). How many bridges does it have? A bridge is an edge whose removal disconnects the graph.

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

Correct answer: A. 4

Removing each edge in turn and testing connectivity gives 4 bridges. Articulation points or the cyclomatic number are different structural counts that a student may mix up.

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic