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

PHP fast clustering elements stored in an array

I have an array consisting of 1.5 millions pairs of elements (separated by ' '): $array { [0] => "element1 element2" [1] => "element2 element3" [2] => "element8 element4" [3] => "element8 element5" [4] => "element4 element5" …
zwonoROM
  • 29
  • 1
2
votes
1 answer

What are the names of network interfaces on the Motorola CLIQ XT?

The network interfaces on Android interfaces are listed as directories in the file system in /sys/class/net/. For most Android devices the network interface for gprs traffic is called rmnet0 and for Wi-Fi it's usually eth0 or tiwlan0. I suspect that…
RS.
  • 31
  • 1
  • 4
2
votes
2 answers

How to find the size of maximal clique or clique number?

Given an undirected graph G = G(V, E), how can I find the size of the largest clique in it in polynomial time? Knowing the number of edges, I could put an upper limit on the maximal clique size…
dangerChihuahua007
  • 20,299
  • 35
  • 117
  • 206
1
vote
0 answers

NetworkX find_cliques error using PySpark

I'm trying to calculate find_cliques functionality to locate the maximal cliques for each subgroup. I'm using this implementation using pandas_udf grouped by each connected component. def pd_create_subgroups(pdf): index =…
1
vote
1 answer

A single edge(u,v) in graph(G) could be considered as clique or not?

I'm confused in graph cliques whether an edge could be considered as a clique or not as both are adjacent to each other like in attached photo, there is no clique of 3 or more edges. Example I considered all the edges as clique as there is no…
1
vote
2 answers

Bron Kerbosh algorithm for clique finding - what happens when the pivot vertex doesn't exist?

The wikipedia pseudocode on BK clique finding with pivoting: BronKerbosch2(R,P,X): if P and X are both empty: report R as a maximal clique choose a pivot vertex u in P ⋃ X for each vertex v in P \ N(u): BronKerbosch2(R ⋃…
jda
  • 265
  • 2
  • 6
1
vote
0 answers

Sampling cliques in an R igraph object

I would like to randomly sample a clique (not necessarily maximal) from an igraph object. One approach would be: library(igraph) G <- erdos.renyi.game(10, .25) #a small graph cliques <- cliques(G, min=2) #list all cliques sample(cliques,1) …
Zachary
  • 345
  • 1
  • 8
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

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

Calculate size of largest clique in a graph

The igraph package allows us to identify cliques within a graph fairly simply (https://igraph.org/r/doc/cliques.html). It returns lists of vertices. However, I need to simply calculate the size of the largest clique. In the documentation it mentions…
Obed
  • 403
  • 3
  • 12
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
2 answers

Get the list of Triad nodes , who fall under the category of individual Triadic Census

By executing Networkx triadic_census Algorithm, I'm able to get the dictionary of the number of nodes falling on each type of triadic census triad_census_social=nx.triadic_census(social_graph.to_directed()) Now, I'd like to return the list of…
Pujan Paudel
  • 71
  • 1
  • 7
1
vote
0 answers

Error trying to synchronize geth clique client after shutdown

I'm working with a private network using geth clique clients. Each time a node shut downs, (after a power cut, or just killing the geth process), if a try to put it to work again, the node can't synchronize, shooting a runtime…
Federico Caccia
  • 1,817
  • 1
  • 13
  • 33