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
2
votes
1 answer

Why do I obtain different results for the Bron-Kerbosch algorithm when switching between a BTreeSet and a HashSet?

I've been trying to implement the Bron-Kerbosch algorithm in Rust for my master's thesis. So far everything was working, but when I tried changing from a BTreeSet to a HashSet for performance comparison purposes, the behaviour became completely…
Heychsea
  • 133
  • 1
  • 7
2
votes
0 answers

Clique percolation algorithm

I have searched for long time and I couldn't realize what is the best way for finding clique percolation. As I see it, there are 2 methods Find cliques of size k in graph G and then create a graph between adjacent clique nodes. Find maximal cliques…
David Barda
  • 958
  • 10
  • 28
2
votes
0 answers

Reduction to Clique prob

Subgraph isomorphism We have the graphs G_1=(V_1,E_1), G_2=(V_2,E_2). Question: Is the graph G_1 isomorphic to a subgraph of G_2 ? (i.e. is there a subset of vertices of G_2, V ⊆ V_2 and subset of the edges of G_2, E ⊆ E_2 such that |V|=|V_1| and…
Mary Star
  • 375
  • 7
  • 27
2
votes
1 answer

Using recursive method for Clique

I'm trying to solve clique problem. I'm using Bron Kerbosch Clique algorithm,which nicely written in java a clever implementaion can be found here. However, thanks to clique hardness, it can be extremely slow, What I want to do is to use an…
nafas
  • 5,283
  • 3
  • 29
  • 57
2
votes
2 answers

Flaw in this maximum clique polynomial time approach?

I have been trying to solve Maximum clique problem with the algorithm mentioned below and so far not been able to find a case in which it fails. Algorithm: For a given graph, each node numbered from 1 to N. 1. Consider a node as permanent node and…
atulshgl
  • 55
  • 10
2
votes
2 answers

Random adjacency list generator

I am currently working on developing an application to find the maximum clique in a graph for my final year project. I have most the project complete and am just starting to test the application. The application currently uses an adjacency list as…
Andrew Beal
  • 427
  • 8
  • 23
1
vote
1 answer

How can I make this combination/clique algorithm more memory and time efficient, perhaps through multiprocessing?

Currently, I have a program that successfully converts a list of tuple pairs into triplets in which everything within the triplet is paired with each other. Here is the fully working Python program so that you can use it for testing: import…
1
vote
1 answer

Access to a number and a vector of an String in Prolog

I have to do the clique problem where the graph is defined like that: [1-[2,3,4,5,6], 2-[1,3,4,5,6], 3-[1,2,4,5,6],4-[1,2,3,5,6], 5-[1,2,3,4,6], 6-[1,2,3,4,5]] so I started to do this c(_,[]). c(G,X):-length(G,S),rest(X, G, G1). rest(X, [X|Ys],…
1
vote
1 answer

What's the best algorithm for extracting all unique, complete subgraphs from an undirected graph of perhaps 1,024 nodes?

I ask this question with apologies for my obvious mathematical shortcomings as a practical programmer. It's been more than 40 years since I did well in high-school algebra and then failed at anything higher. The concept of "NP-complete" and…
1
vote
1 answer

Max Clique Optimization

I'm trying to find the max clique in a graph (adjacency matrix), the graph can have up to 50 nodes. Currently, what I have starts taking forever when the graph sizes get to around n=40. Can anyone find any optimizations I can make? public static…
Bushfries
  • 85
  • 9
1
vote
1 answer

Remove maximal cliques in igraph

I have a disconnected undirected network. I want to identify and remove all the components that are cliques. I do not want to remove all the cliques, just those that are themselves a component of the network. How should I proceed? library(igraph) g…
MCS
  • 1,071
  • 9
  • 23
1
vote
1 answer

Efficient method of finding all maximum cliques of a graph in GAP

I wish to find all maximum cliques of special types of Cayley graphs called derangement graphs. I work in GAP and I currently use the GRAPE package to establish the following: #This is a nice example to work with. grp := PrimitiveGroup(8,2); n :=…
Dan P.
  • 269
  • 2
  • 9
1
vote
1 answer

OMP and parallel operations on a std::set<...>::iterator

Given a data structure based on the map shown below: std::map>> cliques; Where the key indicates the size of the vectors contained on it. At the beginning, the map has only one key (e.g. [3]) which contains the input…
mitxael
  • 52
  • 7
1
vote
2 answers

Is the complement of the language CLIQUE element of NP?

I'm studying about the NP class and one of the slides mentions: It seems that verifying that something is not present is more difficult than verifying that it is present. ______ _________ Hence, CLIQUE (complement) and…
Kevin Van Ryckegem
  • 1,915
  • 3
  • 28
  • 55
1
vote
1 answer

find all groups of adjacent graph nodes

I have a graph and it's nodes adjacent matrix. The issue is to find all nodes adjacent "all to all". For example (at the picture) the result must be [1,2,3,7] all of this nodes connected together. For any kind graph I need get get the list of all…
Alexey Kulikov
  • 1,097
  • 1
  • 14
  • 38