Data Structures & AlgorithmsHardGATE CS · Codeforces Div 2

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

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

Correct answer: B. 4

Trying every set of disjoint edges gives a maximum matching of size 4. 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