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

Prove NP-completeness of CLIQUE-OR-INDEPENDENT-SET

First of all, I want to mention that this is my homework. However, to solve my problem I can use any literature I want. Even though I think that problem is clear from its name, I will give it description: "For given undirected graph G and given…
sruzic
  • 125
  • 12
1
vote
1 answer

Finding vertices of a maximum clique in polynomial time

Say you were given a black box that solves a clique problem in constant time. You give the black box an undirected graph G with a bound k and it outputs either "Yes" or "No" that the graph G has a clique with at least k vertices. How would you use…
Grib
  • 21
  • 2
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
1 answer

How to save and reopen layouts in an android app?

I'm still facing with a favorite button which should save my layout and set the layout as the layout of a new activity .. The problem is that my activity which should open the layout I saved, doesn't do that, but I don't understand why.. Here is my…
Ezekiel
  • 89
  • 3
  • 12
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
1 answer

Bron-Kerbosch C implementation

I'm having some problems implementing a C version of the Bron-Kerbosch algorithm: 1- I have absolutely no understanding of how the algorithm works. I tried to find references on the internet but all of them are crappy with terrible algol example…
Jean-Luc Nacif Coelho
  • 1,006
  • 3
  • 14
  • 30
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
0 answers

Save changes in database working with asp.net

I build code in asp.net to change "products" table in database northwind. I try to save the cahnges in the database with a button, but I can not. Exeption details: "System.Data.SqlClient.SqlException: The DELETE statement conflicted with the…
Alon
  • 1
0
votes
0 answers

Representing a graph using Evolutionary Algorithms

How would you write a valid genotype of a graph similar to the one shown below (ignore the blue vertices)? If you wanted to write an algebraic expression for the number of possible valid genotypes, what would it be? I tried something similar to…
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
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

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

Problem interactions graphics when use drillthrough

I run into the following problem: I have a report with several tabs, in one of the tabs there is a table called "Employees" with different filters that alter that table, and other graphics such as "Level of English" that interact with the table…
0
votes
1 answer

KeyError: 'source' for from_pandas_edge_list()

Here is my code: import numpy as np import pandas as pd import networkx as nx df = pd.read_excel(r"/path/to/file.xlsx",…
mewspoon
  • 37
  • 8