Practice Discrete Math

Algorithms / Two Cliques Complement

Least You Need to Know: TwoCliques, Complement Graphs, and Bipartite Recognition

TwoCliques is a great exam contrast case: it sounds like a hard partition problem, but it becomes easy after the right graph transformation. A graph can be partitioned into two cliques exactly when its complement is bipartite, so the right move is a complement-and-check reduction to a tractable problem.

The least you need to know

Key notation

\overline{G} complement graph of `G`
clique every pair of vertices in the set is adjacent
bipartite vertices split into two independent sets

Tiny worked example

  • Suppose `G` can be partitioned into cliques `C_1` and `C_2`.
  • In the complement graph `\overline{G}`, there are no edges inside `C_1` or inside `C_2`.
  • So `C_1` and `C_2` are independent sets of `\overline{G}`.
  • That means `\overline{G}` is bipartite, and the converse argument works too.

Common mistakes

How to recognize this kind of problem

Start practice