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 1–5 of 16
Consider the following sets:
S1: Set of all recursively enumerable languages over the alphabet {0, 1}.
S2: Set of all syntactically valid C programs.
S3: Set of all languages over the alphabet {0, 1}.
S4: Set of all non-regular languages over the alphabet {0, 1}.
Which of the above sets are uncountable?
S1: Set of all recursively enumerable languages over the alphabet {0, 1}.
S2: Set of all syntactically valid C programs.
S3: Set of all languages over the alphabet {0, 1}.
S4: Set of all non-regular languages over the alphabet {0, 1}.
Which of the above sets are uncountable?
Answer: (B)
Let us check each set:
- S1: every RE language has a TM, and all TMs can be listed so it is countable.
- S2: C programs are finite strings so it is countable.
- S3: the set of all languages is the power set of so it is uncountable.
- S4: take S3 and remove the countably many regular languages. What is left is still uncountable.
Answer: S3 and S4
- S1: every RE language has a TM, and all TMs can be listed so it is countable.
- S2: C programs are finite strings so it is countable.
- S3: the set of all languages is the power set of so it is uncountable.
- S4: take S3 and remove the countably many regular languages. What is left is still uncountable.
Answer: S3 and S4
Let L(R) be the language represented by regular expression R. Let L(G) be the language generated by a context free grammar G. Let L (M) be the language accepted by a Turning machine M. Which of the following decision problems are undecidable ?
I. Given a regular expression R and a string w, is wL(R)?
II. Given a context-free grammar G, L(G)=?
III. Given a context-free grammar G, is L(G)=* for some alphabet ?
IV. Given a Turning machine M and a string w, is wL(M)?
I. Given a regular expression R and a string w, is wL(R)?
II. Given a context-free grammar G, L(G)=?
III. Given a context-free grammar G, is L(G)=* for some alphabet ?
IV. Given a Turning machine M and a string w, is wL(M)?
Answer: (D)
Go through each statement:
- I: for a regular expression, make an automaton and run w on it decidable.
- II: for a CFG, check whether the start symbol S can produce a string of terminals (mark the variables that can, step by step) decidable.
- III: is for a CFG? undecidable. For a TM M and string w, the strings that are not an accepting computation history of M on w form a context-free language, so a CFG G can be built for it. Then exactly when M does not accept w. A decider for III would decide TM acceptance, which IV shows is impossible.
- IV: does a TM accept a string w? This is the acceptance problem, as hard as the halting problem undecidable.
So III and IV are undecidable.
Answer: (D)
- I: for a regular expression, make an automaton and run w on it decidable.
- II: for a CFG, check whether the start symbol S can produce a string of terminals (mark the variables that can, step by step) decidable.
- III: is for a CFG? undecidable. For a TM M and string w, the strings that are not an accepting computation history of M on w form a context-free language, so a CFG G can be built for it. Then exactly when M does not accept w. A decider for III would decide TM acceptance, which IV shows is impossible.
- IV: does a TM accept a string w? This is the acceptance problem, as hard as the halting problem undecidable.
So III and IV are undecidable.
Answer: (D)
Which of the following decision problems are undecidable?
I. Given NFAs N1 and N2, is L(N1)L(N2) = ?
II. Given a CFG G = (N,,P,S) and a string , does L(G)?
III. Given CFGs G1 and G2, is L(G1) = L(G2)?
IV. Given a TM M, is L(M) = ?
I. Given NFAs N1 and N2, is L(N1)L(N2) = ?
II. Given a CFG G = (N,,P,S) and a string , does L(G)?
III. Given CFGs G1 and G2, is L(G1) = L(G2)?
IV. Given a TM M, is L(M) = ?
Answer: (C)
Check each statement:
- I: is the intersection of two NFAs empty? Build the product automaton and test whether a final state is reachable decidable.
- II: does a CFG generate a string x? Use the CYK algorithm decidable.
- III: are two CFGs equal? undecidable. If it were decidable, we could decide whether by comparing G with a grammar for . That universality problem for CFGs is undecidable.
- IV: is a TM's language empty? By Rice's theorem (a non-trivial property of L(M)) undecidable.
So III and IV are undecidable.
Answer: (C)
- I: is the intersection of two NFAs empty? Build the product automaton and test whether a final state is reachable decidable.
- II: does a CFG generate a string x? Use the CYK algorithm decidable.
- III: are two CFGs equal? undecidable. If it were decidable, we could decide whether by comparing G with a grammar for . That universality problem for CFGs is undecidable.
- IV: is a TM's language empty? By Rice's theorem (a non-trivial property of L(M)) undecidable.
So III and IV are undecidable.
Answer: (C)
Consider two decision problems such that reduces in polynomial time to 3-SAT and 3-SAT reduces in polynomial time to . Then which one of the following is consistent with the above statement?
Answer: (A)
3-SAT is NP-complete: it is in NP, and every problem in NP reduces to it in polynomial time. Write for "A reduces to B in polynomial time".
: convert an instance of to 3-SAT, then check a certificate for 3-SAT in polynomial time. So is in NP. Easiness moves backward along a reduction.
: every NP problem reduces to 3-SAT, and 3-SAT reduces to . Chaining the two reductions, every NP problem reduces to , so is NP hard. Hardness moves forward.
Nothing given makes NP hard or puts in NP. So (B), (C) and (D) may hold for some problems but do not follow; only (A) always holds.
Answer: (A)
: convert an instance of to 3-SAT, then check a certificate for 3-SAT in polynomial time. So is in NP. Easiness moves backward along a reduction.
: every NP problem reduces to 3-SAT, and 3-SAT reduces to . Chaining the two reductions, every NP problem reduces to , so is NP hard. Hardness moves forward.
Nothing given makes NP hard or puts in NP. So (B), (C) and (D) may hold for some problems but do not follow; only (A) always holds.
Answer: (A)
Language is polynomial time reducible to language . Language is polynomial time reducible to , which in turn is polynomial time reducible to language . Which of the following is/are true?
I. if , then
II. if or , then
III. , if and only if
IV. if , then and
I. if , then
II. if or , then
III. , if and only if
IV. if , then and
Answer: (C)
Write for "A is polynomial time reducible to B". If and , then : convert the input with the reduction, then run the polynomial algorithm for B. Membership in P moves only backward along a reduction.
Given: and .
I: and , so . True.
IV: if , then (by I), and since and both reduce to , both are in P. True.
II: this goes forward, from or to . An easy problem can reduce to a hard one, so it does not follow. False.
III: and each reduce to , but not to each other, so one being in P says nothing about the other. False.
Answer: (C)
Given: and .
I: and , so . True.
IV: if , then (by I), and since and both reduce to , both are in P. True.
II: this goes forward, from or to . An easy problem can reduce to a hard one, so it does not follow. False.
III: and each reduce to , but not to each other, so one being in P says nothing about the other. False.
Answer: (C)
Keep practising