Open In App

Cliques in Graph

Last Updated : 20 Jul, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

A clique is a collection of vertices in an undirected graph G such that every two different vertices in the clique are nearby, implying that the induced subgraph is complete. Cliques are a fundamental topic in graph theory and are employed in many other mathematical problems and graph creations. Despite the fact that the goal of determining if a clique of a certain size exists in a network (the clique issue) is NP-complete, various methods for detecting cliques have been researched. A maximum clique is one that cannot be enlarged by adding one more neighboring vertex, i.e. one that does not reside only within the vertex set of a bigger clique.

A clique in an undirected graph is a complete subgraph of the given graph. A complete sub-graph is one in which all of its vertices are linked to all of its other vertices. The Max-Clique issue is the computational challenge of locating the graph’s maximum clique. Many real-world issues make use of the Max clique. Consider a social networking program in which the vertices in a graph reflect people’s profiles and the edges represent mutual acquaintance. A clique in this graph indicates a group of people who all know each other.

Analysis: 

The Max-Clique problem analysis is a non-deterministic algorithm. In this approach, we first try to find a collection of k different vertices, and then we see if these vertices form a complete graph. This issue cannot be solved using a polynomial-time deterministic method. This is an NP-Complete issue.

To discover a maximum clique, one can scan all subsets methodically, but this type of brute-force search is extremely time-consuming for networks with more than a few hundred vertices.

A maximal clique of a graph, G, is a clique in which no clique has more vertices. Furthermore, the clique number ω(G) of a graph G is the number of vertices in the graph’s greatest clique. Cliques appear in a variety of fields of graph theory and combinatorics, including graph coloring and error-correcting coding theory. A k-clique is a clique of size k. (though this term is also sometimes used to mean a maximal set of vertices that are at a distance no greater than k from each other). 0-cliques represent the empty set (sets of 0 vertices), 1-cliques represent vertices, 2-cliques represent edges, and 3-cliques represent 3-cycles.

A graph G’s clique polynomial is defined as

C_{G} (x)= \sum_{k=0}^{w(G)} c_{k} x^{k}

where ck is the number of cliques of size k, with c0=1, c1=|G| equal to the vertex count of G, c2=m(G) equal to the edge count of G, etc.

Theorems Concerning Clique

  • Turan’s theorem constrains the size of a clique in dense networks. A huge clique must exist if a graph has a sufficient number of edges. For example, every network with n vertices and more than \frac {n}{2}. \frac{n}{2} edges must have a three-vertex clique.
  • According to Ramsey’s theorem, any graph or its complement graph has a clique with at least a logarithmic number of vertices.
  • Moon and Moser (1965) discovered that a network with 3n vertices can only contain 3n maximum cliques. The Moon-Moser graphs are those that meet this constraint.

Cliques can be used to identify graph classes:

  • A cluster graph is a graph with cliques as its linked components.
  • A block graph is a graph with cliques as biconnected components.
  • A chordal graph is one in which the vertices may be arranged into a perfect elimination ordering, in which the neighbors of each vertex v that occur later than v in the ordering form a clique.
  • A cograph is a graph in which all of its induced subgraphs intersect any maximum clique in a single vertex.
  • An interval graph is one in which the maximum cliques may be arranged in such a manner that the cliques containing v are successive in the ordering for each vertex v.
  • A line graph is one with edges that may be covered by edge-disjoint cliques so that each vertex belongs to exactly two of the cliques in the cover.
  • A perfect graph is one in which the clique number in each induced subgraph equals the chromatic number.
  • A split graph is one in which at least one endpoint of each edge is contained within a clique.
  • A triangle-free graph is one with no cliques besides its vertices and edges.

What is the Clique Problem?

The clique issue is a computer challenge that involves locating cliques in a graph. It has multiple formulations based on which cliques should be located and what information about the cliques should be obtained.
Finding a maximum clique, finding a maximum weight clique in a weighted graph, listing all maximal cliques, and solving the decision issue of checking if a graph has a clique greater than a particular size are all common formulations of the clique problem.

The majority of clique issue variants are difficult. The clique choice issue (one of Karp’s 21 NP-complete problems) is NP-complete. Finding the greatest clique is both fixed-parameter intractable and difficult to estimate. Furthermore, listing all maximal cliques may take exponential time since there are graphs with exponentially many maximal cliques.

Identifying a single maximum clique

A basic greedy method can find a single largest clique. Growing the current clique one vertex at a time by looping over the graph’s remaining vertices, starting with an arbitrary clique (for example, any single vertex or even the entire set). For each vertex v examined by this loop, add v to the clique if it is near to every vertex currently in the clique, else dismiss v. This algorithm is linear in time. Because of the simplicity with which maximal cliques may be found, as well as their possible modest size, more attention has been paid to the far more difficult algorithmic challenge of finding a maximum or otherwise big clique than to the difficulty of finding a single maximal clique.

Fixed-size cliques

Using a brute force technique, one may test if a graph G has a k-vertex clique and locate any such clique that it does. This method inspects each subgraph with k vertices to see if it constitutes a clique. It takes O(nkk2) time, as represented in large O notation. This is due to the fact that there are O(nk) subgraphs to examine, each with O(k2) edges whose presence in G must be verified. As a result, when k is a fixed constant, the issue can be solved in polynomial time. When k does not have a set value and instead might fluctuate as part of the problem’s input, the time is exponential.

What are Clique’s applications?

Consider a social network in which the vertices represent persons and the edges indicate mutual acquaintance. Then a clique represents a subset of people who all know each other, and clique-finding algorithms may be used to locate these groupings of common friends.

In bioinformatics, the clique problem has several applications. For example, Ben-Dorr, Shamir, and Yakima (1999) characterize the issue of grouping gene expression data as a search for the smallest number of modifications required to turn a graph describing the data into a graph formed by the disjoint union of cliques.

Sample Question

Question 1: How does one locate a clique in a graph?
Answer: 

To locate a G clique:
Let’s say G has n vertices.
Find the minimum feasible degree vertex v in G.
If v has a degree of n 1, stop; G is a clique, and the greatest clique in G has a size of n.
Otherwise, delete v as well as all of its edges from G. In the smaller graph, find the greatest clique.

Question 2: What is the number of cliques in a graph?
Answer: 

A full graph is commonly referred to as a clique. The clique number of G is the size of the largest clique that can be formed from G’s edges and vertices. The penultimate assertion preceding these definitions may consequently be written as follows: a graph’s coloring number is at least its clique number.

Question 3: Is it possible for a graph to have several cliques?
Answer: 

If the complement is bipartite, the graph may be partitioned into two sets U and V, with no edge linking vertices from the same set. This indicates that these sets U and V are totally related in the original graph. As a result, the original graph may be partitioned into two Cliques.



Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads