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 11–15 of 16
Which of the following is/are undecidable?
1. G is a CFG. Is L(G) = ?
2. G is a CFG. Is L(G) = ?
3. M is a Turing machine. Is L(M) regular?
4. A is a DFA and N is an NFA. Is L(A) = L(N)?
1. G is a CFG. Is L(G) = ?
2. G is a CFG. Is L(G) = ?
3. M is a Turing machine. Is L(M) regular?
4. A is a DFA and N is an NFA. Is L(A) = L(N)?
Answer: (D)
Let us go through each statement:
- 1: is for a CFG? Mark the variables that can produce a string of terminals, step by step. is empty exactly when the start symbol is not marked. Decidable.
- 2: is for a CFG? Undecidable. The strings that are not accepting computation histories of a TM form a context-free language, so TM acceptance reduces to this problem.
- 3: is L(M) regular for a TM? A non-trivial property of L(M) (some TM languages are regular, some are not), so it is undecidable by Rice's theorem.
- 4: is for a DFA A and an NFA N? Convert N to a DFA and compare the two DFAs. Decidable.
So 2 and 3 are undecidable.
Answer: (D)
- 1: is for a CFG? Mark the variables that can produce a string of terminals, step by step. is empty exactly when the start symbol is not marked. Decidable.
- 2: is for a CFG? Undecidable. The strings that are not accepting computation histories of a TM form a context-free language, so TM acceptance reduces to this problem.
- 3: is L(M) regular for a TM? A non-trivial property of L(M) (some TM languages are regular, some are not), so it is undecidable by Rice's theorem.
- 4: is for a DFA A and an NFA N? Convert N to a DFA and compare the two DFAs. Decidable.
So 2 and 3 are undecidable.
Answer: (D)
Which of the following problems are decidable?
1) Does a given program ever produce an output?
2) If L is a context-free language, then, is also context-free?
3) If L is a regular language, then, is also regular?
4) If L is a recursive language, then, is also recursive?
1) Does a given program ever produce an output?
2) If L is a context-free language, then, is also context-free?
3) If L is a regular language, then, is also regular?
4) If L is a recursive language, then, is also recursive?
Answer: (D)
1. Undecidable. Given a Turing machine and input , build a program that runs on and prints something only after halts. This program ever produces output exactly when halts, so a decider for 1 would decide the halting problem.
2. Undecidable. CFLs are not closed under complement, and no algorithm can decide, for a given CFL, whether its complement is also context-free (a standard result, shown by reduction from Turing machine computation histories).
3, 4. Regular languages are closed under complement (swap the final and non-final states of a DFA). Recursive languages are closed under complement (swap accept and reject in a decider). So the answer is always "yes", and a question with a fixed answer is decidable.
Answer: (D)
2. Undecidable. CFLs are not closed under complement, and no algorithm can decide, for a given CFL, whether its complement is also context-free (a standard result, shown by reduction from Turing machine computation histories).
3, 4. Regular languages are closed under complement (swap the final and non-final states of a DFA). Recursive languages are closed under complement (swap accept and reject in a decider). So the answer is always "yes", and a question with a fixed answer is decidable.
Answer: (D)
Which of the following are decidable?
I. Whether the intersection of two regular languages is infinite
II. Whether a given context-free language is regular
III. Whether two push-down automata accept the same language
IV. Whether a given grammar is context-free
I. Whether the intersection of two regular languages is infinite
II. Whether a given context-free language is regular
III. Whether two push-down automata accept the same language
IV. Whether a given grammar is context-free
Answer: (B)
I. Decidable. The intersection of two regular languages is regular, and a DFA for it comes from the product of the two DFAs. The language is infinite exactly when some state reachable from the start state lies on a cycle and can reach a final state. This can be checked on the DFA graph.
II. Undecidable. Whether a given context-free language is regular cannot be decided by any algorithm (a standard result for CFLs).
III. Undecidable. Equivalence of two PDAs, that is of two CFLs, cannot be decided. Even asking whether a CFL equals is undecidable.
IV. Decidable. A grammar is context-free when every production has the form with a single variable and . A Turing machine can check each production.
So only I and IV are decidable.
Answer: (B)
II. Undecidable. Whether a given context-free language is regular cannot be decided by any algorithm (a standard result for CFLs).
III. Undecidable. Equivalence of two PDAs, that is of two CFLs, cannot be decided. Even asking whether a CFL equals is undecidable.
IV. Decidable. A grammar is context-free when every production has the form with a single variable and . A Turing machine can check each production.
So only I and IV are decidable.
Answer: (B)
Which of the following problems is undecidable?
Answer: (B)
Ambiguity of CFGs (undecidable). There is no algorithm that decides whether a given context-free grammar is ambiguous. This is shown by reducing the Post Correspondence Problem (PCP), which is undecidable, to it.
Membership for CFGs (decidable). An algorithm such as CYK decides whether a string is in the language in about time.
Finiteness for FSAs (decidable). The language is infinite exactly when there is a cycle on some path from the start state to an accepting state. This can be checked on the state graph.
Equivalence for FSAs (decidable). exactly when the two sets and are both empty. FSAs are closed under complement and intersection, and emptiness is checked by looking for a reachable accepting state.
Answer: (B)
Membership for CFGs (decidable). An algorithm such as CYK decides whether a string is in the language in about time.
Finiteness for FSAs (decidable). The language is infinite exactly when there is a cycle on some path from the start state to an accepting state. This can be checked on the state graph.
Equivalence for FSAs (decidable). exactly when the two sets and are both empty. FSAs are closed under complement and intersection, and emptiness is checked by looking for a reachable accepting state.
Answer: (B)
Consider three decision problems P1, P2 and P3. It is known that P1 is decidable and P2 is undecidable. Which one of the following is true?
Answer: (C)
A reduction means is at least as hard as : a decider for would give a decider for .
(A) only says is at least as hard as the decidable . can still be undecidable. False.
(B) says is no harder than the undecidable . may be decidable or undecidable. False.
(C) : if were decidable, would be decidable too, which is not so. So is undecidable. True.
(D) The complement of an undecidable problem is also undecidable, so again only says is no harder than an undecidable problem. It does not make decidable. False.
Answer: (C)
(A) only says is at least as hard as the decidable . can still be undecidable. False.
(B) says is no harder than the undecidable . may be decidable or undecidable. False.
(C) : if were decidable, would be decidable too, which is not so. So is undecidable. True.
(D) The complement of an undecidable problem is also undecidable, so again only says is no harder than an undecidable problem. It does not make decidable. False.
Answer: (C)
Keep practising