Data Structures & AlgorithmsHardICPC regional · GATE CS

Simple undirected graph on vertices 0 to 5 with edges: 0–1, 1–5, 2–5, 1–3, 3–4, 1–4, 3–5, 2–3, 0–4, 2–4, 1–2. What is the minimum number of edges that must be deleted so that the remaining graph is bipartite?

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

Correct answer: A. 3

Every odd cycle must lose an edge, and deleting 3 edges is enough and necessary. The cycle rank (6) counts what is needed to make a forest, and the conflicts of one BFS colouring (4) do not give the minimum.

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic