Data Structures & AlgorithmsHardICPC regional · GATE CS top band

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

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

Correct answer: D. 5

Removing each edge in turn and testing connectivity gives 5 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