18.04.2013 Views

The.Algorithm.Design.Manual.Springer-Verlag.1998

The.Algorithm.Design.Manual.Springer-Verlag.1998

The.Algorithm.Design.Manual.Springer-Verlag.1998

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Clique and Independent Set<br />

Next: Satisfiability Up: Simple Reductions Previous: Independent Set and Vertex<br />

Clique and Independent Set<br />

Consider the clique problem, further discussed in Section :<br />

Figure: A small graph with a five-vertex clique<br />

Input: A graph G=(V,E) and integer .<br />

Output: Does the graph contain a clique of j vertices; i.e. is there a subset , where , such that every pair<br />

of vertices in S defines an edge of G? For example, the graph in Figure contains a clique of five vertices. In the<br />

independent set problem, we looked for a subset S with no edges between two vertices of S. However, for a clique,<br />

we insist that there always be an edge between two vertices. A reduction between these problems results by<br />

reversing the roles of edges and non-edges, an operation known as complementing the graph:<br />

IndependentSet(G,k)<br />

file:///E|/BOOK/BOOK3/NODE109.HTM (1 of 2) [19/1/2003 1:29:47]<br />

Construct a graph G=(V',E') where V'=V, and<br />

Return the answer to Clique(G',k)<br />

For all (i,j) not in E, add (i,j) to E'

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!