AI Glossary / Graphs and symbolic AI / Intermediate
Computable
Definition
A function is computable if an algorithm can produce its specified output from each valid input in a finite number of steps. In the usual total-function sense, the algorithm must terminate for every input in its domain. Computability concerns what an effective procedure can accomplish in principle, before considering whether its resource requirements are practical.
What it means
The important word is algorithm: a finite, unambiguous procedure that can be followed mechanically. A result is not computable merely because someone has given it a name or written a mathematical description of it.
Theoretical computer science studies this idea using precise models, including Turing machines. These models separate limitations of a particular laptop from limitations of algorithmic methods themselves. A computable task might require far more memory or time than any available machine can provide.
Terminology requires care around partial functions. A partial computable function has a procedure that returns the specified answer where the function is defined; it may run forever on inputs outside that domain. For a decision problem, decidability requires a terminating correct yes-or-no answer for every allowed input.
How it works
To establish computability constructively, specify the input representation, describe an algorithm, show that its result is correct, and justify termination. Examples alone are insufficient because the claim ranges over every valid input.
A termination argument often identifies a nonnegative quantity that becomes smaller at each iteration. Other procedures terminate because they inspect a finite collection with a known bound. The proof must match the actual algorithm and assumptions.
Not every precisely stated task has such a procedure. The general halting problem asks whether an arbitrary program will eventually stop on a given input. No algorithm correctly decides all such cases. This does not prevent useful analysis of restricted program families or particular programs.
Computability should also be separated from learnability. An algorithm that evaluates a known mathematical function does not establish that a learning system can infer that function accurately from a limited set of examples.
Three practical examples
1. A data-cleaning program checks a finite file against a fixed list of permitted codes. Its computability is straightforward, although processing a large file may still take significant time.
2. A planning team distinguishes a finite exhaustive search from an unrestricted program-analysis request. Both may sound difficult, but their theoretical obstacles can be fundamentally different.
3. A product reviewer asks whether a claimed universal program checker guarantees a correct answer on every input. A restricted checker or an inconclusive outcome requires a narrower claim.
Think of it this way
Think of a computable function as a recipe with precise instructions that eventually delivers the requested dish for every ingredient set it accepts. A recipe that sometimes keeps instructing the cook to repeat forever does not meet that total guarantee.
The analogy has limits: mathematical computation uses formally represented inputs and idealized resources. Physical cooking introduces availability, measurement, and spoilage issues that are outside the abstract definition.
Worked example
Consider finding the greatest common divisor of two positive integers using repeated remainders. Start with 17 and 5. Replace the pair with the second number and the remainder of dividing the first by the second.
The successive pairs are (17, 5), (5, 2), (2, 1), and (1, 0). When the second number becomes zero, return the first: the answer is 1.
Why does this terminate generally? Each nonzero remainder is smaller than the previous positive divisor. A strictly decreasing sequence of nonnegative integers cannot continue indefinitely. Why is the answer correct? Replacing a pair by its divisor and remainder preserves their common divisors.
These two arguments establish more than success on this example. They explain why the procedure computes the intended function for all positive integer inputs. Runtime analysis would be an additional question.
Illustrative case study
Fictional case: Cedar Tools proposes an assistant that promises to determine whether any submitted automation script will finish. Its reviewers identify the unrestricted guarantee as impossible under the standard program model.
The team revises the product scope. It supports a restricted workflow language with bounded loops and reports unsupported constructs explicitly. A separate simulation feature can report that a run has not finished within a limit, without calling that proof of nontermination.
The lesson is about honest specification. A useful bounded tool can exist even when the original universal promise cannot be met. No measured commercial outcome is claimed.
Common misconceptions and mistakes
Do not equate computable with fast. An algorithm may terminate eventually while remaining unusable at the required scale.
Do not equate undecidable with currently unsolved. Undecidability is a mathematical limitation under stated assumptions, not simply a shortage of research effort.
Do not treat a timeout as proof that no answer exists. The run may need more time, or the procedure may be poorly chosen. Likewise, several successful test cases do not establish termination on all inputs.
Business use
For business teams, the concept helps classify requirements before selecting infrastructure or promising guarantees. Ask what inputs are allowed, what output is required, and whether an inconclusive result is acceptable.
This discussion can reveal productive restrictions: bounded workflow lengths, finite state spaces, or a narrower specification language. After the task is precisely scoped, teams still need performance, correctness, and operational validation. Computability supplies a foundational boundary, not a deployment certificate.
People also ask
Does computable mean a computer can finish the task quickly?
No. It means an appropriate algorithm exists; efficiency and available resources are separate concerns.
Can AI solve the general halting problem?
An AI implemented by standard algorithms cannot provide an always-correct decision procedure for every arbitrary program and input.
Can individual halting questions still be answered?
Yes. Many particular programs and restricted classes admit decisive analysis. The impossibility concerns a universal procedure for all cases.
Check your understanding
A program returns correct answers on every test but runs without a proven stopping rule. Have the tests established that it computes a total function?
Answer: No. The observed successes do not establish correct termination for every valid input. A general argument or an appropriate exhaustive finite analysis is still needed.
Related terms
- Algorithm
- Computational complexity
- Computational learning theory
- Turing machine
- decidability
- halting problem
- partial function
- termination
Learn next
Study termination proofs using decreasing integer measures, then compare decidable and recognizable languages. Finally, examine complexity to understand why an algorithmically solvable problem may still exceed a practical time or memory budget.
More in Graphs and symbolic AI
- Compliant motion - Compliant motion is robot movement that accommodates contact forces and physical constraints rather than rigidly insisting on an exact free-space trajectory.
- Composition - Composition of substitutions combines successive variable replacements into one substitution with the same overall effect.
- Compositional semantics - Compositional semantics builds the meaning of a complex expression from the meanings of its parts and the structure that combines them.
- Computational graphs - Computational graphs represent calculations as connected operations and intermediate values.
- Concurrent action list - A concurrent action list specifies actions that must or must not occur alongside a particular action for its modeled effects to apply.
- Condition-action rule - A condition-action rule connects a recognized situation to an action: if a specified condition holds, select or perform the associated response.
Sources
MIT OpenCourseWare, Computation Structures, annotated material on models of computation: https://ocw.mit.edu/courses/6-004-computation-structures-spring-2017/pages/c10/c10s1/ . The primary course discussion of computable functions and the halting limitation was consulted. The integer example and fictional product case are original teaching material.
Previous: Compressive sensing Next: Computational complexity