Beruflich Dokumente
Kultur Dokumente
DOI 10.1007/s00224-016-9698-9
Alexander Rybalov1
Abstract Hamkins and Miasnikov presented in (Notre Dame J. Formal Logic 47(4),
515–524, 2006) a generic algorithm deciding the classical Halting Problem for Tur-
ing machines with one-way tape on a set of asymptotic probability one (on a so-called
generic set). Rybalov (Theor. Comput. Sci. 377, 268–270, 2007) showed that there
is no generic algorithm deciding this problem on strongly generic sets of inputs
(some subclass of generic sets). In this paper we prove that there is no generic algo-
rithm deciding the Halting Problem for normalized Turing machines on generic sets
of inputs. Normalized Turing machines have programs with the following natural
restriction: internal states with large indices are not allowed at the beginning of the
program. This condition does not reduce the class of computable functions because
for every Turing machine there exists a normalized Turing machine which computes
the same function. Our proof holds for machines with one-way and two-way tape.
It also implies that the Hamkins-Miasnikov algorithm is not generic for normalized
Turing machines.
1 Introduction
Alexander Rybalov
alexander.rybalov@gmail.com
1 Omsk State Technical University, prospekt Mira 11, Omsk 644050, Russia
Theory Comput Syst
and ignores its behaviour on the rest of inputs. This generic complexity approach
has numerous applications, especially in cryptography, where cryptosystems must
be based on problems which are hard on almost all (random) instances. Usu-
ally such behavior of problems is studied in terms of average-case complexity,
but generic-case complexity and generic computability are much more convenient
in applications, in particular they allow to study the complexity of undecidable
problems.
Hamkins and Miasnikov proved in [3] that the classical Halting Problem is gener-
ically decidable (even quickly decidable) for Turing machines with one-way infinite
tape. Namely, the set of all Turing machines such that the head of the machine falls off
the tape (starting on the empty tape) before repeating a state is generic. This result is
model sensitive and it is an open problem to transfer it to Turing machines with two-
way tape. On the other hand Rybalov proved in [5] that the Halting Problem (both
for one-way and two-way models) remains undecidable on strongly generic sets of
inputs (some subclass of generic sets). In this paper we strengthen this result for so-
called normalized Turing machines. A Turing machine M over alphabet {a1 , . . . , ak }
is called normalized if its program satisfies the following condition: from every non-
final state qi of M we can only reach states qj , where j ≤ ki + 1. It corresponds
to the reasonable process of program design, when we introduce a new state qi+1
after using of state qi in the right sides of rules of the program. This condition does
not reduce the class of computable functions because for every Turing machine there
exists a normalized Turing machine which computes the same function. We prove
that there is no generic algorithm deciding the Halting Problem for normalized Turing
machines on generic sets of inputs. Our proof holds for machines with one-way and
two-way tape. It also implies that the Hamkins-Miasnikov algorithm is not generic
for normalized Turing machines.
Note that in the classical work of Chaitin [2] the probability space is defined
over the set of all programs (in some effective binary coding of programs). Chaitin’s
famous constant is the sum of probabilities of all halting programs. Calude and
Stay in [1] extend the probability space over both space and time and consider the
probability that a random N-bit program has halted by a random time. An analo-
gous result about the undecidability of the Halting Problem on the set of programs
of probability one immediately follows from the worst-case undecidability because
every individual program has a non-zero probability.
2 Generic Algorithms
Let M be a set of all machines. Suppose that there is a function size : M → N such
that for all n the set Mn = {x ∈ M : size(x) = n} is finite. For a subset S ⊆ M
define the following sequence
|S ∩ Mn |
ρn (S) = , n = 1, 2, 3, . . .
|M n |
Theory Comput Syst
The value ρn (S) is the probability to generate a machine from S during random
and uniform generation of machines from Mn . The asymptotic density of S is the
following limit (if it exists)
ρ(S) = lim ρn (S).
n→∞
S is called generic if ρ(S) = 1 and negligible if ρ(S) = 0. Clearly, S is generic if and
only if its complement in M is negligible. We call a set S strongly negligible if the
sequence ρn (S) converges to 0 exponentially fast, i.e. there are constants 0 < σ < 1
and C > 0 such that for every n
ρn (S) < Cσ n .
Now S is called strongly generic if its complement is strongly negligible.
An algorithm A with input set M and output set J ∪{?} (? ∈ / J ) is called (strongly)
generic if
1. A stops on every input from M,
2. the set {x ∈ M : A(x) =?} is (strongly) negligible.
Generic algorithm A computes a function f : M → J if for all x ∈ M A(x) = y ∈
J ⇒ f (x) = y. The situation A(x) =? means that A cannot compute the function
f for argument x. But condition 2 says that A correctly computes f on almost all
inputs (inputs from generic set).
The Halting Problem for Turing machines is the problem of computing of the
function
1, if machine M halts on empty tape,
h(M) =
0, otherwise,
defined on the class of all Turing machines M. It is undecidable in the classical sense.
A model of Turing machines is called effective if there is an algorithm A : M ×
N → M such that for every machine M and for every n ∈ N the machine A(M, n)
computes the same function as M. For every machine M define
c(M) = {A(M, n) : n ∈ N}.
Proof We will prove the case 1 of the theorem. Case 2 is proved similarly. Suppose,
to the contrary, that there exists a generic algorithm A, computing function h. Then
there is a classical algorithm B , computing h for every input M in the following way.
Algorithm B enumerates the set c(M) in some increasing order and runs algorithm A
on every M
∈ c(M) until A(M
) =?. The set c(M) is not negligible. By definition
of generic algorithms the set {M ∈ M : A(M) =?} is negligible. So there exists a
Theory Comput Syst
machine M
∈ c(M) such that A(M
) =?. Now B outputs A(M
) = A(M) = h(M).
Thereby algorithm B computes function h for all inputs. This contradiction proves
the theorem.
Lemma 1 For every Turing machine M there exists a normalized Turing machine
M ∗ , computing the same function.
Proof Note that if we swap non-final states qi and qj in the program of M, then the
new machine M
will run on any input in the same way as M. Now we can normalize
machine M by swapping states starting with the first instruction.
Now define an algorithm A, which for every normalized Turing machine M effec-
tively enumerates the set c(M) of all machines obtained from M by adding new
states and arbitrary normalized instructions for the new states to the program of M.
All machines from c(M) compute the same function as M because all new states are
unreachable from the old states of M. So the model of normalized Turing machines
is effective.
Proof Let M have k states. Consider machines from c(M) with k + n states, where
n > 3k + 1. The number of such machines is the number of variants to chose
instructions for states qk+1 , . . . , qk+n . As in the proof of Lemma 2 we can compute
(k+n−1)/3
|c(M)k+n | = 6 (k + n + 1)
3n 3(k+n−
(k+n−1)/3)
(3i + 2)3 .
i=k+1
So
|c(M)k+n |
ρ(c(M)) = lim =
|Mk+n |
n→∞
(k+n−1)/3
63n (k + n + 1)3(k+n−
(k+n−1)/3) i=k+1 (3i + 2)3
= lim
(k+n−1)/3
=
n→∞ 63(k+n) (n + k + 1)3(k+n−
(k+n−1)/3) (3i + 2)3
i=1
1
= lim k = lim const = const > 0.
n→∞ 63k i=1 (3i + 2)3 n→∞
For non-normalized Turing machines a weaker result (proven in [5]) follows from
Theorem 1 and Lemma 2 from [5].
Note also that a similar result about undecidability of the Halting Problem for
Chaitin’s model can be obtained in these frameworks.
The author thanks Volker Diekert for useful suggestions and the anonymous ref-
eree for many useful remarks. Also the author thanks the Russian Science Foundation
(grant 14-11-00085) for financial support.
References
1. Calude, C.S., Stay, M.A.: Most programs stop quickly or never halt. Adv. Appl. Math. 40(3), 295–308
(2008)
2. Chaitin, G.J.: A theory of program size formally identical to information theory. J. ACM 22, 329–340
(1975)
3. Hamkins, J.D., Miasnikov, A.: The halting problem is decidable on a set of asymptotic probability one.
Notre Dame J. Formal Logic 47(4), 515–524 (2006)
4. Kapovich, I., Myasnikov, A., Schupp, P., Shpilrain, V.: Generic-case complexity, decision problems in
group theory and random walks. J. Algebra 264(2), 665–694 (2003)
5. Rybalov, A.: On the strongly generic undecidability of the Halting Problem. Theor. Comput. Sci. 377,
268–270 (2007)