Data Structures & AlgorithmsVery hardICPC regional · GATE CS

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

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

Correct answer: B. 2

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

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic