Skip to content

Chapter 64. Cliques

A clique is a set of vertices that are all adjacent to one another. Cliques represent complete mutual compatibility, complete interaction, or complete connectivity. They are among the most important structures in graph theory and appear throughout combinatorics, optimization, computer science, social networks, biology, and statistics. (en.wikipedia.org)

If independent sets describe sparse structure, then cliques describe dense structure. Much of graph theory studies the tension between these two extremes.

Clique problems are central in extremal graph theory and computational complexity.

64.1 Definition

Let

G=(V,E) G=(V,E)

be a graph.

A subset

CV C \subseteq V

is called a clique if every pair of distinct vertices in CC is adjacent.

Equivalently,

u,vC,uv    uvE. \forall u,v \in C, \quad u \ne v \implies uv \in E.

Thus the subgraph induced by CC is complete.

For example, in the graph:

{a,b,c,d}, \{a,b,c,d\},

if the edges

ab,  ac,  bc ab,\; ac,\; bc

exist, then:

{a,b,c} \{a,b,c\}

forms a clique.

64.2 Clique Number

A clique is maximum if it has largest possible size.

The size of a maximum clique is called the clique number and is denoted by:

ω(G). \omega(G).

Thus:

ω(G)=max{C:C is a clique in G}. \omega(G) = \max\{|C| : C \text{ is a clique in } G\}.

The maximum clique problem asks for a clique of largest possible size.

This problem is one of the classical NP-complete problems.

64.3 Maximal and Maximum Cliques

The terms maximal and maximum have different meanings.

TermMeaning
Maximal cliqueCannot be enlarged
Maximum cliqueLargest possible clique

Every maximum clique is maximal.

The converse is false.

Example

Suppose a graph contains:

CliqueSize
{a,b,c,d}\{a,b,c,d\}44
{x,y,z}\{x,y,z\}33

The second clique may still be maximal if no additional vertex can be added.

64.4 Cliques in Standard Graphs

Complete Graphs

For the complete graph:

Kn, K_n,

every subset of vertices forms a clique.

Thus:

ω(Kn)=n. \omega(K_n)=n.

Empty Graphs

If a graph contains no edges, then:

ω(G)=1. \omega(G)=1.

No two vertices are adjacent.

Paths

For the path graph PnP_n,

ω(Pn)=2 \omega(P_n)=2

when

n2. n \ge 2.

Every edge forms a clique of size 22, but no larger clique exists.

Cycles

For cycle graphs:

GraphClique Number
C3C_333
Cn,  n4C_n,\; n\ge422

Longer cycles contain no triangles.

Complete Bipartite Graphs

For

Km,n, K_{m,n}, ω(Km,n)=2. \omega(K_{m,n})=2.

Vertices inside the same part are never adjacent.

64.5 Cliques and Independent Sets

Cliques and independent sets are dual under graph complementation.

Let

G \overline{G}

be the complement graph.

Then:

C is a clique in G C \text{ is a clique in } G

if and only if

C is independent in G. C \text{ is independent in } \overline{G}.

Therefore:

ω(G)=α(G). \omega(G)=\alpha(\overline{G}).

\omega(G)=\alpha(\overline{G})

This duality is fundamental.

Many clique results can be translated into independent-set results and vice versa.

64.6 Cliques and Coloring

Graph coloring partitions vertices into independent sets.

Since every pair of vertices in a clique must receive different colors:

χ(G)ω(G). \chi(G)\ge \omega(G).

\chi(G)\ge \omega(G)

Thus the clique number provides a lower bound for the chromatic number.

Example

Since:

ω(Kn)=n, \omega(K_n)=n,

the complete graph requires nn colors.

In many graphs, however:

$$ \chi(G)

\omega(G). $$

Perfect graphs are precisely the graphs where equality always holds for every induced subgraph.

64.7 Triangle-Free Graphs

A graph is triangle-free if it contains no clique of size 33.

Equivalently:

ω(G)2. \omega(G)\le2.

Triangle-free graphs may still contain many edges.

For example, complete bipartite graphs are triangle-free regardless of size.

Triangle-free graphs play an important role in extremal graph theory.

64.8 Clique Detection

Determining whether a graph contains a clique of size kk is called the clique decision problem.

Input:

ObjectDescription
Graph GGArbitrary graph
Integer kkDesired clique size

Question:

Does GG contain a clique with at least kk vertices?

This problem is NP-complete. (en.wikipedia.org)

64.9 Maximum Clique Problem

The optimization version asks for:

ω(G). \omega(G).

This problem is computationally difficult.

No polynomial-time algorithm is known for arbitrary graphs.

The problem is also difficult to approximate well.

Maximum clique is one of the standard benchmark problems in combinatorial optimization.

64.10 Clique Search Algorithms

Brute Force

Test every subset of vertices.

This requires:

2V 2^{|V|}

subsets.

Backtracking

Recursive search prunes impossible extensions.

