Data Structures & AlgorithmsHardCodeforces Div 2 · ICPC regional

Bipartite graph with left side {A, B, C}, right side {D, E, F, G} and edges A–D, A–F, B–D, B–F, B–G. What is the size of a maximum matching (largest set of edges with no shared endpoint)?

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

Correct answer: C. 2

Trying every set of disjoint edges gives a maximum matching of size 2. Counting the edges, or assuming the smaller side is always matched, gives a wrong answer.

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic