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
0
votes
0 answers

How do I connect a Python and a C program in windows using pycharm?

I have a Python program that must send the number of nodes and graphs to a C program for faster computation (called cliquer). The C program(the executable is better since it should be faster) then computes the cliques and returns them to Python,…
Arash
  • 225
  • 1
  • 11
0
votes
0 answers

Check if network graph is a clique prolog

I am trying to solve some tasks regarding graph theory and network analysis using Prolog. Given a graph with nodes and connections: connection(a, b). connection(b, e). connection(e, c). connection(b, c). connection(c, d). connection(d,…
XaP
  • 1
0
votes
0 answers

Finding Maximal Clique in O(n^2) Time?

I was making a research about Clique Problem and algorithms. Then I saw that. As this article says, we can find maximal clique in O(n^2) time complexity. Did I misunderstand something or this is a proof that P=NP?
user17214152
0
votes
1 answer

Return a list of cliques larger than n with NetworkX

I have a network with more than 90000 nodes. I want to check it for cliques (=sets of nodes in which each node is connected to all other nodes of the set) that have 5 or more members. Is there a command in the NetworkX library that returns all such…
lonyen11
  • 91
  • 11
0
votes
0 answers

Minimum possible Clique in a Graph

Find the minimum possible size of a clique in a graph, that can be formed using n nodes and e edges. The component should be a complete graph. In other words, Find min size of subset of vertices such that every two distinct vertices that has a…
0
votes
1 answer

networkx.enumulate_all_cliques ignore combinations excluding

I have the following code all done in spyder: df = nx.from_pandas_adjacency(pd.read_excel(r"path/to/file.xlsx", sheet_name="Sheet4",index_col=0,usecols = "A:BR")) df1=pd.DataFrame(list(nx.enumerate_all_cliques(nx.Graph(df)))) I have 69 objects…
mewspoon
  • 37
  • 8
0
votes
0 answers

Bron-Kerbosch Algorithm not working as expected

I implemented the BK algorithm (https://en.wikipedia.org/wiki/Bron%E2%80%93Kerbosch_algorithm) <- Without pivoting version in C++ but is not working as expected. The code is: void UndirectedGraph::clique(vector R, vector P,…
Miguel Duran Diaz
  • 302
  • 1
  • 3
  • 12
0
votes
0 answers

Is it possible to have more cliques than the number of nodes?

I have 27,000 nodes and 38,000 cliques, using maximal.cliques() in R. Is it possible to have more cliques than the number of nodes? Why do so many nodes belong to more than 1 clique? How can I restrict each node to only belong to 1 clique in R?
Grace
  • 201
  • 2
  • 13
0
votes
1 answer

How to convert large list object (class of igraph.vs) to a dataframe in R

g is an igraph object. I wish to find the cliques (mylist), and then convert this large list object to a dataframe object. i.e. one column with the clique number, another column with the members of this clique. mylist = maximal.cliques(g) # error…
Grace
  • 201
  • 2
  • 13
0
votes
1 answer

I need some "known clique size graph" dataset for an experiment . Is there any open source or site, where I can find them?

I need some "known clique size graph" dataset for an experiment . Is there any open source or site, where I can find them ?
0
votes
1 answer

Finding the largest clique in an UnDirected Graph

Given an Undirected Graph, I need to find the largest clique. What I do is first find its size (ie how many vertices/nodes). While doing so, I remove any nodes that are not part of the largest clique (ie if max size is 3, I remove any nodes with…
EddieEC
  • 357
  • 4
  • 17
0
votes
1 answer

How would you use the Subgraph Isomorphism problem to solve Clique?

I currently have a program that solves subgraph isomorphism. It will return 1 if there is an isomorphic subgraph and 0 if there is not. I'm trying to use this implementation to solve the clique problem (whether or not a graph G contains a clique on…
79t97g
  • 105
  • 1
  • 1
  • 9
0
votes
0 answers

graphlets vs cliques in igraph R

I have a perhaps too basic question about igraph::graphlet_basis I am analyzing relatively small weighted graphs (about 20-30 nodes, 40-60 edges) in which I would like to determine the k2-k5 graphlet distribution. As I understand graphlets, unlike…
T.Humar
  • 1
  • 3
0
votes
0 answers

Finding second degree intersection from intersection matrix

I have n rectangles and I need to find how many of them overlap. Which I have done and created an intersection matrix which looks like this for the below JSON where each entry presents a rectangle and 1 represents there is an overlap. It is a…
DevMac
  • 131
  • 1
  • 2
  • 9
0
votes
2 answers

Reduction from / to clique problem to prove problem is NP Complete

I've the following problem: Given a set of males and a set of females, with rank between any two people equal to 0 or 1. Pick a subset of people such that: I want to maximize the number of liked people (total sum of all the ranks between any two…
mp94
  • 47
  • 6