Question: Suppose that someone gives you a black-box algorithm A that takes an undirected graph G = (V, E), and a number k, and behaves as

 Suppose that someone gives you a black-box algorithm A that takes

Suppose that someone gives you a black-box algorithm A that takes an undirected graph G = (V, E), and a number k, and behaves as follows. If G is not connected, it simply returns "G is not connected." If G is connected and has an independent set of size at least k, it returns "yes." If G is connected and does not have an independent set of size at least k, it returns "no." Suppose that the algorithm A runs in time polynomial in the size of G and k. Show how, using calls to A, you could then solve the Independent Set Problem in polynomial time: Given an arbitrary undirected graph G, and a number k, does G contain an independent set of size at least k

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!