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

Generating Enode on private ethereum blockchain?

I am currently in the process of creating a private clique proof-of-authority blockchain using geth. I currently have a problem of starting the bootnode and generating the ip (enode). I am currently receiving this: $ bootnode -nodekey…
Yanzal
  • 113
  • 1
  • 8
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

networkx: decomposing cliques into unique edges

I have a dictionary in the following form { 0: [1, 2, 3, 4, 5] 1: [6, 2, 3, 4, 5] 2: [3, 4, 5, 6, 7] 3: [8, 9] ... } Each of the values (unsorted lists) correspond to a clique that I want to induce in my graph. Unfortunately, as…
neo4k
  • 159
  • 1
  • 12
3
votes
0 answers

Clique detection algorithm for a directed graph?

So I have an adjacency matrix for a directed graph and I want to find cliques in the graph. What I do is make the adjacency matrix symmetric then cube it; after which I look at the diagonal entries, and if they're positive, it means that the vertex…
Baki
  • 51
  • 4
3
votes
1 answer

R: Find cliques of special sizes efficiently using igraph

I have a large graph(100000 nodes) and i want to find its cliques of size 5. I use this command for this goal: cliques(graph, min=5, max=5) It takes lots of time to calculate this operation. It seems that it first tries to find all of the maximal…
Aslan
  • 91
  • 5
3
votes
1 answer

Identifying cliques in R

I have a dataframe like this: 1 2 2 3 4 5 .... Now, I plot this graph in R using the library igraph using the following code: wt=read.table("NP7.txt") wt1=matrix(nrow=nrow(wt), ncol=2) wt1=data.frame(wt1) wt1[,1:2]=wt[,1:2] …
rohansingh
  • 327
  • 3
  • 12
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
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
1 answer

ternary relationship from binary entity relationships

I'm trying to capture intra sentence ternary relationships and eventually inter sentence . Ex: Net revenues were $2.0 million and $3.0 million for year ending 2015,2016 respectively. expected output : (net revenues,$2.0 million,2015),(net…
sr33kant
  • 35
  • 3
2
votes
0 answers

PoA Clique Ethereum Block Gas Limit relevance

I am running some tests on a private Ethereum network with the Clique consensus engine (Proof of Authority). I came across issues with the amount of transactions processed per block (or per second - as they can be exchangeable on the Clique…
epm-bt
  • 71
  • 4
2
votes
1 answer

Finding largest clique containing certain vertex

I want to find the largest clique containing certain vertex in a connected graph. In the wiki it said a maximal clique can be found by greedy search. However, this can't ensure that you find the largest clique IMO. For example, If I want to find…
Si Chen
  • 53
  • 5
2
votes
1 answer

Finding clique cover of a graph

Let say there is a black box (/an algorithm) which gives me a clique of a graph. Is there anyway to find the clique cover from that? An intuitive idea what I am trying to find is given in the picture. I am trying to find the black box part. Please…
Rajat
  • 249
  • 1
  • 11