Questions tagged [clique]

In the mathematical area of graph theory, a clique in an undirected graph is a subset of its vertices such that every two vertices in the subset are connected by an edge.

Definition

A clique in an undirected graph G = (V, E) is a subset of the vertex set C ⊆ V, such that for every two vertices in C, there exists an edge connecting the two. This is equivalent to saying that the subgraph induced by C is complete (in some cases, the term clique may also refer to the subgraph).

A maximal clique is a clique that cannot be extended by including one more adjacent vertex, that is, a clique which does not exist exclusively within the vertex set of a larger clique.

A maximum clique is a clique of the largest possible size in a given graph. The clique number ω(G) of a graph G is the number of vertices in a maximum clique in G. The intersection number of G is the smallest number of cliques that together cover all edges of G.

The opposite of a clique is an independent set, in the sense that every clique corresponds to an independent set in the complement graph. The clique cover problem concerns finding as few cliques as possible that include every vertex in the graph. A related concept is a biclique, a complete bipartite subgraph. The bipartite dimension of a graph is the minimum number of bicliques needed to cover all the edges of the graph.

Clique Problem

In computer science, the clique problem is the computational problem of finding a maximum clique, or all cliques, in a given graph. It is NP-complete, one of Karp's 21 NP-complete problems (Karp 1972). It is also fixed-parameter intractable, and hard to approximate. Nevertheless, many algorithms for computing cliques have been developed, either running in exponential time (such as the Bron–Kerbosch algorithm) or specialized to graph families such as planar graphs or perfect graphs for which the problem can be solved in polynomial time.

Free software for searching maximum clique

93 questions
1
vote
0 answers

How to identify cliques in R subject to the constraint that each node is assigned to only one cliques?

The task is to identify cliques (complete sub-graphs where any two nodes are linked) in R, subject to the constraint that each node is only assign once. Here is an example data set: from to s01 s02 s02 s03 s03 s01 s01 …
Wei
  • 11
  • 1
1
vote
1 answer

R igraph find all maximal cliques without overlapping

I am trying to find all maximal cliques in a graph, without overlapping. the function max_cliques() returns all possible maximal cliques in the graph, but I want every vertex to be included in only one clique- in the largest clique it can be part…
1
vote
1 answer

Finding maximal cliques and removing nodes?

I am trying to find maximal cliques for a set of items. Currently I am using networkx library of python and using find_cliques() function to find all the maximal cliques as below: import newtworkx as nx G = nx.Graph() E = [[1,2], [1,3], [1,4],…
Ankie
  • 37
  • 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
3 answers

clique number of a graph

I would like to know a fast algorithm to find only the clique number(without actually finding the clique) of a graph with about 100 vertices. I am trying to solve the following problem. http://uva.onlinejudge.org/external/1/193.html
copperhead
  • 647
  • 1
  • 9
  • 15
1
vote
2 answers

Why is igraph's cliques() method orders of magnitude slower than justTheCliques?

I wanted to find all the cliques in a medium size, but densely connected graph, having 369 nodes and 22,724 edges. First I simply called igraph's Graph.cliques() method through the python interface: cliques = graph.cliques() It's still running, and…
deeenes
  • 4,148
  • 5
  • 43
  • 59
1
vote
0 answers

maximal Clique recursive

I have a problem that I'm trying to solve, I want to implement a method that takes a clique and returns the largest clique that contains that clique. The method I'm working on is recursive and uses backtracking to accept or refuse solutions…
Lisa
  • 3,121
  • 15
  • 53
  • 85
1
vote
2 answers

algorithm problem

A graph is a subgraph of the graph in which any vertex is connected with the rest of vertexes. In the k- problem, the input is an undirected graph and a number k, and the output is a clof size k if one exists (or, sometimes, all cl of size k)
Cristo
  • 21
  • 5
1
vote
0 answers

Creating fixed size groups based on matching attributes and minimizing the number of un-grouped entites

my problem is this: I have a list of people, each person has a certain number of Facebook likes. I want to partition those people into N groups such that, for each group, every member shares at least one like (i.e. everyone in this group likes Daft…
robert.vinluan
  • 2,225
  • 3
  • 14
  • 7
1
vote
1 answer

How to compute histograms using weka

Given a dataset with 23 points spread out over 6 dimensions, in the first part of this exercise we should do the following, and I am stuck on the second half of this: Compute the first step of the CLIQUE algorithm (detection of all dense cells).…
Pandoro
  • 1,062
  • 2
  • 10
  • 28
0
votes
1 answer

Itemtouch helper kotlin : when i swipe left my button needs 3 cliks

here is my problem that I have been trying to solve for a week now. When I perform a swipe to the left to reveal my buttons, when the view locks at maxleft, the click is only triggered after the third attempt. However, when I use "is currently…
0
votes
0 answers

How to avoid unhashable type 'list' when checking to see if maximal cliques are contained in another graph in NetworkX Library?

I would like to be able to compare the maximal cliques of two graphs G and H, in the networkX library, and store the maximal cliques of G which are not maximal cliques in H as a set (i.e., having no duplicates). This is the code I am working with,…
0
votes
0 answers

Branch and Bound algorithm for Max Clique returns empty set

Hello I am trying to find the max clique of a graph using the algorithm 1 from p.2 of that paper so far the algorithm returns just an empty set and I can't seem to find the mistake in my code. Any suggestions would be appreciated. Cheers! my…
C96
  • 477
  • 8
  • 33
0
votes
1 answer

How to identify a click outside the Canvas frame?

I'm creating a project in Fabricjs Canvas and I would like to know how to identify a click outside the canvas area, I want to deselect all objects with the canvas.discardActiveObject().renderAll() function; however it only works when the click…
Navi
  • 19
  • 5
0
votes
1 answer

Is it NP-complete to find a sub-maximal clique which is at least max clique size - 1?

It is well-known that it is a NP-complete problem to find a maximal clique in a graph. But I wonder know if it possible to find a sub-maximal clique in a graph in polynomial time. That is, given that we don't know whether P=NP or not, is there a…
SleepyBag
  • 103
  • 1
  • 6