# Clique problem

In computational complexity theory, the clique problem or k-clique problem is a graph-theoretical NP-complete problem. The problem was one of Richard Karp's original 21 problems shown NP-complete in his seminal 1972 paper "Reducibility Among Combinatorial Problems".

A clique in a graph is a set of pairwise adjacent vertices, or in other words, an induced subgraph which is a complete graph. In the graph at the right, vertices 1, 2 and 5 form a clique, because each has an edge to all the others.

Then, the k-clique problem is the problem of determining whether a graph contains a clique of at least a given size k. Once we have located k or more vertices which form a clique, it's trivial to verify that they do, which is why the k-clique problem is in NP. The corresponding optimization problem, the maximum clique problem, is to find the largest clique in a graph.

The k-clique problem's NP-completeness follows trivially from the NP-completeness of the independent set problem, because there is a clique of size at least k if and only if there is an independent set of size at least k in the complement graph. This is easy to see, since if a subgraph is complete, its complement subgraph has no edges at all.

## Algorithms

A brute force algorithm to find a clique in a graph is to examine each subgraph with at least k vertices and check to see if it forms a clique. This algorithm is polynomial if k is the number of vertices, or a constant less than this, but not if k is, say, half the number of vertices.

Another algorithm is to start by considering each node to be a clique of size one, and to merge cliques into larger cliques until there are no more possible merges. Two cliques A and B may be merged if each node in clique A is joined to each node in clique B. This requires only linear time, but may fail to find a large clique because two or more parts of the large clique have already been merged with nodes that are not in the clique. It does, however, find at least one maximal clique, which is a clique not contained in any larger clique. The algorithm can be implemented most efficiently using the union-find algorithm.

## References

• Richard Karp. Reducibility Among Combinatorial Problems. Proceedings of a Symposium on the Complexity of Computer Computations. 1972.es:Problema de la clique

• Art and Cultures
• Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
• Space and Astronomy

Information

• Clip Art (http://classroomclipart.com)