Suppose a polynomial time algorithm is discovered that correctly computes the largest clique in a given graph. In this scenario, which one of the following represents the correct Venn diagram of the complexity classes P, NP and NP Complete (NPC)?
View worked solution
Answer: D
The CLIQUE problem (finding whether a graph contains a clique of size ) is a well-known NP-complete problem. Finding the size of the largest clique is the optimization version of this problem.
If a polynomial-time algorithm is discovered to compute the largest clique, then the NP-complete decision version of CLIQUE can also be solved in polynomial time. This implies:
When , every NP-complete problem can be solved in polynomial time, meaning . Since is already a subset of by definition, all three classes collapse into the same set (excluding the trivial languages and ):
Thus, the correct Venn diagram must represent all three classes as identical, which corresponds to Option D.
Free practice · Your answers on this page are not saved.
