Suppose you are given an algorithm a to solve the clique


NP-Completeness

(a) Suppose you are given an algorithm A to solve the CLIQUE decision problem. That is, A(G, k) will decide whether graph G has a clique of size k. Give an algorithm to find the vertices of a k-clique in a graph G using only calls to A, if any such k-clique exists.

(b) Suppose you are given an algorithm B to solve the LARGEST-COMMON-SUBGRAPH decision problem. Give an algorithm to find a subgraph of size k that appears in both graphs G1 and G2, using only calls to B, if any such subgraph exists.

Solution Preview :

Prepared by a verified Expert
Civil Engineering: Suppose you are given an algorithm a to solve the clique
Reference No:- TGS0807076

Now Priced at $20 (50% Discount)

Recommended (94%)

Rated (4.6/5)