4.6.17 · D5Theory of Computation
Question bank — Decidability — decidable (recursive) and recognizable (recursively enumerable) languages
True or false — justify
If a language is decidable then it is recognizable.
True — a decider already says YES on members, which is all a recognizer must do; halting on non-members is a bonus, strictly stronger than "may loop."
If a language is recognizable then it is decidable.
False — recognition only promises a YES on members; on non-members it may loop forever, so you never obtain the NO that deciding requires. is the standard counterexample.
The class of decidable languages is closed under complement.
True — run the decider and swap accept/reject; because a decider always halts, you always reach the point where you can swap, so the new machine decides .
The class of recognizable languages is closed under complement.
False — the swap trick needs the machine to halt to know what to swap to, but a recognizer can loop on non-members. is recognizable while is not.
If both and are recognizable, then is decidable.
True — run both recognizers in parallel (dovetailing); every string is in exactly one of , so one recognizer must accept in finite time, giving you a definite YES/NO. See Reductions and Rice's Theorem context via Halting Problem.
Every undecidable language fails to be recognizable.
False — is undecidable yet recognizable; "undecidable" only means no total (always-halting) machine exists, not that no recognizer exists.
is recognizable.
False — if it were, both and would be recognizable, forcing to be decidable, which it is not. So lies outside RE entirely.
Every finite language is decidable.
True — build a machine with a hard-coded list; it compares the input against the finitely many members, always halts, and answers YES/NO. Finiteness removes any risk of looping.
A language and its complement can both be undecidable at once.
True — take (undecidable but recognizable) and (undecidable and not even recognizable); both are undecidable simultaneously.
If a TM halts on every input, the language it accepts is decidable.
True — a machine that always halts is exactly a decider for the language it accepts, since every non-member gets a definite reject.
The empty language is recognizable but not decidable.
False — is decidable: a machine that rejects every input (and halts) decides it. Being tiny doesn't make it hard.
Recognizable = "recursively enumerable" = "can be listed by an enumerator."
True — a language is recognizable iff some TM can print all its strings (with repeats allowed, any order); to test you run the enumerator and accept when appears. See Chomsky Hierarchy.
Spot the error
"Recognizing a language means we can tell for any string whether it's in OR out."
Error: recognition is one-sided. It guarantees a YES for members but gives no verdict on non-members (possible infinite loop). Two-sided classification is deciding, a strictly stronger property.
"To decide , just run the recognizer for and swap accept and reject."
Error: the swap only works if the machine halts. The -recognizer loops when loops on , so there is nothing to swap to — the trick silently requires a decider you don't have.
"In the iff-theorem proof, run to completion first, then run ."
Error: may loop forever on inputs it doesn't accept, blocking you from ever reaching . You must dovetail — alternate one step of each — so a halting machine is always reached (see Universal Turing Machine).
"Since involves simulating a machine, it might loop and so is only recognizable."
Error: a DFA reads one symbol per step and cannot loop; simulation always finishes in steps. So is fully decidable, unlike the TM-simulation problem .
" is undecidable because no TM can even accept its members."
Error: the universal TM does accept every member of (it's recognizable). Undecidability comes from the impossibility of a total machine — proven by Diagonalization, not from any failure to recognize members.
"The complement of a decidable language could be undecidable."
Error: decidable languages are closed under complement (swap-and-halt works), so is decidable whenever is. Undecidable complements only arise from undecidable originals.
Why questions
Why does the single word "loop" generate the entire decidable ⊊ recognizable hierarchy?
Because an infinite run yields no information — you can never distinguish "still computing" from "never stops." That one asymmetry means a recognizer's silence isn't a NO, whereas a decider's halt makes NO real.
Why must we run the two recognizers in parallel rather than sequentially?
Because either machine might loop on inputs it doesn't accept; sequential order risks getting stuck on a non-halter forever. Parallel (dovetailed) execution guarantees the one machine destined to accept is reached in finite time.
Why is "closed under complement" true for decidable but false for recognizable languages?
The complement construction needs the machine to halt so you know when to flip the answer. Deciders always halt (flip works); recognizers may loop on non-members (nothing to flip), so the closure breaks.
Why is a strictly harder object than ?
is at least recognizable (you can confirm acceptances), but would require confirming non-acceptance, i.e. certifying an infinite loop in finite time — impossible, so it isn't even in RE.
Why does the name "recursively enumerable" describe recognizable languages?
Because such a language is exactly one an enumerator can list string by string; members eventually appear (giving a YES), while non-members simply never appear — which is precisely the "loop on non-members" behaviour.
Why does closure under complement give a clean decidability test?
If you can show both and are recognizable, the parallel-run argument turns two half-solutions into a full decider. Showing one is not recognizable then proves the other cannot be decidable. See Closure Properties.
Edge cases
Is (all strings) decidable?
Yes — a machine that accepts everything and halts decides it. It's the trivial "always yes" case, the complement of .
Is the empty language recognizable?
Yes — the always-reject-and-halt machine recognizes (in fact decides) . Vacuously, it accepts exactly the members of (there are none).
What happens on the zero-length input (empty string)?
Nothing special — is an ordinary string in , so a decider must still halt with YES/NO on it, and a recognizer must accept it iff . Edge length changes no rule.
Can a language be recognizable, undecidable, yet have a decidable complement?
No — if is decidable then is recognizable, so both and are recognizable, forcing to be decidable. This contradicts "undecidable."
If a TM accepts but its halting status is unknown, what can we conclude about ?
Only that is recognizable. Without a guarantee that the machine halts on non-members, you cannot upgrade the claim to decidable — the accept-behaviour alone gives recognition.
Is a language that is decidable but infinite still guaranteed to halt on every input?
Yes — decidability is about the machine always halting, independent of whether is finite or infinite. An infinite decidable language just means infinitely many inputs get YES, each after a finite halting run.
Can a language sit outside both RE and co-RE?
Yes — a language with and exists (such languages are "doubly hard"); is not in RE, and richer diagonal constructions land fully outside both classes.
Recall One-line memory hook
"Decider = Done both ways (halts YES and NO); Recognizer = replies on YES, RE-runs forever on NO; both sides recognizable shake hands into a decider."