Branch-and-Bound

Upper bounds eliminate many search branches.

Heuristic Methods

Practical methods often use:

MethodIdea
Greedy searchBuild dense subsets
Local improvementRefine candidate cliques
RandomizationExplore search space

Exact algorithms remain exponential in worst case.

64.11 Bron-Kerbosch Algorithm

The Bron-Kerbosch algorithm is the classical recursive algorithm for enumerating maximal cliques. (en.wikipedia.org)

Main Idea

Maintain three sets:

SetMeaning
RRCurrent clique
PPPossible extensions
XXAlready processed vertices

The recursion systematically explores all maximal cliques.

Modern versions use pivoting for efficiency.

64.12 Cliques and Ramsey Theory

Ramsey theory studies unavoidable structure in large graphs.

A graph with many vertices must contain either:

StructureInterpretation
Large cliqueStrong density
Large independent setStrong sparsity

The Ramsey number:

R(s,t) R(s,t)

is the smallest integer such that every graph with at least R(s,t)R(s,t) vertices contains either:

ObjectSize
Cliquess
Independent settt

Clique theory therefore lies at the center of Ramsey theory.

64.13 Turán’s Theorem

Turán’s theorem determines the maximum number of edges in a graph avoiding large cliques.

Theorem 64.1. Turán’s Theorem

Among all graphs on nn vertices containing no clique of size:

r+1, r+1,

the graph with the maximum number of edges is the complete rr-partite balanced graph.

(en.wikipedia.org)

This theorem is foundational in extremal graph theory.

64.14 Cliques and Social Networks

In social network analysis, cliques represent groups where every member knows every other member.

Real social networks rarely contain large exact cliques because complete mutual interaction is difficult to maintain.

Instead, approximate clique structures are often studied.

Clique-based methods help detect tightly connected communities.

64.15 Clique Graphs

The clique graph of GG is constructed by:

Vertex in Clique GraphRepresents
A maximal clique of GGOne clique

Two clique-vertices are adjacent if the corresponding maximal cliques intersect.

Clique graphs appear in structural graph theory and intersection graph theory.

64.16 Weighted Cliques

Suppose each vertex has weight:

w(v). w(v).

The weighted clique problem seeks a clique maximizing:

vCw(v). \sum_{v \in C} w(v).

Weighted cliques appear in:

AreaInterpretation
BioinformaticsHigh-confidence interaction groups
FinanceCompatible investment clusters
Pattern recognitionDense feature groups

64.17 Clique Polytope

Introduce variables:

xv={1,vC,0,vC. x_v= \begin{cases} 1, & v \in C, \\ 0, & v \notin C. \end{cases}

The clique optimization problem becomes:

maxvVxv \max \sum_{v \in V} x_v

subject to:

xu+xv1 x_u+x_v \le 1

for every nonedge:

uvE. uv \notin E.

These inequalities enforce pairwise adjacency among selected vertices.

The clique polytope is central in polyhedral combinatorics.

64.18 Perfect Graphs

A graph is perfect if:

χ(H)=ω(H) \chi(H)=\omega(H)

for every induced subgraph HH.

Perfect graphs include:

Graph ClassPerfect?
Bipartite graphsYes
Chordal graphsYes
Interval graphsYes

Perfect graph theory studies graphs where clique and coloring structure align exactly.

64.19 Random Graphs

In random graphs:

G(n,p), G(n,p),

the clique number grows slowly relative to nn.

Typically:

ω(G) \omega(G)

is logarithmic in nn when pp is fixed.

Random graph theory studies thresholds for clique emergence.

64.20 Applications

Cliques appear throughout mathematics and applications.

ApplicationClique Meaning
Social networksMutual friendship groups
BioinformaticsStrong interaction clusters
SchedulingCompatible resource groups
Pattern recognitionConsistent feature sets
Communication systemsFully connected subnetworks
Data miningDense association groups

The concept models complete pairwise compatibility.

64.21 Common Relationships

ParametersRelation
Clique and independent setω(G)=α(G)\omega(G)=\alpha(\overline{G})
Clique and coloringχ(G)ω(G)\chi(G)\ge\omega(G)
Triangle-free graphsω(G)2\omega(G)\le2

These identities connect density, sparsity, and coloring structure.

64.22 Exercises

  1. Compute ω(P7)\omega(P_7).

  2. Compute ω(C5)\omega(C_5).

  3. Determine the clique number of K4,7K_{4,7}.

  4. Prove:

ω(G)=α(G). \omega(G)=\alpha(\overline{G}).
  1. Show that every clique requires distinct colors in a proper coloring.

  2. Give an example of a maximal clique that is not maximum.

  3. Find all maximal cliques in a small graph.

  4. Explain why triangle-free graphs satisfy:

ω(G)2. \omega(G)\le2.
  1. State Turán’s theorem in your own words.

  2. Explain why the maximum clique problem is computationally difficult.