Questions tagged [clique-problem]

In computer science, the clique problem refers to any of the problems related to finding particular complete subgraphs ("cliques") in a graph, i.e., sets of elements where each pair of elements is connected.

In computer science, the clique problem refers to any of the problems related to finding particular complete subgraphs ("cliques") in a graph, i.e., sets of elements where each pair of elements is connected.

For example, the maximum clique problem arises in the following real-world setting. Consider a social network, where the graph’s vertices represent people, and the graph’s edges represent mutual acquaintance. To find a largest subset of people who all know each other, one can systematically inspect all subsets, a process that is too time-consuming to be practical for social networks comprising more than a few dozen people. Although this brute-force search can be improved by more efficient algorithms, all of these algorithms take exponential time to solve the problem. Therefore, much of the theory about the clique problem is devoted to identifying special types of graph that admit more efficient algorithms, or to establishing the computational difficulty of the general problem in various models of computation.[1] Along with its applications in social networks, the clique problem also has many applications in bioinformatics and computational chemistry.

Clique problems include:

  • finding the maximum clique (a clique with the largest number of vertices),
  • finding a maximum weight clique in a weighted graph,
  • listing all maximal cliques (cliques that cannot be enlarged)
  • solving the decision problem of testing whether a graph contains a clique larger than a given size.

These problems are all hard: the clique decision problem is NP-complete (one of Karp's 21 NP-complete problems), the problem of finding the maximum clique is both fixed-parameter intractable and hard to approximate, and listing all maximal cliques may require exponential time as there exist graphs with exponentially many maximal cliques. Nevertheless, there are algorithms for these problems that run in exponential time or that handle certain more specialized input graphs in polynomial time

Free software for searching maximum clique

62 questions
12
votes
4 answers

Clique problem algorithm design

One of the assignments in my algorithms class is to design an exhaustive search algorithm to solve the clique problem. That is, given a graph of size n, the algorithm is supposed to determine if there is a complete sub-graph of size k. I think…
Jason Baker
  • 192,085
  • 135
  • 376
  • 510
12
votes
2 answers

Prove NP-Completeness clique + independent set graph

"Prove that it is NP-Complete to determine given input G and k whether G has both a clique of size k and an independent set of size k. Note that this is 1 problem, not 2; the answer is yes if and only if G has both of these subsets." We were given…
irtemed88
  • 333
  • 1
  • 3
  • 11
9
votes
2 answers

max-weight k-clique in a complete k-partite graph

My Problem Whether there's an efficient algorithm to find a max-weight (or min-weight) k-clique in a complete k-partite graph (a graph in which vertices are adjacent if and only if they belong to different partite sets according to wikipedia)? More…
linusz
  • 743
  • 1
  • 14
  • 26
8
votes
1 answer

Sorting rows and columns of adjacency matrix to reveal cliques

I'm looking for a reordering technique to group connected components of an adjacency matrix together. For example, I've made an illustration with two groups, blue and green. Initially the '1's entries are distributed across the rows and columns of…
Cecilia
  • 4,512
  • 3
  • 32
  • 75
8
votes
3 answers

Implementing Bron–Kerbosch algorithm in python

for a college project I'm trying to implement the Bron–Kerbosch algorithm, that is, listing all maximal cliques in a given graph. I'm trying to implement the first algorithm (without pivoting) , but my code doesn't yield all the answers after…
a.u.r
  • 1,253
  • 2
  • 21
  • 32
7
votes
3 answers

Algorithm for automating pairwise significance grouping labels in R

After struggling with this problem for a while, I am hoping to get some advice here. I am wondering if anyone is aware of an automated method for determining pairwise grouping labels based on significance. The question is independent of the…
Marc in the box
  • 11,769
  • 4
  • 47
  • 97
5
votes
3 answers

What is the best way to count the cliques of size k in an undirected graph using networkx in python?

I am surprised that networkx does not seem to have a built in function to do this, but maybe I am missing some clever way to do this using the built-in algorithms?
Goldbug
  • 206
  • 2
  • 8
5
votes
1 answer

Find cliques of length k in a graph

I'm working with graphs of ~200 nodes and ~3500 edges. I need to find all cliques of this graph. Using networkx's enumerate_all_cliques() works fine with smaller graphs of up to 100 nodes, but runs out of memory for bigger ones. "This algorithm…
TobSta
  • 766
  • 2
  • 10
  • 29
4
votes
0 answers

Find cliques in an un directed graph using Pregel/Spark in scala

I want to utilize Pregel/ spark-pregel implementation to find the cliques of an un-directed graph using Scala. Any suggestions or algorithms to do that will be highly appreciated.
mas
  • 145
  • 8
4
votes
1 answer

Java library for a clique cover of a graph

Does anyone know of a library or some code (preferably Java) that solves the clique cover problem? I found an OCaml version, but I would like to use something I can more easily integrate with. I've also found Java code and C code to find the maximum…
ivan
  • 41
  • 2
3
votes
1 answer

Understanding the Networkx find_cliques() function

I am currently trying to make an algorithm for finding cliques in a graph, and luckily I found the documentation from Networkx for a function that does just that. Unfortunately, the variable names are a little terse and I'm having trouble…
NeonCop
  • 75
  • 1
  • 2
  • 12
3
votes
2 answers

Edge clique cover algorithm

I am trying to write an algorithm that computes the edge clique cover number (the smallest number of cliques that cover all edges) of an input graph (undirected and no self-loops). My idea would be to Calculate all maximal cliques with the…
3
votes
1 answer

Maximum weighted clique in a large graph with high density

Is there any software or an algorithm description that would let to find a maximum clique (approximately) with known number of vertices in a graph with ~17000 weighted vertices and ~75% density? I tried to use Cliquer but it's too slow (got me few…
Evgenii Nikitin
  • 229
  • 1
  • 11
2
votes
2 answers

How to remove vertices from a graph that are not coverable by cliques?

Given a graph G = (V, E), a set of vertices V* in V, and an integer k, how do we remove vertices from G such that the remaining vertices are either in V* or are in a clique of size k with at least one vertex in V*? Here is a toy example and…
2
votes
0 answers

Polynomial time algorithm for finding clique of size Ω(logn)

I have a homework question asking for a polynomial algorithm to find a clique of size Ω(logn). My current implementation is as follows: Divide the graph into n^logn microsets (subgraphs) of size logn and store them as adjacency matrices For each…
Clayton C.
  • 863
  • 1
  • 8
  • 17
1
2 3 4 5