Undecidability · Theory of Computation
16 questions · asked in 11 of 27 years (2000–2026)
MCQ 161-mark 9 · 2-mark 7
2000Questions per year2026
Questions 6–10 of 16
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)?
Answer: (D)
The decision version of clique (does the graph have a clique of size k?) is NP-complete. An algorithm that finds the largest clique in polynomial time also answers this question in polynomial time.
Every problem in NP reduces in polynomial time to an NP-complete problem, so a polynomial-time algorithm for one of them puts all of NP in P. So P = NP.
Then every problem in P, apart from the two trivial languages (accept nothing, accept everything), is NP-complete: a reduction can simply solve the input itself and output a fixed yes or no instance. Ignoring those two, P = NP = NPC, as drawn in (D).
(A), (B) and (C) each draw NPC as only a small part of the other classes, which cannot happen once P = NP.
Answer: (D)
Every problem in NP reduces in polynomial time to an NP-complete problem, so a polynomial-time algorithm for one of them puts all of NP in P. So P = NP.
Then every problem in P, apart from the two trivial languages (accept nothing, accept everything), is NP-complete: a reduction can simply solve the input itself and output a fixed yes or no instance. Ignoring those two, P = NP = NPC, as drawn in (D).
(A), (B) and (C) each draw NPC as only a small part of the other classes, which cannot happen once P = NP.
Answer: (D)
Let denotes that language A is mapping reducible (also known as many-to-one reducible) to language B. Which one of the following is FALSE?
Answer: (D)
When holds, A is "no harder" than B. So if B is decidable or RE, A is too. If A is undecidable, B is undecidable too. Options 1, 2 and 3 are true.
Option 4 is false: B not being RE tells us nothing about A. For example, a decidable (non-trivial) language A reduces to the complement of the halting problem, which is not RE, yet A is RE.
Answer: If and B is not RE then A is not RE
Option 4 is false: B not being RE tells us nothing about A. For example, a decidable (non-trivial) language A reduces to the complement of the halting problem, which is not RE, yet A is RE.
Answer: If and B is not RE then A is not RE
Let be a finite non-empty alphabet and let be the power set of . Which one of the following is TRUE?
Answer: (C)
We can write the strings of in a list, first by length and then in dictionary order. So it is countably infinite.
Now is the power set of a countably infinite set. By Cantor's theorem, it is uncountable.
Answer: is uncountable and is countable
Now is the power set of a countably infinite set. By Cantor's theorem, it is uncountable.
Answer: is uncountable and is countable
Which one of the following problems is undecidable?
Answer: (A)
For context-free languages, checking membership (using CYK), checking emptiness and checking finiteness can all be decided.
Checking whether a CFG is ambiguous is undecidable. It can be shown by a reduction from the Post Correspondence Problem.
Answer: Deciding if a given context-free grammar is ambiguous
Checking whether a CFG is ambiguous is undecidable. It can be shown by a reduction from the Post Correspondence Problem.
Answer: Deciding if a given context-free grammar is ambiguous
Consider the decision problem 2CNFSAT defined as follows:
For example, is a Boolean formula and it is in 2CNFSAT.
The decision problem 2CNFSAT is
For example, is a Boolean formula and it is in 2CNFSAT.
The decision problem 2CNFSAT is
Answer: (B)
Each clause is equivalent to the two implications and . Build a directed graph with one node per literal and these implications as edges.
The formula is unsatisfiable exactly when, for some variable x, there is a path from x to and a path from to x. These are reachability checks, done in polynomial (even linear) time.
So 2CNFSAT is in P.
(C) is false: is unsatisfiable. (D) cannot hold, since 2CNFSAT is in NP, so NP-hard would make it NP-complete. (A) is not known to be true; it would imply P = NP.
Answer: (B)
The formula is unsatisfiable exactly when, for some variable x, there is a path from x to and a path from to x. These are reachability checks, done in polynomial (even linear) time.
So 2CNFSAT is in P.
(C) is false: is unsatisfiable. (D) cannot hold, since 2CNFSAT is in NP, so NP-hard would make it NP-complete. (A) is not known to be true; it would imply P = NP.
Answer: (B)
Keep practising