The.Algorithm.Design.Manual.Springer-Verlag.1998
The.Algorithm.Design.Manual.Springer-Verlag.1998 The.Algorithm.Design.Manual.Springer-Verlag.1998
Clique Next: Independent Set Up: Graph Problems: Hard Problems Previous: Graph Problems: Hard Problems Clique Input description: A graph G=(V,E). Problem description: What is the largest such that for all , ? Discussion: When I went to high school, everybody complained about the ``clique'', a group of friends who all hung around together and seemed to dominate everything social. Consider a graph whose vertices represent a set of people, with edges between any pair of people who are friends. Thus the clique in high school was in fact a clique in this friendship graph. Identifying ``clusters'' of related objects often reduces to finding large cliques in graphs. One example is in a program recently developed by the Internal Revenue Service (IRS) to detect organized tax fraud, where groups of phony tax returns are submitted in the hopes of getting undeserved refunds. The IRS constructs graphs with vertices corresponding to submitted tax forms and with edges between any two tax-forms that appear suspiciously similar. A large clique in this graph points to fraud. Since any edge in a graph represents a clique of two vertices, the challenge lies not in finding a clique, but in finding a large one. And it is indeed a challenge, for finding a maximum clique is NP-complete. To make matters worse, not only is no good approximation algorithm known, it is provably hard to file:///E|/BOOK/BOOK4/NODE172.HTM (1 of 3) [19/1/2003 1:31:17]
Clique approximate even to within a factor of . Theoretically, clique is about as hard as a problem in this book can get. So what can we hope to do about it? ● Will a maximal clique suffice? - A maximal clique is a subset of vertices, each pair of which defines an edge, that cannot be enlarged by adding any additional vertex. This doesn't mean that it has to be large relative to the largest possible clique, but it might be. To find a nice maximal clique, sort the vertices from highest degree to lowest degree, put the first vertex in the clique, and then test each of the other vertices in order to see whether it is adjacent to all the clique vertices thus far. If so, add it; if not, continue down the list. In O(n m) time you will have a maximal, and hopefully large, clique. An alternative approach would be to incorporate some randomness into your vertex ordering and accept the largest maximal clique you find after a certain number of trials. ● What if I am looking for a large, dense subgraph instead of a perfect clique? - Insisting on perfect cliques to define clusters in a graph can be risky, since the loss of a single edge due to error will eliminate that vertex from consideration. Instead, we should seek large dense subgraphs, i.e. subsets of vertices that contain a large number of edges between them. Cliques are, by definition, the densest subgraphs possible. A simple linear-time algorithm can be used to find the largest set of vertices whose induced (defined) subgraph has minimum vertex degree , beginning by repeatedly deleting all the vertices whose degree is less than k. This may reduce the degree of other vertices below k if they were adjacent to any deleted low-degree vertices. By repeating this process until all remaining vertices have degree , we eventually construct the largest dense subgraph. This algorithm can be implemented in O(n+m) time by using adjacency lists and the constant-width priority queue of Section . By continuing to delete the lowest-degree vertices, we will eventually end up with a clique, which may or may not be large depending upon the graph. ● What if the graph is planar? - Planar graphs cannot have cliques of size larger than four, or else they cease to be planar. Since any edge defines a clique of size two, the only interesting cases are cliques of 3 and 4 vertices. Efficient algorithms to find such small cliques consider the vertices from lowest to highest degree. Any planar graph must contain a vertex of degree at most 5 (see Section ), so there is only a constant-sized neighborhood to check exhaustively for a clique. Once we finish with this vertex, we delete it to leave a smaller planar graph with at least one lowdegree vertex. Repeat until the graph is empty. If you really need to find the largest clique in a graph, an exhaustive search via backtracking provides the only real solution. We search through all k-subsets of the vertices, pruning a subset as soon as it contains a vertex that is not connected to all the rest. We never need consider a subset of size larger than the highest vertex degree in the graph, since the maximum degree gives an upper bound on the size of the largest clique in the graph. Similarly, as soon as we discover a clique of size k, no vertex of degree can help find a larger clique. To speed our search, we should delete all such useless vertices from G. file:///E|/BOOK/BOOK4/NODE172.HTM (2 of 3) [19/1/2003 1:31:17]
- Page 463 and 464: Satisfiability Next: Graph Problems
- Page 465 and 466: Graph Problems: Polynomial-Time rec
- Page 467 and 468: Connected Components Testing the co
- Page 469 and 470: Connected Components discussing gra
- Page 471 and 472: Topological Sorting contradiction t
- Page 473 and 474: Minimum Spanning Tree Next: Shortes
- Page 475 and 476: Minimum Spanning Tree help you sort
- Page 477 and 478: Shortest Path Next: Transitive Clos
- Page 479 and 480: Shortest Path easier to program tha
- Page 481 and 482: Shortest Path Related Problems: Net
- Page 483 and 484: Transitive Closure and Reduction
- Page 485 and 486: Transitive Closure and Reduction Al
- Page 487 and 488: Matching augmenting paths and stopp
- Page 489 and 490: Matching Combinatorica [Ski90] prov
- Page 491 and 492: Eulerian Cycle / Chinese Postman ar
- Page 493 and 494: Eulerian Cycle / Chinese Postman Ne
- Page 495 and 496: Edge and Vertex Connectivity Severa
- Page 497 and 498: Edge and Vertex Connectivity Next:
- Page 499 and 500: Network Flow programming model for
- Page 501 and 502: Network Flow Combinatorica [Ski90]
- Page 503 and 504: Drawing Graphs Nicely vertices are
- Page 505 and 506: Drawing Graphs Nicely labs.com/orgs
- Page 507 and 508: Drawing Trees such as the map of th
- Page 509 and 510: Planarity Detection and Embedding N
- Page 511 and 512: Planarity Detection and Embedding p
- Page 513: Graph Problems: Hard Problems ● C
- Page 517 and 518: Independent Set Next: Vertex Cover
- Page 519 and 520: Independent Set Related Problems: C
- Page 521 and 522: Vertex Cover Vertex cover and indep
- Page 523 and 524: Traveling Salesman Problem Next: Ha
- Page 525 and 526: Traveling Salesman Problem practice
- Page 527 and 528: Traveling Salesman Problem Size is
- Page 529 and 530: Hamiltonian Cycle Eulerian cycle, p
- Page 531 and 532: Graph Partition Next: Vertex Colori
- Page 533 and 534: Graph Partition annealing, is almos
- Page 535 and 536: Vertex Coloring Several special cas
- Page 537 and 538: Vertex Coloring Notes: An excellent
- Page 539 and 540: Edge Coloring The minimum number of
- Page 541 and 542: Graph Isomorphism Next: Steiner Tre
- Page 543 and 544: Graph Isomorphism vertices into equ
- Page 545 and 546: Steiner Tree Next: Feedback Edge/Ve
- Page 547 and 548: Steiner Tree The worst case for a m
- Page 549 and 550: Feedback Edge/Vertex Set Next: Comp
- Page 551 and 552: Feedback Edge/Vertex Set An interes
- Page 553 and 554: Computational Geometry complete bib
- Page 555 and 556: Robust Geometric Primitives Next: C
- Page 557 and 558: Robust Geometric Primitives ● Are
- Page 559 and 560: Robust Geometric Primitives Related
- Page 561 and 562: Convex Hull ● How many dimensions
- Page 563 and 564: Convex Hull http://www.cs.att.com/n
Clique<br />
approximate even to within a factor of . <strong>The</strong>oretically, clique is about as hard as a problem in this<br />
book can get. So what can we hope to do about it?<br />
● Will a maximal clique suffice? - A maximal clique is a subset of vertices, each pair of which<br />
defines an edge, that cannot be enlarged by adding any additional vertex. This doesn't mean that it<br />
has to be large relative to the largest possible clique, but it might be. To find a nice maximal<br />
clique, sort the vertices from highest degree to lowest degree, put the first vertex in the clique, and<br />
then test each of the other vertices in order to see whether it is adjacent to all the clique vertices<br />
thus far. If so, add it; if not, continue down the list. In O(n m) time you will have a maximal, and<br />
hopefully large, clique. An alternative approach would be to incorporate some randomness into<br />
your vertex ordering and accept the largest maximal clique you find after a certain number of<br />
trials.<br />
● What if I am looking for a large, dense subgraph instead of a perfect clique? - Insisting on perfect<br />
cliques to define clusters in a graph can be risky, since the loss of a single edge due to error will<br />
eliminate that vertex from consideration. Instead, we should seek large dense subgraphs, i.e.<br />
subsets of vertices that contain a large number of edges between them. Cliques are, by definition,<br />
the densest subgraphs possible.<br />
A simple linear-time algorithm can be used to find the largest set of vertices whose induced<br />
(defined) subgraph has minimum vertex degree , beginning by repeatedly deleting all the<br />
vertices whose degree is less than k. This may reduce the degree of other vertices below k if they<br />
were adjacent to any deleted low-degree vertices. By repeating this process until all remaining<br />
vertices have degree , we eventually construct the largest dense subgraph. This algorithm can<br />
be implemented in O(n+m) time by using adjacency lists and the constant-width priority queue of<br />
Section . By continuing to delete the lowest-degree vertices, we will eventually end up with a<br />
clique, which may or may not be large depending upon the graph.<br />
● What if the graph is planar? - Planar graphs cannot have cliques of size larger than four, or else<br />
they cease to be planar. Since any edge defines a clique of size two, the only interesting cases are<br />
cliques of 3 and 4 vertices. Efficient algorithms to find such small cliques consider the vertices<br />
from lowest to highest degree. Any planar graph must contain a vertex of degree at most 5 (see<br />
Section ), so there is only a constant-sized neighborhood to check exhaustively for a clique.<br />
Once we finish with this vertex, we delete it to leave a smaller planar graph with at least one lowdegree<br />
vertex. Repeat until the graph is empty.<br />
If you really need to find the largest clique in a graph, an exhaustive search via backtracking provides the<br />
only real solution. We search through all k-subsets of the vertices, pruning a subset as soon as it<br />
contains a vertex that is not connected to all the rest. We never need consider a subset of size larger than<br />
the highest vertex degree in the graph, since the maximum degree gives an upper bound on the size of the<br />
largest clique in the graph. Similarly, as soon as we discover a clique of size k, no vertex of degree<br />
can help find a larger clique. To speed our search, we should delete all such useless vertices from G.<br />
file:///E|/BOOK/BOOK4/NODE172.HTM (2 of 3) [19/1/2003 1:31:17]