Clique (graph theory) Created 2026-10-14 Updated 2026-10-14
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.
Clique number Created 2026-10-06 Updated 2026-10-14
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 .
Grötzsch graph 2026-10-14
The Grötzsch graph is the Mycielskian of the five-vertex cycle graph. Take original edges , with indices interpreted modulo five; add and for every . There are eleven vertices and twenty edges: five original, ten between originals and Mycielski shadow vertices, and five from the Mycielski apex.
Give colours , give each the colour of , and give colour 4. This is a proper vertex colouring. The Mycielskian chromatic increase proves that three colours are impossible, so the chromatic number is exactly four. The Mycielskian triangle preservation proves that this is a triangle-free graph. In particular its clique number is only two, even though its chromatic number is four.
Figure 1.
From a three-colour cycle graph to the four-colour Grötzsch graph
. The outer pentagon on the right retains the original vertices; the inner ring contains Mycielski shadow vertices and has no ring edges. The central Mycielski apex receives colour 4. Numbers identify colours independently of the fills, and labels identify the vertices. Crossings without dots are not vertices. Details.
The Mycielski apex has an independent set as its graph neighbourhood, yet all three old colours are needed there in any three-colour proper vertex colouring of the subgraph obtained by deleting it. Thus a locally easy group of mutually nonadjacent neighbours can carry globally incompatible colour requirements. Absence of triangles in a graph alone cannot bound the chromatic number.
Maximal clique Created 2026-10-14 Updated 2026-10-14
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]
Maximum clique Created 2026-10-14 Updated 2026-10-31
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.
Let count the copies of the complete graph in the binomial random graph . By linearity of the expected value and independence of distinct edges,
Throughout, is sufficiently large that . We have , and .
First, since ,
The first moment method proves .
For the existence of a -clique, put and . Since ,
This alone is insufficient: we must control the variance via the overlap formula for the variance of a clique count. Let indicate that a given -set spans a clique. If , the two copies share edges, so
For their edge sets are disjoint and the covariance vanishes, even when they share one vertex. Counting ordered pairs of -sets gives the exact formula
This includes the diagonal case .
To bound the overlap factor, regard it as the probability that a uniformly chosen -set intersects a fixed in exactly vertices. A union bound over the possible specified -subsets of yields
Here is a falling factorial, and the last bound holds for . Therefore
For , the concave quadratic is minimized at an endpoint. Its endpoint values are and , both at least . Thus every power of in the last sum is at most , and
because the logarithm of its numerator is . The second moment method, or Chebyshev's inequality directly, gives . Finally, every larger clique contains a -clique, so the absence of excludes all larger sizes. The clique number is exactly with high probability:
A perfect elimination ordering of a finite simple graph is a permutation of its vertices such that each set of later graph neighbours
is a clique. Thus is a simplicial vertex in the remaining induced subgraph . Empty and one-vertex sets satisfy the clique condition automatically. The order here is the order of deletion: goes first.
The characterization is powerful: a finite simple graph is a chordal graph if and only if it has a perfect elimination ordering. For one proof outline, the earliest vertex of an induced cycle of length at least four would have two later graph neighbours on that graph cycle that are not adjacent, contradicting the clique condition. Conversely, every nonempty chordal graph has a simplicial vertex, and every induced subgraph of a chordal graph is a chordal graph; repeatedly deleting such a vertex supplies the ordering.[ref]
In the square-plus-diagonal chordal graph above, is a perfect elimination ordering, with later graph neighbourhoods , , , and . Starting instead with fails: its graph neighbours do not form a clique, because is absent. Thus even a chordal graph can have a poor elimination ordering.
For a larger example, join three triangles along shared edges, using
The exact graph neighbourhoods are , , , , and . The ordering has later graph neighbourhoods , , , , and , all cliques; this certifies that the graph is a chordal graph without enumerating its graph cycles. Its maximal cliques , , form a junction tree in that order, with intersections and .
Figure 1.
A perfect elimination ordering removes three overlapping triangles without fill-in; choosing the central vertex first adds three edges
. Details.
To find an ordering, maximum cardinality search starts with all scores zero, repeatedly selects an unselected vertex of largest score, and increases each unselected graph neighbour's score by one. Reverse the selection order to obtain a candidate perfect elimination ordering. For the three-triangle graph, one valid selection sequence is , with scores at selection ; reversing it gives the displayed deletion order. On a chordal graph every tie choice works. On an arbitrary graph, test the resulting later graph neighbourhoods for the clique condition to recognize chordal graphs. Suitable adjacency lists, score buckets and a linear-time verification method give recognition.[ref]
The deletion rule also explains sparse Gaussian elimination. For a symmetric positive-definite matrix whose matrix graph is , eliminating pivot applies the Schur complement update
Only pairs of remaining graph neighbours of can acquire new off-diagonal entries. A perfect elimination ordering already has all those edges, so Cholesky decomposition creates no symbolic fill-in. Positive definiteness ensures nonzero pivots in exact arithmetic. Special numerical cancellation can suppress predicted entries, and floating-point rounding affects their values.[ref] In the three-triangle graph, deleting first instead connects every pair in and adds exactly . The graph was already a chordal graph; the extra fill-in comes from the ordering.
One further reward is optimal graph coloring. Process a perfect elimination ordering backwards and give each vertex the smallest positive color absent from its already colored graph neighbours. Those graph neighbours form a clique, so this greedy algorithm uses at most the clique number colors; any clique of that size requires at least that many. In the three-triangle graph, coloring gives colors , so both the chromatic number and the clique number are three. Every maximal clique also occurs among : take its earliest vertex and use maximality. The same ordering therefore supports graph coloring, maximal clique extraction and sparse computation.
Historically, Donald J. Rose, Robert E. Tarjan and George S. Lueker's 1976 paper connected graph elimination to symmetric sparse matrices and gave a search-based algorithm for finding a perfect elimination ordering when one exists. Its abstract distinguishes a minimal elimination ordering from a minimum one: removing avoidable fill-in does not by itself minimize the total number of added edges.[ref]