Data Structures & AlgorithmsVery hardIBM · Deloitte pattern

An undirected connected graph has edges A–B, B–C, C–D, D–E, E–F. How many articulation points (cut vertices) and how many bridges does it have?

  1. A. 3 articulation point(s), 5 bridge(s)
  2. B. 4 articulation point(s), 4 bridge(s)
  3. C. 5 articulation point(s), 4 bridge(s)
  4. D. 4 articulation point(s), 5 bridge(s)

Correct answer: D. 4 articulation point(s), 5 bridge(s)

Removing each vertex (or edge) in turn and checking whether the graph stays connected identifies 4 cut vertices and 5 bridges here. A bridge's endpoints are cut vertices unless one of them is a leaf, and a vertex can be a cut vertex even where no single edge is a bridge (e.g. it joins two otherwise-separate cycles).

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic