Enumerators and Dovetailing

Context: FIT2014_MOC · the generative characterisation of r.e. — a machine that prints a language instead of testing it — and the reason the class is called “recursively enumerable” at all

Quick Revision

  • 🎯 Objective: is r.e. is enumerated by some enumerator ➔ recogniser enumerator by dovetailing, enumerator recogniser by scan-and-compare.
  • ⚠️ Key Constraint: naive “simulate all inputs in parallel” is not a machine — infinitely many simulations, finite time. The -then- nested schedule is the whole content of the direction.

📝 Core

An enumerator is a Turing machine that outputs a sequence of strings. is enumerated by iff .

  • It never accepts or rejects ➔ an enumerator has no verdict states in play; it just keeps emitting. If the sequence is infinite it never halts, and that is not a defect.
  • Finite languages ➔ the enumerator may stop once it has finished printing; the state it stops in is irrelevant — nothing is being decided.
  • Order and repetition are free ➔ members may appear in any order, and repeats are allowed. Only the set of emitted strings is specified, so “enumerable” carries no sorting or de-duplication obligation.
  • Contrast with a recogniser ➔ a recogniser is asked “is this in ?”; an enumerator is asked “name the members”. The theorem below says these are the same power.

🧮 Proof Blueprint — enumerable r.e.

Theorem. A language is recursively enumerable if and only if it is enumerated by some enumerator.

Strategy turn printing into testing by comparing against each printed string; turn testing into printing by dovetailing all inputs so no computation starves.

⚠️ Common Mistakes

  • 💡 Running on to completion first ➔ if and loops on it, the enumerator prints nothing ever. Depth-first is fatal; dovetailing is the point.
  • 💡 Demanding sorted or duplicate-free output ➔ neither is required, and imposing sorted order would be strictly stronger (that stronger version characterises decidable infinite languages, not r.e.).
  • 💡 “It never halts, so it’s broken” ➔ non-termination is the normal behaviour for an infinite language. An enumerator is judged by its output stream, not its final state.
  • 💡 Treating the enumerator as a decider ➔ seeing printed proves ; not seeing it printed yet proves nothing, because you cannot know whether it is still coming.

🧠 Active Recall