Mapping Reductions in Computability Theory
Thu Apr 03 2025
Introduction
In computability theory, it can be somewhat tedious to analyze the decidability and recognizability of each decision problem from scratch—especially when the problems are closely related. For example, we already know that the Halting Problem
is undecidable. Now suppose the problem is slightly changed: does a given Turing machine halt on all inputs? Or does it halt on the empty input? Are these problems decidable?
In such cases, a general strategy for proving undecidability is:
- Assume there exists a Turing machine that decides the target problem.
- Use to construct a machine that decides .
- Contradiction—since is known to be undecidable.
Abstracting this idea, to prove that a problem is undecidable, we assume that is decidable and show that this would imply the decidability of another problem that is already known to be undecidable. Therefore, cannot be decidable. Mapping reduction provides a unified and formal method for solving such problems.
Definition of Mapping Reduction
The idea of a mapping reduction is to transform one problem into another. It is formally defined as follows:
Let and be languages over alphabets and , respectively. A mapping reduction from to is a computable total function , such that
If such a function exists, we write .
A computable total function means that there exists a Turing machine which computes , and it halts on every input . In other words, the function always produces an output rather than looping indefinitely.
The condition is equivalent to:
- if , then , and
- if , then .
In other words, YES-instances of the decision problem for are mapped to YES-instances of the problem for , and NO-instances of are mapped to NO-instances of .
In fact, a mapping reduction is a concrete realization of the step 2 in the general proof strategy for undecidability we mentioned earlier—it directly transforms one problem into another. The hypothetical machine is only used at the final step to reach a contradiction.
It can be noted that mapping reduction is, in fact, an independent process—not directly tied to decidability or recognizability—but it can be used to prove both. This proof technique also plays an important role in many other areas, such as complexity theory.
Example
Now, when we attempt to prove that a language is undecidable, it suffices to show that there exists a function such that
i.e., reduces to . If were decidable by some Turing machine , then could also be decided by composing with (as shown below), leading to a contradiction. Therefore, must be undecidable.
Mapping Reduction in Computability Theory
If , then there exists a Turing machine that transforms the decision problem of into the decision problem of . This means that, in terms of computability, if we can solve , then we can solve . In other words, if we know the hardness of , then is at least as hard as . Conversely, if we know the hardness of , then is at most as hard as .
Formally, for any languages and , mapping reduction has the following properties:
- If is decidable and , then is decidable. (The following Turing machine decides .)
-
If is undecidable and , then is undecidable. (Logically equivalent to the above)
-
If is decidable and is undecidable, then . (Also logically equivalent)
For recognizability:
- If is recognizable and , then is recognizable. (The following Turing machine recognize .)
- If is not recognizable and , then is not recognizable.
- If is recognizable and is not recognizable, then .
The Empty String Halting Problem
The Empty String Halting (ETH) problem asks whether a given Turing machine halts on the empty string. This problem may sound much simpler than the general Halting Problem, since the input is restricted to just one specific case. It is formally defined as:
However, we will prove that , thereby showing that is undecidable.
To prove that , we need to construct a computable function such that:
Consider the following construction:
-
Check whether is a valid encoding—that is, whether is the encoding of some Turing machine.
If not, let . Clearly, . -
Otherwise, let , and define , where is constructed as follows:
- On any non-empty input, enters an infinite loop.
- On the empty input, simulates on input .
Now, for a valid encoding :
- If , then halts on the empty input, so .
- If , then does not halt on the empty input, so .
For an invalid encoding , we have , and .
The rule “on any non-empty input, enters an infinite loop” is only used to define the behavior on non-empty inputs and ensure the computability of .
Limits of Mapping Reduction from Easy Problems
In the example above, we reduced a provenly hard decision problem () to a seemingly simpler one () via a mapping reduction, in order to demonstrate that the latter is equally hard. We also know that we can reduce a seemingly hard problem to a known easy one in order to solve it directly. But what happens if we reduce a provenly easy problem to another problem?
The answer is that we only learn that the latter is at least as “hard” as the former—which is not very helpful. In fact, for sufficiently simple decision problems, such as decidable languages, it is possible to reduce them to any nontrivial language , that is, any and .
For any decidable language and any nontrivial language , suppose decides . Since is nontrivial, we can find strings and . Now consider the function defined as follows:
If , then accepts , so .
If , then rejects , so .
This kind of construction relies on the assumption that is simple enough—that is, there exists a Turing machine that decides it.
Rice’s Theorem
Finally, we use mapping reduction to prove Rice’s Theorem.
Any nontrivial property about the language recognized by a Turing machine is undecidable.
— Rice’s Theorem
Nontrivial means that not all recognizable languages have the property, and not none of them do either.
First, we need to understand what a property about a language means. Formally, for any nontrivial set of Turing-recognizable languages , with , we define the language property:
Note that is a set of Turing machine codes, not a set of languages. This refers to a property of the Turing machine , but one that depends only on the language it recognizes. A language is a subset of , and any description of this set constitutes a language property. For example: whether is finite.
In other words, even if two Turing machines and are different, as long as they recognize the same language—that is, —then we have .
In contrast, properties that are related to the implementation of the Turing machine are not considered language properties. For instance: whether halts within 100 steps, or whether the size of its state set is less than 10.
As a result, Rice’s Theorem cannot be used to prove the undecidability of the Halting Problem, since that is a property of the machine, not of the language it recognizes.
Proof
Fix a property . Assume that the empty language does not have this property, i.e., . Since is nontrivial, there exists some language such that . Now we construct a function as follows:
- If is not a valid encoding (i.e., is not the encoding of any Turing machine), then let .
- Otherwise, let , and define , where is constructed as follows:
- On any input , first simulates on input ;
- If halts, then it simulates on input ;
- If halts, then halts on the input .
Now, for a valid encoding :
-
If , then halts on input . Then, if halts on some input , so does . In this case, recognizes the same language as , so .
-
If , then does not halt on input , so does not halts on any input . In this case, recognizes the same language as , so .
For an invalid encoding , we also have , and we defined , so .
In our construction, one of the key step is that when , the machine loops on every input, and
However, the assumption is something we made. What if instead ?
In that case, we can simply consider the complement property . Then we have shown that
is undecidable, which is logically equivalent to saying that
is undecidable.
Conclusion
At this point, we have developed an understanding of mapping reduction as a tool for transforming one decision problem into another. Mapping reductions are not only used in computability theory, but also play an important role in complexity theory, where they are applied in a similar way.
We then used mapping reductions to prove the undecidability of the Empty String Halting () problem and Rice’s Theorem, demonstrating that mapping reduction is a general and powerful technique.
Acknowledgments
This blog references material from the slides of COMP0017 Computability and Complexity Theory at University College London.