Recursively Enumerable Languages: Semi-Decidability

College Depth 68 in the knowledge graph I know this Set as goal
Unlocks 16 downstream topics
semi-decidable recursively-enumerable halting verification

Core Idea

A language is recursively enumerable (RE) if there exists a Turing machine that accepts exactly those strings in the language but may not halt on strings outside the language. RE languages represent problems where 'yes' answers are verifiable but 'no' answers may require infinite computation. Every recursive language is RE, but not vice versa.

How It's Best Learned

Use the Halting Problem as motivating example: it's RE (simulate and accept if halts) but not recursive. Contrast with problems that are RE and recursive.

Common Misconceptions

Explainer

You already know what a recursive (decidable) language is: a Turing machine that always halts and always gives the correct yes/no answer. Now weaken that requirement in one direction only: the machine must halt and accept when the answer is yes, but it is allowed to run forever when the answer is no. This is semi-decidability, and languages with this property are called recursively enumerable (RE). The name comes from an equivalent characterization: a language is RE if and only if some Turing machine can enumerate (print out, one by one) all its members — not necessarily in any particular order, but eventually producing each member.

The relationship to recursive languages is a strict containment. Every recursive language is RE — just ignore the "run forever on no" permission. But there are RE languages that are not recursive. The canonical example is the Halting Problem: the set of (M, w) pairs where Turing machine M halts on input w. To verify a "yes" answer, just simulate M on w; if M halts, accept. But to answer "no," you would need to confirm that M runs forever — and no algorithm can do that in general. The Halting Problem is RE but not recursive.

This asymmetry between yes and no has a striking consequence for complements. A language L is recursive if and only if both L and its complement L̄ are RE. This is because if you have a semi-decider for L and a semi-decider for L̄, you can run them in parallel: whichever halts first tells you the answer, guaranteeing termination. If a language is RE but not recursive, its complement cannot be RE at all — otherwise we could combine the two semi-deciders to get a full decider, contradicting undecidability. The complement of the Halting Problem is the prototypical example of a language that is not RE.

RE languages form the top of the Chomsky hierarchy: they are exactly what unrestricted Turing machines can recognize. Understanding them sharpens your mental model of what computation can and cannot do. The recursive languages are the "safe" territory — problems we can fully decide. The RE languages are the "one-sided" territory — problems where we can confirm yes answers but may loop on no. And beyond RE lies the truly unrecognizable: problems where no Turing machine gives even a one-sided answer. The boundary between recursive and RE, marked by the Halting Problem, is the deepest fault line in computability theory.

Practice Questions 5 questions

Prerequisite Chain

Counting to 10Counting to 20Understanding ZeroThe Number ZeroCounting to FiveOne-to-One CorrespondenceCombining Small Groups Within 5Addition Within 10Addition Within 20Two-Digit Addition Without RegroupingTwo-Digit Addition with RegroupingAddition Within 100Repeated Addition as MultiplicationMultiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Two-Digit by One-Digit DivisionDivision with RemaindersRemainders and Quotients in DivisionDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueReading and Writing DecimalsComparing and Ordering DecimalsAdding and Subtracting DecimalsMultiplying DecimalsDividing DecimalsDividing FractionsMixed Number ArithmeticOrder of OperationsInteger Order of OperationsVariable ExpressionsCombining Like TermsOne-Step EquationsTwo-Step EquationsSolving Multi-Step EquationsEquations with Variables on Both SidesLiteral EquationsSlope-Intercept FormPoint-Slope FormWriting Linear EquationsParallel and Perpendicular Line SlopesGraphing Linear EquationsPiecewise FunctionsStep FunctionsComposition of FunctionsInverse FunctionsRadical Functions and GraphsRational ExponentsExponential Functions and GraphsLogarithms IntroductionBig-O Notation and Asymptotic AnalysisBreadth-First Search (BFS)Shortest Paths in Unweighted GraphsDijkstra's Shortest Path AlgorithmAlgorithm Analysis and Big-O NotationTuring MachinesRecursive Languages: The Decidable LanguagesRecursively Enumerable Languages: Semi-Decidability

Longest path: 69 steps · 348 total prerequisite topics

Prerequisites (1)

Leads To (2)