We recall a few basic definitions. Let $ M$ be a Turing Machine over $\Sigma^*$ and $ f:\Sigma^*\rightarrow\{0,1\}$ be a decision problem. Then:
We say:
Let $ RE$ and $ R$ be the sets of recursively-enumerable and recursive functions, respectively. We say:
We note that the former (semi-decidable / undecidable) may appear in the literature with slightly different meanings. Whenever we want no ambiguity, we prefer the terms recursive / recursively-enumerable.
In order to show that a problem is recursive (resp. recursively-enumerable) it is sufficient to write Turing Machines which decide (resp. accept) the problem. Often, we specify these machines as pseudo-code, when the employed instructions (e.g. for each
, if
) are clearly representable by a Turing Machine.
The importance of such pseudocode is to highlight the (decidable) nature of the problem: can an answer to a problem instance always be given, or not?
The widely-known technique is called Turing-reduction. Suppose $ f:\Sigma^* \rightarrow \{0,1\}$ is a studied problem. The reduction technique implies the following:
Once such a transformation is shown to exist for a particular $ g$ , we say:
The informal intuition is that problem $ f$ is at least as hard as problem $ g$ , since, if we can solve (decide) $ f$ , we are guaranteed to solve (decide) $ g$ . The argument is as follows:
Finally, having shown $ g\leq_T f$ , we have constructed a reductio-ad-absurdum argument. If we recall point 1: $ g$ is not decidable. However, by assuming $ f$ is decidable, we have shown we can decide $ g$ . Contradiction!
There is no general rule on how to choose $ g$ and how to construct $ T$ , when studying a particular problem $ g$ . As in any other activity, a lot of practice helps. Sometimes, reductions from similar problems seem to be easier.
One general observation is that $ T$ and $ g$ must be thought of in tandem, such that condition b. can be proven (usually, the trickiest part of a reduction)
There are many undecidable problems of practical interest for us, apart from the halting problem. We enumerate a few:
We do not study these problems for the following reason:
Instead, we study simpler problems, where we can focus more on each of the reduction steps, and less on the reduction itself.
Show that the following problems are not recursive. Which of them are recursively-enumerable? How can we prove a problem is not recursively-enumerable?
$$ f_1(M) = \left\{\begin{array}{ll} 1 & M \text{ halts on all inputs } \\ 0 & \text{ otherwise }\end{array}\right.$$
$$ f_2(M) = \left\{\begin{array}{ll} 1 & M \text{ halts on word } v \\ 0 & \text{ otherwise }\end{array}\right.$$
$$ f_3(M_1,M_2) = \left\{\begin{array}{ll} 1 & M_1 \text{ and } M_2 \text{ halt on exactly the same inputs } \\ 0 & \text{ otherwise }\end{array}\right.$$
$$ f_4(M) = \left\{\begin{array}{ll} 1 & M(w) = \text{reverse}(w) \\ 0 & \text{ otherwise }\end{array}\right.$$
$$ f_5(M) = \left\{\begin{array}{ll} 1 & M(enc(M)) \text{ halts } \\ 0 & \text{ otherwise }\end{array}\right.$$