Recursively Enumerable Languages
Context: FIT2014_MOC · the class one tier above decidable — accept the members, but you are allowed to loop forever on the non-members · the home of (Undecidability and the Halting Problem) and the setting in which “undecidable” finally splits into two different kinds of bad
Quick Revision
- 🎯 Objective: is r.e. iff TM with ➔ only the accepting side is constrained; may be split arbitrarily between and .
- 📦 Core Components: decidable ➔ | r.e. ➔ unrestricted | decidable and both r.e. ➔ the bridge theorem.
- ⚠️ Key Constraint: r.e. is not closed under complement. is r.e., is not even r.e. — asserting closure here is the fastest way to lose the proof.
📝 How It Works
1. Definition and the contrast with decidable
is recursively enumerable iff there is a TM with . Strings outside may be rejected or may loop forever.
| Class | Guarantee you get | |||
|---|---|---|---|---|
| decidable | a Yes or No answer, always | |||
| r.e. | anything | anything | a Yes eventually, if the answer is Yes |
- Every decidable language is r.e. ➔ a decider is a machine with that happens also to have ; the r.e. definition simply drops that clause.
- Semi-decision ➔ this is why “partially decidable” is a synonym: a Yes-answer arrives in finite time, a No-answer may never arrive and you cannot tell which case you are in while waiting.
2. Synonyms (all name the same class — expect any of them in a question)
- Turing recognisable ➔ Sipser’s term (the unit’s reference text).
- Type 0 ➔ the outermost level of the Chomsky hierarchy, above context-free and regular.
- ⚠️ “computable” ➔ also used for r.e. (justified by Enumerators and Dovetailing) and for decidable (Decidability and Decision Problems) — ambiguous, so never write it in an answer where the distinction is the point.
3. separates the two classes
- The language ➔ , i.e. the DIAGONAL HALTING PROBLEM’s YES-language; not decidable (Undecidability and the Halting Problem).
- The recogniser ➔ obtained by modifying a UTM: on input , simulate running on ; if the simulation ever stops in any state, Accept.
- Read-off ➔ is r.e. and undecidable ⟹ the inclusion decidable r.e. is strict. Simulation buys recognition; it never buys a decision, because the non-halting case is exactly the case the simulator cannot report.
🧮 Proof Blueprint — the bridge theorem
Theorem. is decidable both and are r.e.
Strategy ➔ quote closure of decidable under complement; interleave the two recognisers so that neither one’s looping can stall the other.
Derivation
()
() Let and ; either may loop on inputs it does not accept. Build :
- halts on every ➔ every string lies in or in , hence is accepted by or by after finitely many steps; the round-robin reaches that step. So .
- is correct ➔ accepts iff accepts iff .
- Therefore decides .
- Key move: one step at a time, alternating. Running to completion first would hang forever on any — the interleaving is the entire proof, not a presentational detail.
🚫 A non-r.e. language
Theorem. is not r.e.
- The contradiction cited ➔ is not decidable (Undecidability and the Halting Problem), so the supposition dies.
- What it buys ➔ the first language outside r.e. altogether, so “undecidable” splits: is undecidable-but-recognisable, is not even that.
- co-r.e. ➔ ; the bridge theorem restates as — the lens where the r.e. and co-r.e. rings overlap, with and sitting symmetrically outside it.
🗺️ The final hierarchy
| Ring | Membership certificate | Witness that the containment is proper |
|---|---|---|
| regular | DFA run | HALF-AND-HALF (Proving a Language Non-Regular) |
| context-free | PDA / CYK | (Proving a Language Non-Context-Free) |
| decidable | a decider halts either way | |
| r.e. | acceptance in finite time |
- The two named inhabitants ➔ and sit symmetrically about the decidable core.
🔭 Beyond the lecture (stated as exercises on the slides, no proofs given)
- Verifier characterisation ➔ is r.e. there is a decidable two-argument predicate with . The is a certificate: given it, membership is checkable; finding it may be hard — the shape that returns as later in the unit.
- Reductions preserve r.e. ➔ if and is r.e., then is r.e. (run , then the recogniser for — the transfer theorem with “halts” weakened to “accepts”).
- Which W22 problems are r.e.? ➔ the lecture leaves this open; the -shaped ones (, ) are recognisable by dovetailed simulation, the -shaped ones (, ) are not.
⚠️ Common Mistakes
- 💡 Assuming r.e. is closed under complement ➔ it is closed under , and concatenation but not complement; vs is the standing counterexample, and the bridge theorem says closure would collapse r.e. onto decidable.
- 💡 “Reject not accept” ➔ for a recogniser, . Writing silently assumes a decider and destroys the proof.
- 💡 Running to completion before starting ➔ the interleaving is load-bearing; sequential execution hangs on precisely the inputs the second machine was there to catch.
- 💡 Calling r.e. languages “computable” in an answer ➔ the word is genuinely ambiguous in this literature. Write r.e. or decidable and the marker cannot dock you.
- 💡 Confusing (a language) with the Halting Problem (a problem) ➔ they are the same content in two vocabularies; be explicit which one a theorem is quantifying over.
🧠 Active Recall
Why does the interleaved machine halt on every input, when both and may loop forever?
Answer
- Short answer: because , every is accepted by one of them after some finite number of steps ; the round-robin schedule reaches step of that machine after of its own steps, so terminates.
- Why: Only one of the two can loop on a given ➔ looping is never simultaneous, and the interleaving guarantees the non-looping computation is never starved. This is the same scheduling idea as the dovetailing in Enumerators and Dovetailing — finite progress on infinitely patient computations.
and are both undecidable, yet the lecture treats them very differently. What is the asymmetry?
Answer
- Short answer: is r.e. — simulation gives , — while is not r.e. at all, so no machine even recognises it.
- Why: Halting is a finitely witnessable event; non-halting is not ➔ if halts on , the simulator sees it in finite time and can Accept. ” runs forever” has no finite witness, so nothing can announce it. Formally, r.e. co-r.e. decidable, so being r.e. would make decidable.