Data Structures & AlgorithmsVery hardGATE CS · ICPC regional

An undirected graph has the vertices F, I, M, Q, T and the edges I–Q, Q–M, I–F, Q–F, I–T, T–Q, T–M, I–M, T–F. What is the minimum number of edges that must be deleted so that the remaining graph is bipartite (its vertices can be split into two sets with every edge joining the two sets)?

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

Correct answer: C. 3

Trying all deletion sets of increasing size finds 3. Deleting vertices instead needs 2 vertex deletions, and the cyclomatic number m − n + 1 = 5 is only a bound on edges removed to break all cycles.

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic