Data Structures & AlgorithmsVery hardGATE CS · Codeforces Div 2

Undirected weighted graph on vertices A, B, C, D, E with edges A–B (2), A–C (1), A–D (3), A–E (1), B–C (2), B–D (2), C–D (2). An edge is CRITICAL if it appears in every minimum spanning tree. How many critical edges does this graph have?

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

Correct answer: A. 2

There are 5 minimum spanning trees; the edges common to all of them number 2. Counting edges that appear in some tree is a different quantity.

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic