0% found this document useful (0 votes)
120 views31 pages

Finding All Cliques

The document discusses finding all cliques, or maximal complete subgraphs, of an undirected graph. It describes the motivation to find the largest set of nodes where every node is connected to each other. The Bron-Kerbosch algorithm, first introduced in 1973, is still widely used today to efficiently find all cliques by taking a recursive, branch-and-bound approach. Applications of finding cliques include solving the maximum independent set problem and analyzing word senses in natural language.

Uploaded by

mouhabalde
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
120 views31 pages

Finding All Cliques

The document discusses finding all cliques, or maximal complete subgraphs, of an undirected graph. It describes the motivation to find the largest set of nodes where every node is connected to each other. The Bron-Kerbosch algorithm, first introduced in 1973, is still widely used today to efficiently find all cliques by taking a recursive, branch-and-bound approach. Applications of finding cliques include solving the maximum independent set problem and analyzing word senses in natural language.

Uploaded by

mouhabalde
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

Finding All Cliques of an Undirected Graph

Seminar Current Trends in IE WS 06/07 Michaela Regneri 11.01.2007

Motivation
How to put as much left-over stuff as possible in a tasty meal before everything will go off?

Michaela Regneri

Finding Cliques

Motivation
Find the largest collection of food where everything goes together! Here, we have the choice:

Michaela Regneri

Finding Cliques

Motivation
Find the largest collection of food where everything goes together! Here, we have the choice:

Michaela Regneri

Finding Cliques

Motivation
Find the largest collection of food where everything goes together! Here, we have the choice:

Michaela Regneri

Finding Cliques

Motivation
Find the largest collection of food where everything goes together! Here, we have the choice:

Michaela Regneri

Finding Cliques

Outline
Introduction to cliques The Bron-Kerbosch algorithm Applications Conclusion

Michaela Regneri

Finding Cliques

Outline
Introduction to cliques The Bron-Kerbosch algorithm Applications Conclusion

Michaela Regneri

Finding Cliques

Cliques

(according to Bron and Kerbosch 1973)

complete subgraph of a graph: part of a graph in which all nodes are connected to each other cliques: maximal complete subgraphs (not subsumed by any other complete subgraph)

Michaela Regneri

Finding Cliques

A graph

How many cliques?


Michaela Regneri

Finding Cliques

10

The cliques

How can we find them efficiently?


Michaela Regneri

Finding Cliques

11

Outline
Introduction to cliques The Bron-Kerbosch algorithm Applications Conclusion

Michaela Regneri

Finding Cliques

12

The Bron-Kerbosch algorithm


finding all cliques is expensive the number of cliques can grow exponentially with every node added Bron and Kerbosch (1973): An algorithm to compute all cliques in linear time (relative to the number of cliques) still widely used and referred to as one of the fastest algorithms (cf. Stix 2004)

Michaela Regneri

Finding Cliques

13

Different sets and types of nodes


the nodes already defined as part of the clique (compsub) (initially empty) the candidates, connected with all nodes of compsub
C

not, the nodes already processed which lead to a valid extensions for compsub and which shouldnt be touched a selected candidate
S

nodes which are not considered in the current step

Michaela Regneri

Finding Cliques

14

A clique is found if (and only if)...

there are no candidates anymore AND there are no nodes in not (otherwise, the recent clique is not maximal!)

Michaela Regneri

Finding Cliques

15

The recursive procedure


let the not set consist of one node (the extension leading to the clique seen before) three nodes in compsub (known part of the clique)
C C

two candidates left

Michaela Regneri

Finding Cliques

16

The recursive procedure


1. select a candidate

Michaela Regneri

Finding Cliques

17

The recursive procedure


1. select a candidate 2. add it to compsub

Michaela Regneri

Finding Cliques

18

The recursive procedure


1. select a candidate 2. add it to compsub 3. compute new candidates and not set for the next recursion step (but store the old sets) by removing the nodes not connected to the selected candidate 4. start at 1 with the new sets
Michaela Regneri

Finding Cliques

19

The recursive procedure


5. back from recursion, restore the old sets and add the candidate selected before to not

Michaela Regneri

Finding Cliques

20

Termination conditions
1. no candidates left or 2. there is an element in not which is connected to every candidate left (if 2 holds, the addition of a candidate cannot lead to a clique which is maximal, because the node in not would be missing)
Finding Cliques
21

Michaela Regneri

Optimizing candidate selection


terminate as early as possible (minimize number of recursion steps) aiming at having a node in not connected to all candidates the trick:
nodes pick in

in not get a counter indicating to how many candidates they are not connected the node in not with the fewest disconnections each step, pick a new candidate disconnected to this node
Finding Cliques
22

Michaela Regneri

Outline
Introduction to cliques The Bron-Kerbosch algorithm Applications Conclusion

Michaela Regneri

Finding Cliques

23

Solving the maximum independent set problem


maximum independent set of a graph: the largest set of nodes which are all connected to each other a famous application of this: compute the trunk capacity of a car the question here: how many blocks (of a fixed volume) fit in the trunk?

Michaela Regneri

Finding Cliques

24

Solving the maximum independent set problem (cont.)


nodes represent a brick and its coordinates an edge between two nodes means that the two bricks overlap
5|1|3 9|0|3 2|10|4

11|0|5 2|1|0 7|4|2 4|4|3

Michaela Regneri

Finding Cliques

25

Solving the maximum independent set problem (cont.)


the idea: bricks can be placed in the trunk at certain coordinates at the same time, if the corresponding nodes are not connected in the graph if we invert the edges, an edge means not connected
5|1|3 9|0|3 2|10|4

11|0|5 2|1|0 7|4|2


Michaela Regneri

4|4|3
Finding Cliques
26

Solving the maximum independent set problem (cont.)


now we only have to check the cliques and find the largest one(s) the number of nodes is the maximal number of blocks fitting

5|1|3

9|0|3

2|10|4

11|0|5 2|1|0 7|4|2


Michaela Regneri

4|4|3
Finding Cliques
27

Finding different word senses?

...inspired by Widdows and Dorow (2002)

Michaela Regneri

Finding Cliques

28

Other Applications

several applications in bioinformatics and drug design (similarity of proteins or chemical formulas in general) McDonald et al. (2005) next talk

Michaela Regneri

Finding Cliques

29

Conclusion
problem: finding all cliques of a graph efficiently hard task (in terms of memory and runtime) Bron-Kerbosch algorithm is one efficient solution several applications - perhaps some more could be invented (operating on ontologies e.g.)

Michaela Regneri

Finding Cliques

30

Literature
Coen Bron and Joep Kerbosch (1973): Algorithm 457: Finding All Cliques of an Undirected Graph. Communications of the ACM Vol. 16, Issue 9. ACM Press: New York, USA. Dominic Widdows and Beate Dorow (2002): A graph model for unsupervised lexical acquisition. Proceedings of the 19th international conference on Computational linguistics. ACL: Morristown, USA. Volker Stix (2004): Finding All Maximal Cliques in Dynamic Graphs. Computational Optimization and Applications Vol. 7, Issue 2. Kluwer Academic Publishers: Norwell, USA.

Michaela Regneri

Finding Cliques

31

You might also like