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

weka detailed accuracy by class

It the first time to deal with weka and ML. it's hard for me to read (detailed accuracy by class). Can anyone help me, please? If you have any link or resources may help me.
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
1 answer

SQL Problem - Query to connect movement transactions (FROM-TO) in a SQL table without looping

I have a very big table which contains product movement transactions (FROM-TO). Example Table +-----------------+----------------+--------------+--------+ | FROM STATION ID | TO STATION ID | Product Type | Volume…
zelda
  • 33
  • 2
  • 9
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
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
0
votes
1 answer

Create adjacence matrix given node connections

I want to create an adjacence matrix given n lines that represent a partial connection between some nodes of a graph. For example, due to the fact that each line represent a clique, the lines A-B; B-C; C-D; A-E-D form the following graph. My first…
0
votes
0 answers

maximal cliques on wiki

Maximal cliques in the graph model shown on wikipedia has included cliques of size 3 and 4 only. But I think cliques of size 2 (which are connecting the 3,4 size cliques) should also be included in maximal cliques according to definition mentioned.…
hunch
  • 329
  • 1
  • 2
  • 10
0
votes
1 answer

An algorithm to prove that for a constant K, K-Clique in P?

I am a newbie in theoretical computer and I was asked to do such an algorithm that works in a polynomial time for K-CLIQUE to prove that it belongs to P. I was thinking about an algorithm that takes a graph of n vertex, and for each vertex , for…
Zok
  • 355
  • 2
  • 15
0
votes
1 answer

reordering the symmetric adjacency matrix including +1 and -1 elements to get cliques

I have a symmetric adjacency matrix with zero value on its diagonal. now i am looking for reordering method to show community which divides the matrix in two cliques with +1 and -1 values respectively. it would be appreciated if someone could help…
sahar
  • 3
  • 3
0
votes
2 answers

Detect bi-cliques in r for bipartite graph

I am trying to recreate the Biclique Communities method (Lehmann, Schwartz, & Hansen, 2008) in R which relies on the definition of a Ka,b biclique. The example below shows two adjacent K2,2 bicliques - the first clique is {A,B,1,2} and the second…
JamesLee
  • 155
  • 7
0
votes
1 answer

Efficient algorithm for looping over all neighbor pairs (2 point cliques) in 2-D array

I need to loop over all (unordered) pairs of pixels in an image that are neighbors of each other without repetition. I am using an 8 point neighborhood. For example: x,y| 0 1 2 3 4 ---+---+---+---+---+---+ 0 | | | | | | …
Gillespie
  • 915
  • 1
  • 6
  • 6
0
votes
1 answer

How to write C++ version of Python powerset function

I want to write the maximal clique algorithm for use with an adjacency matrix. I'm following a video which explains how to code and implement the algorithm using Python. I'm currently trying to code the powerset function at 2 minutes into the…
0
votes
1 answer

class NP, polynomial-time verification CLIQUE

The CLIQUE problem-- problem of finding the maximum clique in a graph is NP-complete. That is, CLIQUE is a.) in NP and b.) there is an NP complete problem, 3-SAT for one, that reduces to CLIQUE in polynomial time. Part (b) above is fine-- all…
Roam
  • 4,831
  • 9
  • 43
  • 72
0
votes
1 answer

Where k <=4 find every k-tuple in O(|V|) time

Here is the Context to my question: I have a homework question: Describe a linear time algorithm in the size of the vertices (ie O(|V|)) to determine if there is a max clique in a graph where all the vertices have a max degree of size 3. I know that…
user678392
  • 1,981
  • 3
  • 28
  • 50
0
votes
1 answer

Graph Theory: Clique concepts

I was trying to solve a basic clique problem but i have stucked at some following points: what is is the minimum size of the largest clique in any graph with N nodes and M edges To Find the largest clique in a graph Please tell me difference…
Amit Pal
  • 10,604
  • 26
  • 80
  • 160