= Clique Detection

A clique is a subset of vertices that are all pairwise connected. A _maximal_
clique cannot be extended by adding another vertex without breaking the
all-connected property.

[cols="1,3"]
|===
| Algorithm | What it does

| xref:algorithms/clique_detection/bron_kerbosch.adoc[Bron-Kerbosch]
| Enumerates all maximal cliques using backtracking with pivoting.
  Worst-case _O(3^(V/3))_, but fast in practice on sparse graphs. The same
  header also exposes `bron_kerbosch_clique_number(g)`, which returns only
  the size of the largest clique.
|===

NOTE: Clique enumeration is NP-hard in general. Cliques and independent sets
are dual under graph complementation (a clique in `G` is an independent set
in the complement), so neither direction is inherently cheaper — both face
the same worst-case complexity.
