Recursive Languages: The Decidable Languages

College Depth 67 in the knowledge graph I know this Set as goal
Unlocks 17 downstream topics
decidability recursive formal-languages algorithms

Core Idea

A language is recursive (or decidable) if there exists a Turing machine that halts on every input and accepts exactly those strings in the language. Recursive languages form a proper subset of recursively enumerable languages; they represent problems that can be completely solved by algorithms.

Explainer

You already know what a Turing machine is and what it means for a machine to accept or reject a string. The class of recursive (decidable) languages is defined by a stricter requirement: not just that the machine accepts the right strings, but that it *always halts*. A decider for a language L is a Turing machine that, for every input, either accepts (if the input is in L) or rejects (if not), and always terminates. This "always halts" condition is what separates recursion from mere recognizability.

The distinction from recursively enumerable (RE) languages is crucial. An RE language only needs a machine that accepts members — it is allowed to run forever on non-members. This asymmetry means RE recognition is a weaker guarantee: you can confirm membership but never confirm non-membership (the machine might just be running slowly). A recursive language is symmetric: membership and non-membership are both decidable in finite time. Equivalently, a language is recursive if and only if both it and its complement are RE — recognizers for both sides can be run in parallel, and whichever halts first gives the answer.

Concrete examples ground the concept. The language of palindromes is recursive: a TM scans the input, compares first and last characters repeatedly, and always halts. The language of strings of the form aⁿbⁿcⁿ is recursive. Regular and context-free languages are all recursive — membership in these classes is decidable by finite automata and pushdown automata, which always halt. Contrast these with the halting problem: no TM can decide, for all pairs (M, w), whether M halts on w. The halting problem is RE but not recursive.

Recursive languages correspond precisely to the class of problems solvable by algorithms in the informal sense — the Church-Turing thesis equates "algorithmically solvable" with "recursive." This is why the class is also called decidable. When you study complexity theory next, you will refine decidability further by asking not just whether a problem is solvable, but how efficiently — with polynomial-time deciders corresponding to the class P. The recursive languages form the outer boundary of tractability; the study of what lies outside (RE but not recursive, or not even RE) is the study of undecidability.

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 Languages

Longest path: 68 steps · 347 total prerequisite topics

Prerequisites (4)

Leads To (1)