Sub topic 16
GATE Patterns: A Checklist for Decidability Questions
Assume you know finite automata, context-free grammars, pushdown automata, basic set theory, and proof by contradiction. This chapter gives a quick method for classifying decision problems about languages and Turing machines.
First classify the language
Use these terms carefully:
- A recursive language is one for which some Turing machine halts on every input and answers yes or no correctly.
- A recursively enumerable (RE) language is one for which some Turing machine accepts every string in the language. For strings outside the language, it may reject or loop forever.
- A language is co-RE when its complement is RE.
- A language is non-RE when no machine can even recognize it.
The following table is a useful starting point.
| Language class | Machine behavior | Complement |
|---|---|---|
| Recursive | Always halts and decides membership | Also recursive |
| RE but not recursive | Accepts members; may loop on nonmembers | Not RE |
| Non-RE | No recognizer exists | May be RE |
If both a language and its complement are RE, the language is recursive. Run both recognizers in parallel. One must eventually accept, so the combined procedure always halts.
Use the machine model
For standard language classes, remember this pattern:
- Regular-language questions are usually decidable by finite-state methods.
- Context-free-language questions are often decidable by algorithms for grammars or pushdown automata.
- Questions about arbitrary Turing machines are often undecidable.
- A Turing machine may loop, so simulation alone does not prove that a negative answer will eventually appear.
For example, membership for a fixed context-free grammar is decidable. However, asking whether an arbitrary Turing machine accepts at least one string is undecidable.
Apply the checklist
When a GATE question asks whether a problem is decidable, follow this order:
- Identify the object. Is it a DFA, CFG, PDA, or arbitrary Turing machine?
- Identify the property. Is the question about one input, all inputs, the language, or the machine's behavior?
- Check known decidable cases. Membership, emptiness, equivalence, and finiteness differ across models.
- Look for halting behavior. Phrases such as “eventually halts,” “accepts some input,” or “accepts every input” often indicate undecidability for Turing machines.
- Try a reduction. If solving the new problem would solve the halting problem, the new problem is undecidable.
- Use Rice's theorem. A non-trivial property of the language recognized by an arbitrary Turing machine is undecidable.
A property is non-trivial if some Turing machines have it and some do not. “The language is empty” and “the language is regular” are examples of language properties. Rice's theorem does not apply directly to properties of the machine's syntax, such as “the machine has five states.”
A visual decision path
Common traps
- The complement of an undecidable language is not automatically undecidable in the same class. It may be RE while the original language is not RE.
- Closure under complement holds for recursive languages, not for RE languages in general.
- “A machine accepts every input” is different from “a machine accepts at least one input.”
- A recognizer that has not accepted yet has not necessarily rejected.
Exercise
Is the language of encodings of Turing machines that accept at least one input recursive, RE, or non-RE?
Show answer
It is RE but undecidable. Enumerate all inputs and simulate the machine on them by dovetailing. If any simulation accepts, accept. A reduction from A_TM proves undecidability.