Sometimes we are interested in finding the largest subset of the vertices such that for every pair of vertices and in the subset, both and hold.
We define a clique as follow:
A subset of a directed graph satisfying the following conditions is called a clique:
i) The subset contains at least 3 points.
ii) If and are in the clique, then
holds.
iii) The subset is the largest possible.
Example:
In the following graph we have two cliques and .
= { }
= {}
} is not a clique because it is not largest subset; we can add to it
and still have (i) and (ii) satisfied.
Now you might ask if there is a large and complicated graph, how easy it is to find a clique in the graph?
Let S be an n x n matrix defined as
It can be shown that if
, then belong to a clique.
Example:
Find all cliques of the following graph .
First find the matrix .
compute
=
So = { is a clique and is an other clique. But and do not belong to any clique.