A clique in a simple graph is a set of vertices such that every pair of distinct members is adjacent. Equivalently, its induced subgraph is a complete graph. The surrounding graph need not itself be complete: a clique describes complete pairwise connectivity within a selected group.
Consider the original graph with
The set is a clique because all three pairs are edges. The set is not a clique: the edge is missing. A path in a graph connecting all selected vertices is therefore insufficient; every pair must have a direct edge.
Figure 1.
A maximum clique and a smaller maximal clique in the same graph
. Left: the three highlighted vertices form the unique maximum clique. Right: the edge gives a maximal clique of size two, because no outside vertex is adjacent to both endpoints. Both panels use the same original graph; highlighted vertices and edges select different cliques. Details.
Here the clique number is . The maximum clique is , but and are also maximal cliques. This distinction is useful when an algorithm stops as soon as its current clique cannot be enlarged: that stopping condition establishes maximality, while finding the largest possible clique is a separate requirement.
Given an explicitly represented finite simple graph and a nonnegative integer , decide whether contains a clique of size . The problem is NP-complete. A polynomial-time many-one reduction from SAT first obtains conjunctive normal form by a Tseitin transformation, makes one vertex per Boolean literal occurrence, and joins noncontradictory occurrences from different Boolean clauses. A clique as large as the Boolean clause count is equivalent to a satisfying assignment.
A maximum clique is a clique with the greatest possible number of vertices in the graph. Its size is the clique number. Every maximum clique is a maximal clique, since adding a vertex would produce a larger clique. A graph can have several maximum cliques; the word maximum specifies their common size, rather than uniqueness.
A maximal clique is a clique not strictly contained in another clique. This is distinct from a maximum clique, whose size equals the clique number. In a triangulated probabilistic graphical model, maximal cliques are the natural nodes of a junction tree.
Maximality is a condition on set inclusion: no outside vertex is adjacent to every member of the current clique. In the five-vertex example, is maximal because are not adjacent to , while is not adjacent to . Yet is larger. Checking every possible one-vertex extension is enough: if a larger containing clique existed, any one of its new vertices could already be added.[ref]
An edge-disjoint clique packing is a collection of -cliques no two of which share an edge; they may share vertices. Its maximum cardinality changes by at most one when a single edge is toggled. Removing that edge destroys at most one packed clique, which makes this variable suitable for an edge-exposure martingale.
Let count -cliques in a binomial random graph on vertices and count distinct ordered pairs sharing an edge. The clique conflict graph gives : order its vertices randomly and keep each one preceding all its neighbours, then apply the Cauchy-Schwarz inequality. Another application gives . If and is no larger, then . Changing one edge changes by at most one, so the Azuma-Hoeffding inequality for an edge-exposure martingale yields the displayed exponential absence bound. This supports a union bound over exponentially many adaptive candidate subsets.
The clique conflict graph has one vertex for each -clique of a fixed graph, and joins two when they share an edge. Its independent sets correspond exactly to edge-disjoint clique packings. The Caro-Wei bound converts clique-count and overlap estimates into a packing lower bound.
The clique number is the maximum number of vertices in a clique of a finite graph:
We use for the graph with no vertices. For a nonempty complete graph, ; for the five-vertex example, .
If the graph contains and no as subgraphs, its clique number is exactly , because every larger clique contains a clique with vertices. Also : a proper vertex coloring must assign different colors to all members of any clique. This lower bound need not be an equality; the cycle graph has clique number and chromatic number .
A clique records pairwise relationships. If vertices represent sets and an edge means a nonempty intersection, a clique does not by itself guarantee an element common to every set. Take
Then , and , so their intersection graph is . But . The graph faithfully records all three pairwise intersections; the stronger claim of a single shared element requires additional hypotheses.

Articles by others on the same topic (1)

In graph theory, a **clique** is a subset of vertices in an undirected graph such that every two distinct vertices in the clique are adjacent. In simpler terms, a clique is a complete subgraph where every vertex is connected to every other vertex. More formally, a clique of size \( k \) is a set of \( k \) vertices such that there are edges between every pair of vertices in that set.