1

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 this black box to find the vertices of a maximum clique in polynomial time?

Grib
  • 21
  • 2

1 Answers1

1

As a hint, think about what happens if you choose a node from the graph, delete it, and then check whether there's still a k-clique. The black box will either say that there is or that there isn't. What do you learn if there still is a k-clique? What do you learn if there isn't?

Hope this helps!

templatetypedef
  • 362,284
  • 104
  • 897
  • 1,065
  • I see, so are you saying all you need to do is remove a node from the graph, reinsert the graph into the black box, and test again? So every node that is removed in this way which results in a yes->no change is a node that is part of the maximum clique, otherwise it is not. – Grib Nov 03 '14 at 20:02