This content was uploaded by our users and we assume good faith they have the permission to share this book. If you own the copyright to this book and it is wrongfully on our website, we offer a simple DMCA procedure to remove your content from our site. Start by pressing the button below!
g(z), which ensures that t$i = f .
b) The “almost all” condition is consistent with the bounding properties of ACKERMANN-PETER and S U D A N functions and with the recursive dependence among complexity measures. Furthermore, the Speed-Up results (which will be presented in the next section) hold for aU but finitely many arguments.
Remark. From Theorem (3.5) it follows that there is no recursive function f : N + N satisfying the equality Cp = R (or, Cp = R.J. Notation. When it causes no confusion we shall simply write C, instead of
cp.
(4.2) Lemma. For every recursive function recursive function g : N 4 N such that
c,
C
#
f:N-+ JV there exists a
c, .
Proof. By Theorem (3.5) we find a recursive function that for every index i for F, @i(z)> f ( z ) 0.c. g =
(4.3)
F:N-+ N
such
Let i be an index for F, and define the recursive function g by C, c C, and F C,. To fmish, notice that F E C.,
@i.Clearly,
0
Thus starting with a recursive function we can construct a new complexity claas which ia a strict enlargement of the first class, and thia process continues indefinitely. We may ask whether we can construct uniformly larger and larger complexity classes.
228
Calude
(4.8) Theorem. There exist two recursive functions h : N 2+ N and
t :fi -+ N such that for every recursive function f : N + N and every index i for f we have
h(i)p c, and
6t(i)
E
clo(pI'),o;)-
(4.4)
Proof. Let r : N N be a recursive function for which the equation r(z) = n has an infinity of solutions for every fmed n , and define (using the s-m-n Theorem) the recursive function t by the equation dr(z)(z)+1
9
if @ r ( z ) ( z ) otherwise.
I di(z)
9
Clearly, for every recursive 9; , q5t(i) is also recursive. Furthermore, we ftu an index i for f .Ind we show that d t ( , ) C,. If there exists an index k such tha t dt(,) = # k and # t ( z ) 5 f ( z ) a e . , then for an hfmity of n,
and
a contradiction! To construct the recursive function h we use the constant function k, for all z and y; here k is an arbitrary index for dt(;). In view of Proposition (3.8) there exists a recursive function h * : N 3 N such that for all z and y , Cd2)(z,y)=
-+
%p(J In particular, if z = y
=
n)
< - h*(n,@z(n),@y(n)) a.c.
i , then
~ k ( n=) +cp)(,,;fin)
I h*(a,+i(n),+i(n)) a-e.
Finally, put h(z,y) = h.(z,y,y)
,
(4.5)
for all z and y . I t is easy to see that dt(i) E CLo(pp),9i),thus ending the
proof. 0
We can easily simplify the formula (4.4), by deleting the fvst argument, in case of sufficiently difficult recursive functions.
229
Chapter 3
-
(4.4) Scholium. There exist two recursive functions H,t :I? -P N such N and every index i for f , for which that for every recursive f : N ai(z) 2 z,for all 2 , we have dt(i)
E C/ and
dt(i) E
(4.8)
C H ~ O ;*
Proof. We use the proof of Theorem (4.3) before the formula (4.5) which
ia to be replaced by H ( z )=
h*(Z,Z,Z)
,
for all 2.
(4.6) Corollary.
P:N
4
There exist two recursive functions p : @
PI such that for every recursive function d,,
-
0
N and
C
c,i and, in case
+
cpo(Pt'),*i) '
ai(z) 2 z,for all z,
c,;
C f GOOi
(4.7)
*
Proof. Let h:w-P N be the recursive function furnished by Theorem (4.3), and put P ( Z , Y ) = 2* ( z * w ) + * ,
P ( 2 )= p ( z , z )
,
for all z and y. 0
The next result shows that the step-counting functions are sparse relative to recursive functions. As a consequence we deduce that there is no recursive function q : N IN such that
-
,-
L
Chi #
coo,;
9
for all sufficiently large recursive functions die In other words, if we replace the complexity ai by +itthen the formula (4.7) fails to hold, for every recursive function P. (4.6) Theorem. (Gap Theorem; TRAKHTENBROT [1967] and BORO-P N such that t ( z ) 2 z, for all z,there exieta an increasing recursive function t :RV + RV such that
DIN [1969]) For every recursive function r:RV
2 30
Calude
-
= Crct
ct
Proof. Defme the p.r. function t :PI
(4.8)
N as follows:
,
t(0)= 1
t ( z + l )= t ( z ) + m ,
,
where
5 2 , either
m, = ptn [ for every i
Oi(z+l) for every
> r ( t ( z ) + m ) , or @;(z+l)5 t ( z ) + m ] ,
2.
First we show that t is in fact recursive. Indeed, all predicates involved in the scope of the minimbation operator are recursive; we examine only a finite number of conditions, and for every i z there exist only two possibilities:
<
a) Oi(z+l) = zq and in this case Oi(z+1) rn,
> r ( t ( z ) + m ) , for
every
or b) O i ( z + l ) # zq and in this case ai(z+1) 5 t ( z ) + @ i ( z + l ) .
Since for all z, r ( z ) 2 z,it follows that C, c Ctot. The proof of the converse inclusion will be by rcductio ad abeurduna. Assume that there exists a recursive function f : N P/ such that f E Grot, and f 4 Ct. This means that, on one hand, there exists a natural number j such that f = +i,and
-
Oj(2)
<_
‘(t(2))
,
U.C.
and, on the other hand, Oi(z)
> t(z)
i.0.
,
for every index i for f , Eventually, there must exist a natural number n > j such that t ( n ) < aj(n) 5 r(t(n)). We have arrived at a contradiction since for every i <_ n - I , either Oi(n) > r ( t ( n ) )or Oi(n) t(n).
<
0
Remark. The formula (4.8) occurring in the Gap Theorem c a n be restated as follows: N o index i of a recursive function satisfies the relation t(z)
< Oi(z) 5 r ( t ( z ) ) i.0.
Next we present a slight variation of the Gap Theorem together with a proof which can be easily generalired to obtain an Operator Gap
Theorem.
231
Chapter 3
(4.7) Theorem. (Revisited Gap Theorem; YOUNG [1973]) Let a :Pi --c N and t:d-c Pi be two recursive functions such that r ( z , y ) 2 y, for all z and y . Then we can effectively fmd a recursive function t :Pi4 N such that t ( z ) 2 a(.)
and for all j and z with z (@j(z)
0.c.
,
(4.9)
> j, 2
t(z)
* @j(z)> r ( z , t ( z ) ) ) .
(4.10)
Proof. To defme t ( z ) we set h t l = a(.) t2
9
= r ( z $,-el)+ 1
t , = r(z,tz)+l
,
t o = r(z,t,)+l
,
9
< i 2 z + I , ti-, = r ( z , t i ) + l 2 ti+I > t i . t o > t , >...> t, > f + l .
Clearly, for every O
So, (4.11)
...,
Among the ( z + l ) intervals [ti,ti-,), i = 1,2, z , z + l , we can fmd at least one, say [tio,ti0-,), such that there is no j < z for which the statement (4.12)
holds. Indeed, suppose by absurd, that for every i E {1,2,...,z , z + l } we can find a ji < z such that
< Oji(z) I r(z,ti) < ti-, It follows that there exist 1 5 n < n 2 z+1 {jili=1,2 ,...,z , z + l } c { O , l , ...,z-1). We arrived ti
.
(4.13)
such that , j = in, for at the following contrad-
ictory relation:
For every z we set
where i , is the smallest natural number satisfying (4.12). Clearly t b recursive; moreover, (4.11) guarantees the inequality (4.9). Finally, (4.10) is a consequence of the defmition of t and of (4.13).
232
Calude
Remark. It is worth noticing that under the hypothesis of Theorem (4.7), Ct
=
Only the inclusion Ct 3
C r o(pf),tl
*
Cro(Pp~,tlmust
be proved.
Assume, by
absurd, that for some j , Q j ( z )5 r ( z , t ( z ) )
U.C.
,
and Qj(z) > t ( z )
i.0.
Let z > j be such that aj(z) > t ( z ) . From Theorem (4.7) we derive the inequality O j ( z ) > r(z,t(z)),a contradiction. (4.8) Example. Take cP,,(z) = 2
8.'
e '
}
z times
,
and r ( z , g ) = 2', for all z and y. In view of Theorem (4.7) there exists a recursive function t : N 4 N such that t ( z ) 2 a ( . ) u.c., and there is no recursive function f :lN -+ IN satbfying simultaneously, for every index j for f , the following two conditions:
a,(.) > 2=
,
ia.
and
aj(z) 5 2'(")
a.e.
Remark. The proof of Theorem (4.7) indicates a recursive bound of function t size. Indeed, t ( z ) = ti < t o = r(z,t,)+I = r(z,r(z,tz)+l)+l =...= r(z,r(z,...,r(z,a(z))+l)+.,.+l)+l)+l; here the symbol r appears (z+1) times.
6 ((+i),(6i))be
(4.9) Corollary. Let 9 - = ((+i),(@i)) and - = spaces such that @i(z)< & i ( z )
(4.14)
9
for all i and z with z E dorn(di). Then we can effectively find a recureive function t :RV that
two BLUM
-
N such
233
Chapter 3
c$=
ct .
(4.15)
Moreover, t can be taken to satisEy the additional property: t(z)
where o : N
-c
N
2 a(.)
0.e.
,
is an arbitrary fured recursive function.
Proof. In view of Theorem (3.1) there exists a recursive function h :fl--* RV such that for all i,
ai(z) 5 h(z,di(z))
a.e.
,
and
6i(z) 5 h(z,@,(z)) a.e. Moreover, h can be taken to satisfy the condition: h ( z , y ) 2 y, for all z and I. Theorem (4.7) furnishes a recursive function t:N -c N which satisfies the conditions (4.9) and (4.10), with r = h. We shall prove that the equality (4.15) holds for this t . J3 a,(.)
5 t ( z ) a.e., then & j ( z ) 1. h(z,c~,(z)) 2 h(z,t(z)) a.e.
so,
< t(z)
a.e.
,
because the inequalit J
d,(z) 2 t(z) i.0. , (4.10). Hence Cp C C$.
contradicts condition The converse inclusion follows from the inequality (4.14). 0
Comment. According to Corollary (4.9) no matter how two arbitrary universal computers are selected, one much faster than the other, there exists a recursive bound t , arbitrarily large, such that every program which runs within the complexity of t on the fast computer also runs within the same bound on the slow computer. In particular, the same phenomenon occurs if we use only one computer and we analyse the complexity of program in two different ways (for example, time and memory) so that the inequality (4.14) holds. The above ideas can be generaliced to obtain an Operator Gap Theorem.
234
Calude
(4.10) Theorem. (Operator Gap Theorem; CONSTABLE [1972], YOUNG 119731) For every recursive function a :IN + IN and every total effective operator
,
[:PR-PR such that for all i and z,
f(+i)(z) 2 #i(zf
1
we can effectively find an increasing recursive function t : N 4 Pi such that t(z)
2 a(.)
1
for all z,and { j€oV I@,(z)5 t ( z ) 4.e.) = { j ~ n V 1 0 j ( z )5 F ( t ) ( z )a.e.}
.
Proof. We try to exploit YOUNG'S proof of the Gap Theorem for defming the required recursive function t by stages. Assume that f :IN tion
-
nV is a
recursive function satisfying the equa-
U Graph(*j(j))
Graph(ET(di)) =
t
I Ec;
for all recursive di (see ij€oV !Graph(*,) C P u t t ( 0 ) = a ( 0 ) and d o = 0.
Theorem
At Stage z > 0 in the computation of already defined for z < d,, where d , 2 x which will be further effectively determined. t will be denoted by t ( ' ) , i.e. t('):IN O I N d e f - e d by t(z) t"'(.)
=
X ,
,
for z
(2.8.27));
here
t suppose that t ( z ) has been
is a certain natural number This finite initial segment of is the p.r. function which is
< d, ,
otherwise,
for all z . Next we defme (z+ 1) recursive extensions of t('), namely t,,t
where for every z ,
*-,,...,t , : N
Ci =
PJ
,
235
Chapter 3
t"'(2) = t ( z ) ,
for z
< d, ,
rnax(a(z),t,(z-l)+I),
for z
2 d, ,
and for i E {z-l,,..,O),
ti(Z)
=
Finally we construct the following (zil)finite p.r. functions: lFJollF'l
given by
,...,AJ, :I?2%
I
to(.)
do(.)= co, and
9
N
,
I d, , otherwise, if
t j ( z ) , for t <_A, . J i ( t= )
,
otherwise,
00,
for every i E {1,...,z} and all z . Here and
U Graph(r/(,))] ,
A,+l = P [ Z 2 A, and Graph(*',) C
Ya i , i
where Ba,i = i E {0,...,z-I}.
{gemIry(n)= ti+l(n), for every n 5 z } , for every
-
In view of the monotonicity of the operator F we can prove, stepby-step, that for every i € {ZJ-1, ...,l},if t':m N is a recursive extension of some finite p.r. function di, then F(t')(z)
for every z such that A,
I ti-l(z)
5 z 5 A,.-1.
Let z 2 1. For all j E (0,...,z-l}, and i E (0 ,...,z},we say that di is unsafe for j if *'i(Z)
for ~ o m et with A, 2
t
5 A,, and
< @j(z)
9
(4.16)
238
Calude
i = 0, or ( O , ( z ' ) I A ' ~ - ~ ( Z ' )i , > 0)
for all z' with A,
5
(4.17)
5 A,-,.
z'
Claim 1. For every j
k
,
E {0,...,z-I}, at most one di is unsafe for j .
To prove Claim 1 we notice that if d , is unsafe for j, then for all
< i,we have:
@j(z)I r'i-l(z)
9
for every z with A, 5 z <_ Ah (since A, 5 A,, by construction, and (4.17) works with the clause i > 0). Furthermore, for all k 2 i,the relation
5 , A, 5 z' 5 Ah-,, thus
aj(Zt)
fails to hold for every z' with Claim 1.
.'I(.')
ending the proof of
Claim 2. For all z 2 1, j f {0,...,z-l}, and a E {0,...,z } , the property ,'di is unsafe for J'" is recursive, because the natural numbers Ao,...,A= and the finite p.r.. functions do, ...,dzcan be effectively computed.
< z, 5 z Idi is safe for j } 2 z ,
In view of Claim 1, for all z card{i
2 1 and
j
a cardinality argument shows that at least one of the finite recursive functions H',,...,K~, must be eafe for all j < z. By C l a h 2 we are able to extend the fmite p.r. function t ( + ) to a certain d,*which is safe for every
90,
j <
t.
We conclude with the following procedure for the step-by-step construction of t . Initially, t ( 0 ) = a(O), and d o = 0. For every z > 0, Stage L in the computation of t is the following: 1. Construct ( z + l ) recursive extensions t = ,...,t o of the finite p.r. function t(').
2. Construct the ( z + l ) pairs of finite p.r. functions and natural numbers (d,,A,), ...,(dt,A, ).
I z for which
3. Find the least i , 4. P u t t ( % + ' )= 7r'i
5 . P u t d,+, =
Our procedure grows faster than a , z > j, the extension means that either f ( t ) ( z ' )< aj(t'), for
A',
is safe for all j
< 2.
.
A0+1,and go to next stage. constructs a monotonous recuraive function t which and has the following property: For all z and j , if constructed at Stage z, i.e. t('+'), is safe for j . Thin for every z' E dom(t('+')), a,(.') 5 t ( t ' ) or else, . some z' f dom(t('+')). It follows that when
237
Chapter 3
t(2)
< Oj(2)
i.0.
,
we have [(t)(z)
< Oj(z)
,
i.0.
thus ending our proof. 0
The next result analyses the possibility to replace 4i by its complexity Qi in the formula (4.7).
h:M
(4.11) Theorem. There exists a recursive function that for all recursive functions di,
4
RV such
C
C@i
# ch(Pp,*i)
*
Proof. Let d : N -P RV be a recursive function which enumerates the step-counting functions Qi:t$d(i) = Qi, for all i (Proposition (3.3)), and define the recursive function r : N 3 -., nV by
1
4d(i)(Z)
.(i,.,v)
= 0 ,
I
if 4d(i)t2)
=y
?
otherwise,
for all i , z, and y. Notice that the totality of r follows from the recursiveness of the ternary predicate g d ( i ) ( z ) = y (which is in fact @i(z)= y ) and from the axiom (2.2). The recursive function g:I@ + - N defined for all z and y by g(z,y) = l+max(r(j,z,y) l j 5 z),satisfies the inequality g(zt@i(z))
> r(i,z,@i(z))
=
Qd(i)(Z)
9
for all i and z with 2 2 i . Furthermore, in view of Corollary (4.5), there exists a recursive function p : N 2 + N such that for every recursive function di, C
=
‘#d[i)
’
cpO(pp),@d(i$
cpO(Pp),#O(pp)8*,)) ’
So, the recursive function h :@ -+ N d e f i e d by
h(s,ar) = P ( Z , d Z , Y ) )
?
for all z and y, works. 0
The above proof relies on axiom (2.2) and Proposition (3.3). We can use thin observation to obtain further generalieations.
238
Calude
(4.12) Definition. (BLUM [1967a]) A r.e. set of p.r. functions yi ;NA N for which the ternary predicate 7;(n) = m is recursive, is called a measured set. (4.18) Example. The step-counting functions of a measured set.
BLUM space form
a 13
(4.14) Example. (BLUM [1967ai) A measured set of functions (7,)can be defined by
1
+;(n), i f + ; ( n ) # x a n d
7iCn) =
41(n)
x,
< i.#i(n)
9
otherwise.
It is seen that this measured set contains all the real-time computable functions.
(4.16) Example. The set of all primitive recursive functions is measured. To see this recall the enumeration of all primitive recursive functions given in Example (2.8.21). More generally, every r.e. set of recursive functions is measured.
(4.16) Example. The set of all recursive predicates is not measured since it is not r.e. (see Example (2.8.22)). @
(4.17) Example. The set of all p.r. functions is not measured since the ternary predicate bi(n) = m is not recursive. 0
(4.18) Lemma. A p.r. function B belongs to some measured set iff the graph of B is recursive.
-
Proof. The direct implication is obvious. To prove the converse, let a' be an index for 6 and let h : N IV be defmed by h ( z ) = i , for every 2 . Clearly, the measured set (dh(,,))contains B . 3
239
Chapter 3
(4.19) Theorem. (Compression Theorem; BLUM [1967a]) Let (ri) be a measured set. Then we can effectively find a recursive function h :@ + N such that for every recursive function ri, C
c7i
+ c”(Py.7i)
*
More precisely, we can effectively find a recursive function
k :pV + N such that for every recursive function ri, the following two properties hold:
If 4 j
=
, then @k(i)(z)
> ri(z)
L h(z,ri(z))
,
(4.18) (4.19)
0.e.
Proof. The recursive function k follows from an +yi)(z) = PY[Y # dj(z) 7 for all
a.c.
8-m-n construction:
i L 2 with @j(z)I ri(z)]
for all i and z. It is seen that if ri(z) # co, then total, then t$h(i) is also total.
g k ( i ) ( ~ ) # CQ.
9
Moreover, if ri is
h a m e now that we fu a recursive ri. If dt(i) = Qr, for some t , then for all J’ and z, z 2 j, @j(z) 5 ri(z) implies #k(i)(z) Z + j ( z ) . So, at(.) > 7i(z) Q.C. (i.e. (4.18)); moreover, dk(i)
c,;.
We pass to the definition of h: h ( z , ~=) m=(O,@L(j)(z)Irj(z) = Y $ and
i I z)
1
for all z and y. Clearly, k ie recursive and satisfies (4.19) since for every z 2 i , we have: h(z,ri(z)) =
m=(@k(j)(Z)
2 @k(i)(z)
Irj(z) = Ti(%) and
i 5.1
-
Comment. The Compression Theorem asserts that, though there is no uniform way to obtain larger complexity classes for all recursive functions, we can find interesting classes of recursive functions which have “optimal” algorithms for computing them modulo some recursive factor h. An we shall see in Section 3.9, every such claw of recursive functions is “recursively small”.
One essential feature of the p.r. functions occurring in a measured set is that their values re fleet their complexity. Such functions are .called
240
Calude
honest by MEYER and RITCHIE [19681.
:w
lV be two p.r. functions, g (4.20) Definition. Let f :N N ,g - )if there exists an total. We say that f is g-honed (with respect to 9 index i for f such that
(4.21) Example. The recursive function f in Theorem (3.5) is essentially dishonest. 0
(4.22) Lemma. a) For every recursive function g:M -+ lV the set of all g-honest functions is r.e. b) Every measured set can be embedded into the set of all g-honest functions, for a suitable recursive g.
di(z)
, if (z y , exists
&(&)
=
I
x,
t
then there
such that Oi(z)
and z = di(z)) otherwise.
\
We shall prove that
!d,+)
In
2 01 =
where h : R
4
{ f E PJf
=
di, and ei(z) 5 g ( z , f ( z )a.c., ) for some :}
,
N is the recursive function d e f i e d for all z by h ( z )=
8(K(Z)J(Z))*
Assume fust that f is 9-honest and that i is an index for f such for all z 2 z,. P u t IL = J(itz,,). We shall prove bh(n)= f . Let z be arbitrary. If z < z,, then O~(~)(Z =) ~ ~ (=zf ()z ) . In the opposite case, two situations may occur according to the convergence of #i(z). If &(z) = X , then Q i ( t> ) g(z,z), for every z , so 4+)(z) = x . If di(z) z 33, then + i ( z ) I g(z,di(z))t SO bh(n)(z) = f ( z ) . To prove the converse inclusion we show that for every n, that that
ai(z) 5 g(z,f(z)),
241
Chapter 3
@h(n)(4
for
every
z 2 L(n).
If
Ig(z,h(n)(z)) dh(n)(Z) #
and
dh(ts)(s) = +#(K(n)J.(a))(z) = 4 K ( n ) ( Z ) ,
x
?
and
E
@K(n)(z)
2 L(n),
then
5 g(z,dK(n)(Z))*
Hence, = @K(n)(z)
I g(Ec+K(n)(z)) = g(zdh(n)(Z))
-
b) If f : N + N is a recursive function and { 4 1 ( ~In) 2 0) is a measured set, then the Compression Theorem furnishes a recursive function h :hr? + N such that for every @ f ( i ) ( zI ) h(z,df(i)(z)) a*c.
So, the recursive function g = h works.
Is1
Remark. Though the notions of honest function and measured set are “almost the same” by Lemma (4.22), they are not exactly equivalent since an honest function may exist not in the measured set. The Operator Gap Theorem says that there is no effective operator which, on the basis of a recursive bound, produces a larger recursive bound which allows us to run new algorithms. The Compression Theorem says that there ia such an uniform method provided we restrict our initial recursive bounds to a measured set. The next deep result asserts the existence of a fiied measured set which contains names for any complexity class. In view of Lemma (4.22), this means that there exists a fued binary recursive function g such that every complexity class can be named by a g-honest function. (4.2a) Definition. A measured set 7;S said to be a elam determining for the BLUM space 9 if for every recursive function f :N-t N there exists a recursive function g : N + N in Tsuch that C, = C,. Roughly speaking, Tis a class determining for 9 - if it is measured and contains a name for every complexity class in 2. (4.24) Theorem. (Honesty Theorem; McCREIGHT and MEYER [1969])
Every BLUM space has a class determining set. Moreover, there exists a recursive function g : N + N such that for every total qje, #,(*I is also recursive and
242
Cdudc
In other words, there exists a total effective operator such that for every total 9,,
Before passing to the proof of the announced theorem we shall briefly describe a method for building hierarchies of recursive functions based on Honesty and Compression Theorems. We start with a recursive function 4g(i,) in the measured set furnished by the Honesty Theorem and then we use the Compression Theorem to obtain the larger bound defmed by q i l ( z )= h ( ~ , d ~ ( ~ ~for ) ( all z ) z. ) , We obtain the enlargement C
C*,(iJ
+
CQ,1
*
Then we apply the Honesty Theorem to obtain the index i i such that
The
Compression
Theorem
gives
us
an
index
i,
such
that
di2(z) = h ( z , dO(’11.I (z)),for all z,which ensures that C
We can continue with this method to obtain a strictly increasing hierarchy of recursive functions.
Proof of Theorem (4.24): We begin with an uniform procedure which for every p.r. function w :N3 N produces a p.r. function with a recursive graph w * :lV 3 N satisfying for every i the equivalence:
5 w ( z ) a.e.
w
ai(z) 5 w * ( z ) 0.c.
(4.20)
(recall that qbi(z) 5 I$,(.) iff q5,(z) = 3 0 , or &(z) # 30, dj(z) # 3 0 , and 5 t#j(z)). Since the resulting p.r. function W * is not necessarily recursive even if w is total, next we transform W * into another p.r. function which preserves all previous properties of w ’ and, additionally, is total when w ia total. Globally, we shall obtain a measured set. qbi(z)
To describe the initial procedure we shall use two arrays: queue and The queue array contains the indices for the p.r. functions analyaed. The cancel array reflects the “time” evolution of the property 0 , f z ) > w ( z ) , for some 2. cancel.
243
Chapter 3
Assume that e is an index for a given unary p.r. function w . We display the Stage n in the computation of w *: 1. Put queue(n) = n, z = K(n),y = t(n). 2. If Ge(z) # y, then go to step 6.
3. P u t i = 0. 4. If @i(z) > w (z),then put eancel(i) = 1. 5. Put i = i + l .
If i 5 R , then
go to step 4.
6. If w * ( z ) has already been defmed at an earlier stage, then go to the next stage of computation.
7. If there exists a natural number k properties:
2 n having the following three
eancci(qucue(k))= 1 @qWI.(C)(4
for every j
>I
,
9
(4.21) (4.22)
< k,if cancel(queue(j)) = 0,
then
IY ,
@qwse(j)(z)
(4.23)
then fmd the least such k, and put: w * ( z ) = y , cancel(queue(k)) = 0,
queue (n) = queue (k).
8. Go to the next stage of computation.
The following comments will ensure that the above procedure is effective and eventually terminates. At any Stagen = 0,1,2, ... the procedure assigns certain values to queue and cancel; so, the tests involving earlier values of these arrays are effective. The only problem can appear at step 4, since w may be undefmed at certain points. But, to arrive at step 4 we must pass the test in step 2, i.e. decide that Qe(z)= y < x. In view of BLUM axioms, in this case we have w ( z ) = #,(z)# x;sa, the test Gi(z) > w ( 2 ) can be effectively performed. The condition in step 6 guarantees that w * ( z ) is well defmed. Finally, if for some 2 , w * ( z ) f x, then w * ( z ) is defmed at Stugen = Jfz,w*(z)). Consequently, to decide whether w * ( z ) = y, for arbitrarily given z and y, we must simply run the procedure until Stuge J(z,y); this shows that the graph of w is recursive. Furthermore, since the above procedure is uniform in w , it follows that the resulting set of p.r. functions is measured. Next we pass to the proof of (4.20). Our proof will be by c u e s according to the “stability” of the involved index i with respect to queue (we say that i is stable if it reaches a fmal location in queue; in the contrary, i ia unetable). Fix an arbitrary i .
244
Cdudc
Case 1. (The index i is unstdfe.) In view of the hypothesis, queue(n) = i,for infmitely many n, by means of step 7. This means that all conditions involved in step 7 are fulfiied, and additionally, in this step one assigns the value y to w * ( z ) , and y < ai(z),by (4.22). So,
ai(z) > w * ( z )
i.a.
In case queuetn) = i,by step 7 one sets cancef(i) = 0. At a certain next move we must have - due to the unstability hypothesis an assignment cancel(i) = 1 to ensure that the conditions in step 7 are fulfilled again. This possibility occurs only if for some z,ai(z) > ~ ( z(see ) in this respect step 4). For every z, there is an unique poseibility to discover the inequality Oi(z) > w (z), namely a t Stage J(z,@,(z))(see step 2). So,
-
*
Oi(z)
>~
,
( z i.0. )
and this completes the proof in this case. Case 2. (The index i
a,(.) <_ w ( z )
is etable.) We shall prove the equivalences: a.e. H i
is stable
e a&) 5 /(z)
(4.24)
a.e.
We divide the proof into two subcases depending upon the value 0 or 1 when cancel(i) must ultimately stabilize.
Subcaee 2.1. (cancef(i) sta b-he s at 0.) We begin by noticing that the procedure assigns the value 1 to cancel(i) only fmitely many times (see the conditions in step 2 and step 4). Consequently, in view of the hypothesis, Q,(z)
5~
,
( z a) x .
since both queue and cancel are stable on i,for all but a finite number of z E dom(w') and w * ( z ) is defined by step 7 using an earlier index. By (4.23), for every such z,
@,(z)I W * ( Z ) so,
1
globally, ~ , ( z5 ) w * ( z ) 0.e.
Subcase 2.2. (cancel(i) stabilizes at 1.) Consider z such that at Stage J(z,O) and all later stages the index i as well as all indices above a in the array queue and their corresponding values in cancel are stable. Let
M
= max(o,(z) /cancel(j) = 0 and for some
k
<m ,
245
Chapter 3
qucue(k) = j,queue(m) = i )
.
It ia seen that in view of the analysis made at the preceding subcaee,
M
5 min(w (Z),U*(Z)).
M=3 so occur. Firstly, In view of the monotonicity of J, it fohwe that J ( z , M ) ia the earlier stage at which w * ( z ) could be defmed. In the contrary, we would violate the hypothesis and (4.23). Indeed, if w *(z)were defmed at some Stage J ( z , n ) with n < M, then we would have Two
poesibilities
may
w (2) = w * ( z ) = 30. Secondly,
M
< 30.
aj(z) > m
,
= w*(z)
for certain j = queue(k) and i = queue(!) with k < t ; furthermore, since eancel(j) = 0, we violate (4.23). Finally, we notice that W * cannot be defmed before Stage J(z,O), thus completing our argument. Since the index i haa stabilised at StageJ(z,O), and eaneel(i) is stable at 1, we deduce that (4.22) must fail to hold at Stage J ( z , M ) ,i.e.
.
a,(.) 5 M 5 m i n ( W ( Z ) , W * ( Z ) )
The above statement is based on a hypothesis which turns to hold almost everywhere, thus
a,(.) 5 w ( z )
a.e.
,
and
ai(z) <_ w * ( z )
a.e.
The fmal task of our proof is to modify the initial procedure and to get a new one which preserves the above properties and, additionally, produces a total function when it receives a recursive one. Since the initial procedure is uniform in the indices of w it follows that there exists a recursive function G :N+ RV such that w *(z)= & ( j ) ( ~ ) , for all j and z. By an 8-m-n construction we get a recursive function g:N 4 RV which satisfies the equation (4.25)
If 4j is total, then d#(j)(z)= then
#g(j)
#G(j)(.)
is also total because if for some
> dj(z)+4j(z)
2,
9
and the right-hand side of the inequality is fmite; remember, Graph(&(j)) is recursive. Furthermore, the ternary predicates ~G(,,(z) = y, (Dj(z) = z , and dj(z)+(Dj(z) = y are obviouely recursive. So, the graph of dr(j) ia
246
CJudt
recursive, thus proving that the set {do(,, 1 j E PJ} is measured. Finally, we shall prove t ha t for every total de,
a,(.) <_
de(2) a.e.
* a,(.) I # v ( e ) ( z )
a.e*
1
thus showing the equality
C*< =
c &,(el
*
We shall use the relation (4.24) and the defmition (4.25). Assume that for every z 2 zo, (4.24) holds: in particular, ai(z) 5 d,(z), For such an z two possibilities may occur: a) el(^) 5 +,(z)+CP,(z), and in this case by (4.24)i *i(z) I ’#G(e)(z) = #p(e)(s); b) d ~ ( r ) ( z> ) +e(z)+#e(z), and in this case Oi(z) 5 be(z) 5 ~ $ ~ ( z ) + a ~=( zdq(el(z). ) Conversely, if the equivalence (4.24) and the inequality a,(.) 5 I $ ~ ( ~ ) ( Zhold ) for every 2 20, then @if.)i bg(e)(z)5 d G ( e ) ( z ) , hence +i(z) I 4e(s)* Next we study the recursive enumerabitity of complexity classes. First we shall prove the existence of a BLUM space which has a non-r.e. complexity class. (4.26) Theorem. (LEWIS [1971], LANDWEBER and ROBERTSON !1972)) For every recursive function f:oV + PJ there exists a BLUM
space 9’ - (which depends upon f ) such that
&FI is not r.e.
Proof. Let 9 - = ((6,),(ei))be an arbitrary BLUM space, and let f be an unary recursive function. We choose a recursive set I = (io,il, ...,i,, ...} of indices such that dij(z) = for all lows:
j’ and
i
(4.28)
9
z . We defme now the step-counting functions
(a;)
as fol-
i f n = i j and
T ( j , j , g )= 0, for all y otherwise.
5z,
(4.27)
In the above formula T is KLEENE’s predicate.
It is easy to aee that 9’ = ((d,),(@{)) ie a BLUM space (the fvst axiom follows from (4.26), and the proof of the second axiom involves the recursiveness of I). Then, by (4.27), CP!(z) <_ f ( z ) a.e. iff there exist two naturals j and
247
Chapter 3
2,
such that n = ijand @ j ( z )= f(z),for all 2 ‘i
4 p )=
2
But
2,.
f (z),for each z 2 z, w T(j ,j , p ) = 0, for all p
5 2, and z 2 2,
w T(j,j,p) = 0, for all y w
i 4 dom(dj)
Hence
a!(.) I f ( z ) a.e.
n
4 K, for some natural j ,
w n = i, and j
and
Cf
I
= {g E R 1g =
n
6, and 4{(z) I f ( z ) a.e.1
=
{dij Ii 4 K )
-
n (Recall that K = {z E RV ]q5z(z)# x}= {z E IV IT(z,z,y) = 1, for some Y
E W)
If CF’ were r.e., then the set { j E RV Idi. E Cf’}
n
=
IV - K would be
r.e., contradicting Theorem (2.5.3) (see also Example 2.5.16)). 0
Comment. Theorem (4.25) implies the existence of a complexity class for which there is no effective method of describing what recursive functions are contained in it. Furthermore, from Theorem (2.6.15) we deduce that the problem of deciding whether a recursive function belongs to such a “bad” complexity class has independent instances with respect to every GODEL theory.
7 be a r.e. set of unary recursive functions. Then there exist two recursive functions B, b :IV + N such that the following (4.26) Lemma. Let
two conditions hold: For every f E
Proof. Let 7 = function. Put
{dh(i) l i
>O},
5 f ( z ) 5 B ( z ) a.e. ,
(4.28)
7cc,
(4.29)
*
where h : N
+
IV is
B ( z )= mx(dh(i)(z) t i I 2) and
9
a suitable recursive
248
Caludc
(4.27) Corollary. Every measured set containing only recursive functions can be embedded into a complexity class. in particular, the set of primitive recursive functions and the set of ultimately zero functions can be embedded into suitable complexity classes. 0
-
N is a recursive function such that Ct contains all ultimately zero recursive functions, then C, is r.e., for every recursive function f : N RV such that f(z)2 t ( z ) , for all 2.
(4.28) Theorem. If t:N
Proof. Assume that t and f satisfy the hypothesis of the theorem. Employ the s-m-n Theorem to get a recursive function s:N3 4 N satisfying the equation
1
+i(z)
#,(i,x,H)(z) =
0 ,
, if
(for each k
(for each z
5 .z,ai(k) 5 y ) and < k 2 z,ai(k)5 f(k)) ,
otherwise,
and then construct the r.e. set
1=
{+h(i)
Ii 2 0)
9
) ) . shall prove that where for all i , h ( i ) = ~ ( I \ ~ ) ( i ) , I i ~ ) ( i ) , @ ( iWe
Cf =
x.
If dj is recursive and a,(%) 5 f(z),for all z 2 z,, for suitable z,, then $j = q5h(i), where i = J(4 (j,z0,max(aj(z)Iz 5 ZJ). Conversely, for every i t 4h(i)E C,, since all ultimately zero recursive functions are in C 0
Comment. The above result can be strengthened, with essentially the same proof, by requiring Ct to contain all fmite restrictions of some fEed recursive function.
249
Chapter 3
-
(4.29) Theorem. Let (0 - be a BLUM space with the property that for all recursive functions f,g:nV A', if f ( z ) = g(z) a c . , then CF = . C; Then every complexity class is r.e.
Proof. Let t : N -4 N be a recursive function such that Cf # 0.Pick g in C$, and construct, by the s-m-n Theorem, the recursive function h :oV3 -+ N satisfying the equation qbi(z)
,
if (for every y
5 k 5 z,
9,(k)5 t ( k ) )and (for every
k
bh(i,s,#)(z) =
g(z)
,
< Y,@i(k) < 2)
9
otherwise.
\
C;.
=
A similar argument as in the proof of Theorem (4.28) shows that {q5,(il Ii 2 0}, where r ( i ) = for all i, thus
~(~~3)(;),~~3)(;),~4~)(;)),
ending the proof. 0
Notice that the BLUM space ((ui),(Ri)) satisfies the above condition of “complexity fmite invariance”. Furthermore, Theorem (4.25) says that the complexity finite invariance property is not a consequence of BLUM axioms.
Final Comment. The existence of non-r.e. complexity classes suggests the existence of pathological BLUM spaces. Therefore, new conditions should be added to BLUM axioms to eliminate these “bad situations”. See in this respect HARTMANIS 119731.
a.6.
THE SPEED-UP PHENOMENON
Can we classify the recursive functions according to their “best” algorithms with respect to a given BLUM space? The answer ia negative. It relies upon the fact that best algorithms need not always exist. This is one of the main achievements of BLUM’e theory of computational complexity. We begin with two illuminating examples.
250
Caludc
(6.1) Example. (BLUM [1967a]) Consider the recursive predicate f:RV -+ { O , l } given by
{ ,, 1
f ( z )= 0
if 2 is a palindrome, otherwise,
for every 2 . The function f checks whether an arbitrary natural number written in base 10 reads the same forward as backward. So, f(31) = 0, b u t f(37873) = I.
A typical algorithm computing f will work as follows: sequentially, the opposed digits are compared until a pair of distinct digits is reached, and in this case the result is 0. In the opposite case, the result is 1. .Measuring the complexity of such an algorithm by the number of comparisons, we can find a quicker algorithm (taking approximately half comparisons for almost all palindromes) simply by comparing simultaneously pairs of two digits. And the process continues indefmitely. No matter what algorithm is chosen to compute f , another can be found which computes the same function by means of half comparisons, for infmitely many inputs. 0
(6.2) Example. (VAN EMDE BOAS (19751) Let 9 be a BLUM space, and let q,w :PI 3 N be two p.r. functions such that dom(7) C dom(w), and the set dom(w)-dom(q) is not r.e. Then for every pair of indices (i,j),q = di and w = +j, and for every recursive function R:PI --t RV one has
<
R ( @ j ( z ) ) @i(z)
9
for infmitely many z in dom(q).
Proof. For the sake of a contradiction assume that there exist di = q , Q , = w , and a recursive R such that for almost all z in dom(9),
R(@j ( z ) ) 2 @i(2)
-
Then, for almost all z,
z
E dom(w)-dom(9) e (z E dom(w) and
Oi(z)
> R(@,(z))),
which shows that the difference between the set dom(w)-dom(9) and a certain fmite set is r.e. Consequently, dom(w)-dom(q) is also r.e., thus contradicting the hypothesis. 0
251
Chapter 3
Comment. Let T be a GODEL theory. Adding to the axioms of T an undecidable sentence, i.e. extending T,we get not only new theorema but also much shorter proofs for the theorems in T (GODEL [1936]). The origin of this “logic speed-up” is the phenomenon described in Example (5.2) (here dom(q) ia the set of the theorems of T,dom(w) is the enlarged set of theorems, and the length of the proof gives the complexity). The following deep result asserts that a stronger version of the above phenomenon is generally true.
-
(6.1) Theorem. (Speed-Up Theorem; BLUM [1967a], YOUNG [1973]) Let (s be a BLUM space and let g:ov2 N be a recursive function satisfyingthe condition
g(zd
I !dZ,Y+1)
for all z and y. Then there exists a recursive function f : N for all z,and for every
di
=
(5.1)
9
-
Wr such that
f there exists a j with
f = di, and
5 ai(z) a x . respect to g.) -
g(z,@,(z))
(We say that f has a g-speed-up with
(5.3)
Proof. We recall that (ri)i~o ie an enumeration of all fmite functions defmed exactly on some initial segment {O,l,...,n }; furthermore, dom(ri) = {O,l,...&(i ) } .
Let t : N z-+ Al be a recursive function satisfying the equation
I
.&)
4t(inu)(Z)
= q5i(z)
if 2 I W Y ) , otherwise. 9
9
(5.4)
For all n , m and z we define the s e t of indice8 cancelled at Stage z by n and m ,C(n,rn,z), to be
252
Cdude
Furthermore, for all n, m, and y
2,
if C(n,rn,y) is d e f i e d for all
< 2 , and +x
@t(,(n,e+i),s)(z)
9
for all m <_ a’ < z and 0 5 t 5 z, then C(n,m,z) is also d e f i e d and its members can be effectively determined. *i(.)
If C ( n , m , z ) is defined and i is in the fmite set C(n,m,z), then P x ,so di(t)f x .
We are now ready to use the s-m-n Theorem in order to obtain a recursive function H:IN -+ IN satisfying the equation
* bi (z),for every Clearly, if for some n , m, and z, $kl,)(rn,z)z +aln)(mtz
E c(n,m
= PY[Y
d&(n)(miz) 5 z
X,
11
.
(5.6)
, then (5.7)
7
since the set C(n,rn,z) - which must be defined in this case the initial segment {Oil,..+ W}.
- is included in
By the Recursion Theorem, there exists a fixed-point q of H, i.e. @)(m,z) = &l,)(m,.)
(5.8)
9
for all m and z . Notice that in view of (5.5), @(m,z) = 0
for every m
,
2 2.
Intermediate step.
op(rn,o)
f
If for some rn and z
x , $j2’(m,l) # x
> rn,
,...,@(m,z&l)
# m,
(5.9)
and dt(,(q,,+*),*)k)#
for allm
7
(5.10)
< i < z and 0 5 t <_ z,then @(m,z)
* 23 .
(5.11)
To show that (5.11) holds it is sufficient to prove that C(qirn,z)is defmed, i.e. C(q,m,y) is defmed for all y < z (we have used the relation (5.10)). We proceed sequentially. Clearly, C(q,rn,O) = @. Since df)(rn,l) z x , it follows that C(y,rn,l) is defmed (for if C( q, m, l) is undefined, then +f)(m,l) = x). An analogue argument can be employed to show that C(q,m,y) is defmed for all y < z. every
We now use the Intermediate step to prove that 462) is total. For m, df)(m,O) = 0. Assume that for all m and 0 5 y < 2,
253
Chapter 3
.
.
dp)(m,y) # x We shall prove that for every m, dp)(m,z) # x The interesting case is when m < z (for in the contrary df)(m,z) = 0). For m = z-l,z-2 ,...,1,0, we verify the conditions (5.9) and (5.10). If m = 2-1, then (5.9) becomes q5f)(z-1,0) f x, q5f)(z-1,1) # X , z-1,z-1) # x which are true in view of the inductive hypothesis. The condition (5.10)reduces to
...,#PI(
dt(,(q,z)&)
for every
t
#
x
7
z. But,
=I
if 2 I K(49
+),
d e ( q , s ) ( z,) otherwise,
,
if z 5 K ( z )
, otherwise, .
#f)(z,z)
, if 2 I K(z)
- [O
7
,
9
otherwise.
Step-by-step we can prove that dp)(m,z)# q for every m
< z.
> 0, C(n,m,z) = C(n,O,z)-{O,l,...,m-1) . For z = 0 , C(n,m,O) = C(n,0,0) = 0.Assume that We prove by induction on
2,
that for all n, m
c ( n , m , i l ) = C(n,O,y)-tO,1I..., m-1)
for all n, m
> 0 , and y 5 2 . If i E
9
E C(n,m,z+l), then
m
i
(5.12)
,
(5.13)
u C(n,n,y) ,
(5.14)
v<s+l
and @i(z+l)< g ( z + l , m a x ( ~ t ( e ( n , i + l ) , r ) ( Z + 1 l2 )
I z+1))
*
(5.15)
In view of the induction hypothesis, condition (5.14) can be equivalently written as
254
Cdudc
(5.16)
Finally, from i f C(n,O,z+l)-{0,l,
(5.13),
...,m - I ) ,
(5.16) and (5.15) we deduce thus ending the proof of (5.12).
that
For all n and i,there exists at most one y such that i EC(n,O,y). So, for every m there exists a natural number M (depending upon n) such that i f i < m and W
i E UC(",O,V) Y
Y
d
then (5.17)
We prove that for every z
> M,
C(n,O,z) = C(n,m,z) -
(5.18)
From (5.12) it follows that we need to prove only the inclusion C(n,O,z)
c C(n,m,z)
'
An inspection of the defmition of the sets C(n,m,z) shows that all we have to prove is the inequality i 2 rn, for i E C(n,O,z). Assume, by contrary, that i
< m.
Since z-3
i E C(n,o,z) c uC(n,O,z)
,
a =O
it follows from (5.17) that M
i E UC("'0,Z)
9
a -0
i E C(n,O,z), for some t 5 M < z. i E C(n,O,z) f! C(n,O,z),for some I < 2, a contradiction. On the baaia of (5.18), (for n = q ) , we deduce that
so,
df)(m,z) = d H ( , ) ( W ) =
&&,4
Consequently,
9
for all m , and z > M (where M i3 a constant depending upon m). Notice that we have only proved the existence of M ;the conatant M WM not effectively constructed, and, as we shall later prove, it cannot be effectively computed! We are now able to defme the required recursive function f :N RV by the formula '-c
255
Chapter 3
f(.)
=
#)(OlZ)
(5.19)
9
Clearly, (5.2) follows directly from the definition and (5.7). We note that for all i and 2 , if z > i , and
for every
2.
9(2,rnax(@t(r(p,i+1),.)(2)
then f #
Iz
5 4)> @1(4 9
(5.20)
4;. Indeed, i E C(q,0,zo)
1
where z, > i is the smallest natural number for which (5.20) holds, and consequently
r ( 4 = dp)(o,zO) = djr2l,)(o1Zo) = PY[Y # 4 j ( z o ) ,
#
di(Z0)
for every j€C(q,O,zo)]
*
Therefore, for all indices i for f ,
@ib) 2 9(z,max(~t(r(p,i+1),.)(2) l z s 2))
9
(5.21)
for all z > i . Let i be an index for f. Consider the constant M associated to q . Clearly, for every z, f ( z )= #(o,z)
-i
-
= {
5M, b p ) ( i + l , z ) , for z > M ,
#)(o,z)
,
for z
for z ~
~
5M ,
,
~ for ~ z ~> M ~
,)
~
z
)
where w = J ( M , P + ' ) (t$p)(O,O)
,...,bp)(O,M))) .
Put j = t(s(q,i+l),w)
.
First of all we notice that for every z in
N
we have:
256
Caludc
Example. Take g(z,y) = 2’, for all 2 and y . The Speed-Up Theorem asserts the existence of a recursive function f such that for every index i for f we c a n find another index i for f such that (6.4)
2q=1 2
a,(,)
a.e.
,
or
a j ( z )5 10g~(*~ ( z)a.e. ) This logarithmic speed-up can be indefmitely corresponds an index k for f such that +t(z)
iterated:
I logZ(Qj(z)) I logdlogZ(+s(z)))
to
each j
a.e*
aa.0. 0
Comments. a) The “almost all” condition in the statement of the Speed-Up Theorem cannot be dropped since for every recursive function we can construct a computing algorithm having an auxiliary computation table which produces finitely many outputs in a minimum complexity. b) Condition (5.2) shows that the speed-up phenomenon is not a consequence of growth. Moreover, it is not difficult to modify the above proof of the Speed-Up Theorem to obtain a recursive predicate which sathfies condition (5.3). c ) Theorem (3.5) says tha t not all recursive functions can be speedup. Furthermore, in the context of Corollary (4.9), every recursive function f with an h-speed-up (here h is the binary recursive function which satisfies the relations (3.1) and (3.2) in Theorem (3.1)) in the BLUM space 4 has the following property: for every index i for f we can find an index ;for f such that
257
Chapter 3
In other worda, for the computation of f the faster computer is not better than the slow one. d) We stress the asymptotic character of the Speed-Up phenomenon. The practical significaqce of this result is not so strong since all real computations deal only with finite initial segments of functions. The above proof of the Speed-Up Theorem does not provide an uniform way to obtain an index for the faster algorithm for f on the basis of an earlier index of f , A first non-uniformity result is given in the next theorem. (6.6) Theorem. recursive function recursive function recursive function
(BLUM [1967a]) Let g:nv? --c RV be a sufficiently large satisfying (5.1) and let f:RV -+ RV be the corresponding furnished by the Speed-Up Theorem. Then there is no k :RV --c Pi such that
f = Qt(i),for all i
,
(5.22)
and for every index i for f there exists an index k(j) such that g(z,*k(j)(Z))
I *i(z)
(5.23)
Q.C.
Proof. Let p:RV N be a recursive function such that for every n, the equation p ( z ) = n has an infmity of solutions. By the 8-m-n Theorem we get a recursive function s :RV + IV satisfying the equation dm(i)(z)= dbj(p(s))(z)
-
(5.24)
Intermediate step. There exists a recursive function h :nv? + IV such that (5.25)
for all i and
2.
First of all, in view of (5.24), we notice the existence of a recursive function R : W 4 RV such that
for all i and 2 . We shall prove the existence of a binary recursive function h satisfying the inequality
R ( z , i , t , t )< h ( z , t ) + h ( i , t )
,
for all 2, i , z , and t . We begin with a binary recursive function a : #
-+
RV and we
258
Caludc
To the r e c u r s i v e function R corresponds the recursive function T:w-+ N given by
T(z,r) = max(R(i,j,k,t) li,e
< z;j,k 5 y ) + l ,
for all z and y . Now, for all
t, i , z ,
R( 2 ,i ,z,t)
and t we have:
< T(max(z ,t ),mu(;, t ) ) 5 b,(max(z,t))+b~max(i,z)) .
So, we can take h ( z , y ) = b,(max(z,y)), thus completing the proof of the Intermediate step.
Assume, for the sake of a contradiction, that we can fmd an unary recursive function k = q5t satisfying (5.22) and (5.23). Then by (5.24) A ( t ) ( Z ) = 66,(p(r))(4 = h(p(r))(Z)
for all
2,
so ~ ( t ki)
an index for f . In view of (5.25),
@a(,)(.)
for all
2.
9
5
(2 t4k(p(s))(z
))+a(t,9t(p(z)))
For every n and for infinitely many %(t)(Z)
2,p
f
(5.26)
( z ) = n and
I h ( z , 0 , ( " ) ( 2 ) ) + h ( t , 4 t ( n ) )-
(5.27)
Now assume that the recursive function g satisfies the inequality 9(t,Y)
for all t and y. of 9 . Putting y
(5.28)
1
This is possible =
because the definition of h is independent O+)(z) in (5.28) we get: g(Z,*i(n)(Z))
so, by (5.27)
> z+h(z,y)
> z+h(zt@L(n)(z))
>
259
Chapter 3
@8(t)(Z)
< g(z ,@ k(n)(2 ))-z+h (t,4r(n))
7
for every n and for an infmity of x . Hence, for every n, @8(t)(z)
< g(z,@k(n)(Z))
T
a contradiction since f = q5,(t). 0
Comment. A stronger result (see BLUM I19691 and SCHNORR [1973)) concerning the non-effectiveness of speed-up can be proved: Let f and g be unary and, respectively, binary recursive functions. Then there does not exist a p.r. function T :RV a Hv such that for every index i for f , ~ ( iZ) and g(z,@r(i)(z))I @i(z)4.eWe close this section with the operatorial form of speed-up. Furthermore, the speedable function will be zero-one valued. (6.6) Theorem. (Operator Speed-Up Theorem; [1972]) Let
-
F:PR + P R
h4EYER and FISCHER
,
be a total effective operator. Then, there exists a recursive predicate
f :Iv
+
(04)
9
such that for every index i for f , there is an index j for f such that
F ( Q j ) ( z )< ai(z)
‘v
ox.
(5.29)
Proof. We begin with a r.e. sequence (pi) of unary recursive functions which will be later defmed. Assume that 4( is an enumeration of this sequence, i.e.
dt(J(i,z))= Pi(%)
9
for all i and z. Let be a recursive enumeration of all aero-one valued functions with fmite domain. We s h d construct, by stages, the recursive predicate f on the basis of a ternary p.r. function B ( , and of the unary recursive predicate cancel. Put caneeZ(0) = 0 and defme the Stage x in the computation of e .( ,u,2 88 mows: 1. P u t ecmeel(x+l) = 0.
(ei)
2. If z E dom(eW),then put Be(u,u,z) = eW(z), and STOP. 3. If z
< u, then put
Bt(u,u,z) = 0, and
STOP.
260
Cdude
4. Repeat all previous Stages q < z in the computation of B((u,u,z), and determine all rn < z with eaneel(rn) = 1. 5 . If there is an i , u 5 i 5 z, such that e a n c e l ( i ) = 0 and Oi(z) 5 p i ( z ) , then find the smallest i with these properties and put cancd(i) = 1, e1(u,o,z) = l + ( z ) , and STOP. 8. P u t B,(u,u,z) = 0, and
STOP.
Some remarks seem to be urreful: a) The binary predicate z Edom(e,,) is recursive, so the test in step 2 can be effectively performed.
b) FI $[ is total, then the binary predicate Oi(z) 5 pi(.) is recursive since pi is total. If ai(z) 5 pi(z), then #i(z) # zq so in step 5 , B[(u,v,z) # x, if all hypotheses hold. c) Once eaneel(i) = 1 at some stage, then the value of eaneel(i) remains unchanged at all later stages. d) In step 4, Bt(s,u,z) = x if any of the previous computations is undefmed. It should be clear from the construction and the above comments is total. that B 1 is a rero-one valued recursive function when We shall consQruct a suitable sequence (pi) satisfying the condition at the beginning of the proof and we shall put f t ( z ) = B ( ( O , O , z ) , for all z.
Claim 1. For every index
a
for f c ,
Gi(z)
> pi(z)
0.c.
,
(5.30)
in case #! is total. If, for some i , ai(z) 5 pi(z) i.o., then at some Stage z in the computation of f , (2) = B , (O,O,z), step 5 will determine the assignment c a n c c f ( i ) = 1, and hence will guarantee the relations: /,(z) = e,(o,o,z) = I++) # g,(.).
Claim 2. If dt is total, then for every u there is a u such that f , ( z ) = Br(u,u,z), for all z. For every u, we choose u such that
Iz < u, or coneel(i) = 1 in the computation of B((O,O,z),for some i < u } ,
d om(e o) = (z E IV
and
(5.31)
26 1
Chapter 3
fe(n) = ~ O ( n )
(5.32)
for every n E dorn(C6). Only the case u > 0 is interesting. We prove by induction on z that { i E N Ii 2 u, cancel(i) = 1 in the computation of Bt(O,O,z)} = {i E N l i 2 u , eaneel(i) = 1 in the computation of Bt(u,e,z)}. For z = 0 both sets are empty since the only possibility to obtain caneel(i) = 1 in the computation of 6,(0,0,0) (or e,(u,w,O)) is to pass the test in step 5, in particular the inequalities: 0 u <_ i 5 z = 0. It should
<
be easy to see that supposing the equality holds for certain 2 > 0, then it remains true when replacing 2 by (z+l), since the test in step 5 is “hereditary
”.
By an s-m-n construction we get a recursive function t : N 34 satisfying the equation dt(r,o,r.)(~ =)
Be(u,v,z)
Claim 8 . For every total effective operator u and u ,
N
there is a recursive function
d,, such that for all
EPt(s+l,o,n))(4
5 Pub)
To prove (5.33) we consider the p.r. function w the equation
w
(5.33)
=.I?.
:N2 aN
given by
(e , J( i , z))=
for all L , i , and z. The Recursion Theorem gives a fmed-point n : dn(w)= w ( n , w ) , for all w . We are now into a position to defme the required sequence (pi). For every i , consider the p.r. function p i : N defmed for all z by pi(.) = w ( n , J ( i , z ) ) i.e. ,
262
Cdudc
Intermediate Hypothesicr (IH): Aesume po to be recursive.
Claim 4. From (IH) we deduce that for all i and y (5.35)
Claim 6. From (M) we deduce that 4, is recursive.
If po is total, then p o ( z ) is given by the second clause in the defmition (5.34) for almost all z. Consequently, +"(J(j,y)) z cq for every j > 0 and all y , i.e. pj is total for every j 2 0, thus proving that 9, is total. Claim 6. For all u , u , l , and z , 9t(u,o,r)(4
+
* .( <
or .( E d o m ( C ) )
or ( d t ( J ( i , m ) ) #
30,
allu
for
.
(5.36)
The above equivalence fallows directly, by kiductbn an 2 , on the basis of the construction of the algorithm which computes the p.r. function fit(aYuY=) = 4t(u,a,t)(4.
If for every i > m, pi is total, then by (5.36) it follows that 4q,+l,a,n) total, and hence +'t(m+i,o,n) and E(@t(m+l,o,nl) are also total. So, if p,(m) = KI, for some rn, then for all i > m , pi(z) = 0, for every z (by virtue of the fvst clause in (5.34)). Hence po is total, thus ending the proof of Claim 3. We are now able to fmish the proof. P u t f = f , = dt(o,o,n),where n is taken from Claim 3. By Claim 3 and the remarks preceding Claim 1 we
263
Chapter 3
know that f is a recursive predicate. If i is an index for f , then j = t ( i + l , u , n ) is also an index for f when u is taken (not necessarily effectively) by Claim 2. So, by (5.301, Oi(z) > p i ( . )
use.
,
and by (5.33), E(@tt(i+l,u,n))(z)I Pi(z) a*e.
Consequently,
f ( 4 j(z)) < Pi (z)
a*e.
9
which proves that f satisfies (5.29).
Remarks.
is the following: a) An example of a total effective operator = rot$;, where r : N RV is a fued recursive function (BLUM [1967a]).
F(di)
Y
b) Take the total effective operator F in such a way that for the recursive d,, F(&) majoriees almost everywhere every primitive recursive function in di; then it follows that bi majorizes almost everywhere every primitive recursive function in O j . (The set of all primitive recursive functions in di - where di is a fured recursive function - consists of all functions which can be obtained from the base functions and di, by means of functional composition and primitive recursion.) c) A significantly speedable predicate is dishonest.
8.6. THE
UNION THEOREM
The basic result of this section asserts that the union of a recursively enumerable sequence of increasing complexity classes is itself a complexity class. This theorem provides a deep link between eome problems concerning the structural hierarchies and the complexity theory. As a coneequence, we shall prove that the set of primitive recursive functions is a complexity class with respect to certain BLUM spaces.
Fix 9 a BLUM space. Let (f;);Zo functions &h that for all i and 2,
be a r.e. set of unary recursive
264
Caludc
Our aim is to prove the following result:
(6.1) Theorem. (Union Theorem; McCREIGHT and MEYER [1969]) Under the above assumptions, we can effectively find a recursive function g : N -+ Bv such that
uc,; x)
c,
=
i=O
Proof. Since ( f i ) ia r.e., we can find a recursive function H : N -+ N such that fi = +H(i), for all i. We shall define g by means of a course-of-values recursion using a “priority method” which uses some unary recursive function guess. We display the procedure for computing the values g(O),g(l), ...,g( z), for some z. 1. Put y = 0. 2. Put
gU1?88(y) =
y.
3. P u t A = +H(,)(Y). 4. Put i = 0. 5-
If @i(v) I * ~ ( m r r ( i ) ) ( ~ )then , go to step 7.
6. Compute A = min(A,4H(grcrr(i))(y)) and put guess(i) = y.
7. Put i = ;+I. If i 5 y , then go to step 5. 8. Put g(v) = A. 9. Put y = y+l. If y
5 z,then go to step 2.
10. STOP. Some comments will be helpful. First, notice that equality (6.2) h equivalent to the condition: For all i,
(aj(,)5 g(z) ax.)
w
(a,(.) 2 ji(z)
ax.,
for some i)
.
(6.3)
It follows that the fnst candidate for g is the diagonal function fs(z). Clearly, G(z) = f,(z) is greater than fi(z), for aU i and almost all 2. However, thie function does not work since there may exist a recursive dj such that
a,(.) < f , ( z ) a.e. , and for every i,
(6.4)
265
Chapter 3
a j ( z )> fi(z) a.e.
(6.5)
In other words, 4 j is in the complexity class of G but not in the union of C f i , thus showing that G is too large! To avoid this difficulty start with the value j s ( z ) ,and then “guess” for every j a certain function in the sequence that majorises Q j . More precisely, for all i and z with i <_ 2 , the value guess(i) represents the “guess” that the inequality ai(y)
I dH(gwrr(i))(y)
a*e*
9
holds. It should be clear from the construction that for every z,
1; 5
and
g(z) = min(4H(r)(z ) d H ( g ~ c r r ( i ) ) ( ~ Qi(z)
> 4H(prrr(i))(z)) -
(6-6)
Once convincing that the procedure works we shall simply use the shorter notation f i instead of Claim 1. For every j,
f j ( z ) I g ( z ) 0.e-
(6.7)
Let j be fmed and consider an z 2 j. For every y such that j 5 y 2 z we have guess(y) 2 j and, by (6.1), fgrcr,(,)(z)2 fj(z). Indeed, an inspection of the procedure shows that, by step 2, gueee(y) = y 2 3, and then the value of gucse(y) can be modified only in the computation of g ( z ) , for some z 2 y. Two possibilities of modifkation may occur: a) z = y, and in this case, by step 6, guess(y) = y 2 j , b) z > y, and in. this caae, again by step 6, gUe88(y) = 2 > y 2 j. For every y < j 2 2 , 8 guces(y) 5 j , and fw,r(r)(z)is used in the and the test in step 5 fails computation of g(z), then fw,,(,,(z) < aY(z), to hold, i.e. gueee(y) = z 2 j. We continue the proof of Claim 1 with Claim 2. There e h t s an z,* 2 j such that no f, with y < j is used in the computation of g(z), for all z 2 zf. We proceed by rcductio ad abeurdum. Assume that for every z 2 j there exiets an y < j such that f, is used in the computation of g(z), i.e. there exists an i 5 z with y = gucas(i) and Oi(z1 > fmr,(i)(z) =
We
4
*
(6.8)
to analyse two situations. If j 5 i <_ z, then 2 j > y , a contradiction! If i < j 5 2 , then, on one hand,
have
y = gueae(i)
fy(
266
Calude
guess(i) =
z
2 j , and,
on another, by (6.8), g u e s s ( i ) = y
< j. Again
we
obtain a contradiction. that
We can reformulate Claim 2 as follows: There exists an zf 2 j such for all t 2 zf and y < j , i 5 2 , if g U e 8 8 ( i ) = y, then <_ fmr,,(,)(z).Consequently, we can write g(z) = mh(fz(z),jguei,(i)(z)
I; 5 %and
a;(.) > f p e i , ( i ) ( z ) , f i C 8 8 ( i ) 2 j )
7
since in case i 5 z and g u e s s ( i ) < j we have, by the above formulation of Claim 2, ai(2) <_ fgw,,(il(z). To fmish the proof of Claim 1 we note that if g ( z ) = fz(z),then 2 j, and if g ( z ) = fgre,,(i)(z), then again g ( z ) 2 fj(z), for all z 2 g(z) 2 fj(z), for all z 2 zj,since pess(i) 2 j. Claim 3. If Qi(z)
5
g ( z ) o x . , then there exist a j with
ai(z) <_
f j ( z ) a.c.
(6-9)
From the hypothesis, there is a t with the property: ai(z) 5 g(z), for every t 2 t . Now let z 2 max(t,z.) 2 i (here 2 i is the natural number furnished by Claim 2 with j = i ) .
ti'
We have
ail.) I g ( 2 )
=
mh(fz(z),fgw,,(j)Iz) lj I 2 and @j(z)
> fgse,,(j)(z))
*
In the computation of g ( z ) the inequality Qi(z) hold since it would imply @i(z)>
fgwr,(i)(z)
2 g(2)
> fpc,,(,)(z)
cannot
7
which contradicts the hypothesis of Claim 3. So, for every z 2 max(t,z;), g u e s s ( i ) does not change the value. Putting j = g u e s s ( i ) we obtain (6.9). U +i N such that the set of all unary primitive recursive functions coincides with the complexity class of g in the BLUM space ( ( u , ) , ( f l i ) ) .
(6.2) Corollary. There exists a recursive function g:N
Proof. First let ( f i ) be a r.e. enumeration of all unary primitive recursive functions and for every i put
267
Chapter 3 i
f;(x)
=
C fj(z)
3
j-0
for every x . Clearly, f:(x) 5 f:+l(z), for all i and 2 . Consequently, the Union Theorem says that in the BLUM space ((ui),(fli)), 30
where g :PI-+
N
ia a suitable recursive function.
To fmish the proof we notice that for every unary primitive recursive function f , an unary primitive recursive function F corresponds such that in the BLUM space ((ui),(fli)),f E CF. The argument proving the above statement follows from the inductive definition of the set of primitive recursive functions. The base functions are complexity classes named by primitive recursive functions and the closure operations respect thin property. 0
Remarks. a) All usual BLUM spaces have the property stated in Corollary (6.2). More precisely, every BLUM measure which is related by a primitive recursive function to (ai) haa the above mentioned property. See also the Remarks following Defmition (5.5.6) in Section 5.5.
b) Corollary (6.2) and the preceding remark show that there exist strong arguments for considering the class of primitive recursive functions to be the least complex class of recursive functions. c) The recursive function g which names the complexity class of all primitive recursive functions cannot be made primitive recursive. For, if g were primitive recursive, then g would belong to a certain class in the primitive recursive hierarchies (see Chapter 1) and so C, would not include higher classes. However, by the Honesty Theorem, g can be taken to belong to some measured set. d ) We can easily construct a BLUM space for which Corollary (6.2) fa& to hold.
268
a.7.
Caludc
BARD RECURSIVE FUNCTIONS
This section is dealing with “hard” recursive functions, i.e. recursive functions which are arbitraryly difficult to compute (see the Theorem (3.5)). We shall show that, under reaaonable assumptions it is impossible t o prove that “hard” recursive functions are really difficult to compute. Finally, the sufficiently hard recursive functions cannot be recursively enumerated. Again fur a
BLUM space Z - = ((4i),(*,)).
-
(7.1) Definition. (GILL and BLUM [1974]) Let h : N N be a recursive function. A p.r. function w :nV 3 RV is i.0. h-eomputable (with respect to 9 - ) if there is an index i for w such that
a,(.) 5 h ( 2 )
i.0.
(7.1)
We say that w is a x . h-hard if it is not i.0. h-computable.
Remark. In Defmition (7.1) the p.r. function w is not necessarily total, but in view of (7.1), w has an infmite domain. (7.2) Definition. A sequence (Ri), recursive provided the set
of subsets of
N is called uniformly
{ J ( i , z )I2 E R,,i EN) , is recursive.
Remark. If ( R i ) i2o is uniformly recursive, then each set Ri is recursive. (7.a) Example. For every i , put
Rl
=
{z E N 1 2
>l}
.
It should be clear that the sequence (R,); Lo is uniformly recursive. 0
The fust result asserts that if a p.r. function w vanishes for every element of a certain “easy-to-decide” recursive set R , then w is “easy-tocompute” on R. (7.4) Lemma. If (Ri)i20is uniformly recursive, then there is a recursive function B:JN + N such that every p.r. function which vanishes on some Ri has an index j such that on Ri,
269
Chapter 3
Proof. Let
:p N
be a recursive function supplied by the Theorem which satisfies the equation 8
4
,
8-m-n
ifzERi,
4*(idz) = (ooj(z) , otherwise.
(7.3)
We claim that the class {4,(i,,)l i , j EN} ia exactly the set of all unary p.r. functions identical zero on some set Ri. Indeed, from (7.3), every d,(i,jl vanishes on Ri; conversely, if qbh(z) = 0, for every z E Ri, then 4,(i,k) = 4 k We defme the recursive function B as follows:
ifz
4 Ri,
for all i i,j
2x ,
5 z,and z E Ri) , otherwise,
for every z. If z E Ri, and z 2 m a [ i , j ) , then @,(i,j)(z) 2 B ( z ) . If d j ( z )= 0, for all z E Ri, then (as we have already seen) 4, = +,(i,j), and, on Ri,
iB(z)
@,(i,j)(z)
n (7.6) Corollary. There is a recursive function b:N --c lV such that every ultimately zero p.r. function d j satiefies the condition Gj(z)
5 b(z)
0.c.
(7.4)
Proof. We use the sequence (Ri)i20in Example (7.3) and Lemma (7.4). 0
We are now into the position to analyse the possibilities to prove that a recursive function is a.e. h-hard. As expected, we shall prove that if the unary recursive function h ia sufficiently large, then we can construct a recursive predicate f which cannot, under reasonable assumptions, be proved to be o.e. h-hard, in spite of the fact that it is. F i x T a GODEL theory and suppose that for every unary recursive function h there exists in T a formula H ( i ) ,which can be effectively constructed on the basis of an index i , and has the following meaning: ‘‘#i ia a d . h-hard”. Since T is consistent, it follows that if H ( i ) ia a theorem of T,then 4i is use.h-hard.
270
Caludc
(7.6) Theorem. For each sufficiently large recursive function R , there is n o GODEL theory T which contains all true formulas H ( i ) as theorems. Moreover, we can effectively fmd an index i , such that H ( i , ) is true, but independent of T.
Proof. Assume, for the sake of a contradiction, that there exists a as theorems all true H ( i ) , for certain recursive function h. Then the r.e. set
GODEL theory T which contains S, = { i E
N I H ( i ) is a theorem in T} ,
consists of all indices for a.e. h-hard recursive functions. Furthermore, the totally undefmed p.r. function is ax. h-hard, so all its indices are in S,. By RICE’S Theorem, S, = N. Now, it is enough to get a sufficiently large h in order to ensure that there exist8 an a.0. h-computable p.r. function and fmally S, z RV. So, if h is large enough, then not all true H ( i ) are theorems of T. The last assertion in the statement of the theorem follows from Theorem (2.6.19). 0
The following question seems to be natural: Has every recursive function an “exceptional” algorithm about which we can certify that the function is a.e. hard? The next theorem answers this question in the negative. (7.7) Theorem. (GILL and BLUM [1974]) For every sufficiently large recursive function h , every r.e. class of a x . h-hard partial recursive functions omits arbitrarily hard recursive predicates.
-
Proof. Our aim is to construct, for every recursive enumeration (+,(i))i20 N ,a recursive function f : N (0,lj which is 0.e. t-hard but does not belong to {#,(i) li E N}.Formally, f must satisfy, for all i,the conditions:
-
of a.e. h-hard p.r. functions and every recursive function t : N
If
a,(.) 5 t ( z ) f
i.o., then f f (bi
d,(i)
,
*
(7.5)
(7.6)
The construction of f will be given on the basis of an uniformly recursive sequence (R,(a)(i,m,w)),which is independent of h . Every R,(a)(i,m,wl is given by stages. Stage n in the defmition of R,p)(i,m,g)is the following: 1. P u t
2
2. If n
< rn, then go to the next stage.
= y.
3. I f + i ( z )
I n, then R j i ~ ) ( i ,=~ {n)U , ~ ) R j ~ \ i , ~ ,and ~ ) yE
4. Go to next stage.
= z+l.
271
Chapter 3
We use Lemma (7.4) to obtain the recursive bound B for the complexity of the p.r. functions which vanish on some RJqi,m,,l. Since the construction of R J ~ ~ , is~independent ,,) of h, we can take h to satisfy the inequality: h ( z ) 2 B ( z ) ,for all 2. We construct the recursive function f by stages. We use two auxiliary unary arrays u and cancel. We say that the requirement 2i is outstanding at Stage n if canccl(i) = 0, and @;(n) t(n); the requirement 2i+l is outstanding at Stage n if @,(i)(u(i)) 5 n, and 4,ti)(u(i)) = f(u(i)), for the current value u ( i ) a t Stage n. The requirements are ordered according to the following rule: the requirement i has higher priority than the requirement j whenever a < j . Initially u ( i ) = canccl(i) = 0, for all i . We display the Stage n in the computation of f :
<
I. If there is no outstanding requirement with the number j < 2n, then put f (n) = 0. STOP. 2. Compute the number j < 2n of the outstanding requirement of highest priority. 3. If j = 2 i , for some i , and eancel(i) = 0, then put eancel(i) = 1 and defme
1 , if&(n)=O,
{
f ( n )= 0 , otherwise.
STOP. 4. If j = 2 i + l , for some i , then put u ( i ) = u ( i ) + l , and define f ( n ) = 0. STOP.
The above procedure works since: a) step 1 can be effectively performed; b) if j = 2 i , then chi(n) t(n), so #;(n) # 0s.
<
Claim 1. For every
i', f
# 4,(i).
h s u m e , for the sake of a contradiction, that f = d,(k), for some 1; furthermore, suppose that k is the smallest possible. Each even numbered requirement is examined at most once, since by step 3, canccl(i) = 1 in case the number of the requirement is 2i. In view of the miniiality of the index k, it follows that u ( i ) 5 pu[f(g) Z 4,(i1(u)], for every i < k. The operation of adding an unity to u( i) is performed only when an odd numbered requirement is examined (by step 4). So, the odd numbered requirements are examined only finitely many times. We conclude that each requirement numbered by j < 2k+l is attacked only fiitely many times. On this basis we can take a sufficiently large m in such a way that no requirement numbered by j < 2k+1 is attacked at any Stage n 2 rn. Let y be the value wigned to u(k) at the beginning of
272
Calude
Returning to the construction of R J ~ ( ~ , we ~ , ,notice ) ~ that is an infmite set of zeros of f (n is placed into R,(a)(,(k),m,,) only by step 3, i.e. only in case f(n) = 0, because Stage m.
%8)(,(k),m.,)
%(k)(4k))
5n
9
and
see in this respect step 4 in the construction of f and the defmition of an outstanding odd numbered requirement). Consequently,
f
=
4,(k) and on RJ(ak,(kj,m,,),
4,(k)k) L =-e. In particular, it follows that q5+) is i.0. E-computable, a conclusion which contradicts the hypothesis ({d,(,j I i E RV} contains only U . C . h-hard functions) since h ( z ) 2 B ( z ) , for all z.
It remains t o prove that f is a.e. t-hard. Again we proceed by cont ( z ) i.0. In view of the tradiction. Suppose that f = & and @ k ( z ) above argument, f # q5,(i), for all i . We deduce that eventually we shall find an n such that ek(n)5 tfn) and the requirement 2k will have highest priority (every requirement is attacked only finitely many times). So, cancel(k) = 1 a t this stage, and, by step 3, f # &. We have obtained a contradiction.
<
0
Comment. Returning to the question raised in the paragraph preceding Theorem (7.7), we notice that there is no GODEL theory T which, for a sufficiently large recursive function h , produces a sequence of theorems ( H ( s ( i ) ) ) ,such that every U . C . h-hard recursive function has at least an index i for which H ( i ) is a theorem in T. For, if there were such a GODEL theory T, then (q5,(i$ would be a r.e. class of p.r. functions, containing only u.e. h-hard recursive functions thus contradicting Theorem (7.7).
Chapter 3
273
8.8. COMPLEXITY SEQUENCES
Each recursive function satisfying the Speed-Up Theorem fails to have a “best” algorithm. The complexity of functions of this type must be analysed in terms of infinite sets of algorithms. In this section we develop such an analysis using the tool of “complexity sequences”.
(8.1) Definition. (MEXER and FISCHER [1972]) A sequence of unary p.r. functions is called a eomplezity sequence for the BLUM space (p - = ((di),(ai))and the p.r. function q5:RV S N ,if
For every a, dom(pi) = dom(4) , For every di = 4, there exists a j such that
(8.1)
2 pj(z)
(8.2)
Oi(z)
For every pi, there is a
dk
at(.) 5 Pi(.)
0.c.
=
4 such that a-e.
(8.3)
(8.2) Example. If (p is a BLUM space and 4:RV *RV is a fmed p.r. function, then the sequence {Oi 14i = d} is a complexity sequence for 9 and (p. - This complexity sequence is not r.e. 0
(8.1) Example. The sequence (pi)ilo constructed in the proof of the Operator Speed-Up Theorem is a r.e. complexity sequence for the speedable function. 0
(8.4) Example. A sequence (pi);?,, of unary p.r. functions satisfying (8.1), for certain fured p.r. function 4, is a complexity sequence for 9 and d provided it is cofrnal with the elements of the set {Qi = (6) under the relation “greater than or equal almost everywhere”. 0
In the following theorem we describe a method of determining, up to composition with a fEed recursive factor, for every recursive function, a r.e. sequence which “approximates” a complexity sequence.
Fix a BLUM space 9 - = ((q5i),(@i)).
274
Calude
(8.6) Theorem. There exist two recursive functions a & : @ --c N such for all i and z,then we have: that for every e l if we put pi(z) = @a(e,i)(z),
dom(#4(e,i)) = dom(pi) 2 dom(de)
(8.4)
9
for every i, 44(c,s)(4 =
for every
a,
A(2)
(8-5)
7
and for almost all z E dam(#,),
and
there is a k such that #k(z) = #e(z), for all z
E dam(#,), and for every i , h(z#i(z)) 2 @k(z) a.e.
Proof. Defiie the recursive predicate E : N 3--c (0,l) by I
~ (i i e, ~=) n ( g r (@i (Y),z)+gr('oe (Y),z Y=O
+ eq (de (Y Mi(Y 1))
9
for all e , i and z (in other words, for all y 5 z, if @ i ( y ) * e ( ~ ) I ~9 then +,(Y) = 4i(Y)). We construct the p.r. function w :N3 3 N by cases:
1
q$(z)
, if
E ( e , i , z )= 1 and
u ( e , i , z )= # e ( z ) , otherwise.
and
a,(.) < ae(z),
-
The 8-m-n Theorem furnishes the recursive function a : p PI satisfying the equation w ( e , i , z )=
#a(e,i)(z)
-
If be(z)f cr, then @,(z) # q so, if O i ( z ) < O,(z), and E ( e , i , z ) = 1 we have #a(e,i)(z)= di(z) # q in the opposite case ~ u ( e , s )= ( z#,(z) ) # x, thus proving (8.4). Since if E ( c , i , z ) = 0, then E(e , i , y ) = 0, for every y 2 z,it follows that (8.5) also holds.
-
To construct the recursive function h we begin with the auxiliary recursive function H :N4 N d e f i e d for all e , i , z , and z by
275
Chapter 3
L
Oace,i)(z),
H ( e , i , z , z )=
if E(c,i,z) = 1 and Oi(z)
=z
,
otherwise.
One can see that if E ( e , i , z )= 1 , then H(C,i,z,@i(z)) =
@ a ( a , i ) ( z)
= pifz)
Now put for all z and z
h * ( z , t )= max(H(rn,n,z,z) Im,n
5 Z) ,
and suppose that # e = #i. Since E ( c , i , z ) = 1 for every z,it follows that H ( e , i , z , a i ( z ) )= pi(z), for every z,so
2 pi(z)
h*(z,*i(z))
(8.8)
9
for every z 2 max(e,i). For the last condition we use the enumeration recursive function b :fl-c N by the condition
i
( r i ) i z oand
rj(z), if z E dom(rj)
‘b(nd(z) = #,(z)
define the
,
, otherwise.
We define now the recursive function G :N4 -c N by
L
*b(n,j)(z)
G(n,j,z,z) =
9
if @ n ( z ) =
1
otherwise,
for all n, j, z , and 2. Again we notice that G(n,j,z,O,(z)) = * b ( n , j ) ( ~ ) . On this basis we put for all z and z ,
h**(z,s)= max(G(n,j,z,t) Jn,i5 Z )
.
It follows that h**(z,Qn(Z))
2 #b(r,j)(z)
7
for all n, j , and z 2 max(n,j). Finally, we define h by h ( z , z ) = max(h*(z,z),h**(z,z))
,
for all z and z. Clearly h satisfies both (8.8) and (8.9) almost everywhere. In view of (8.4) we have: #a(e,i)(z)
=
be(%)
9
for every i and almost all z E dom(4,). Consequently, for every i , there exiata a natural number w (which depends upon i)such that
276
Calude
(8.6) Corollary. (MEYER and FISCHER [1972!) There exists a recursive function h --* N such that if
:w
,
C:PR-PR
is a total effective operator satisfying the condition
F(di)(z) 2 h ( z , b i ( z ) )
(8.10)
1
for every total qbi and all 2, then every recursive function satisfying the Operator Speed-Up Theorem (for this )F' has a r.e. complexity sequence. Proof. Our h will be produced by Theorem (8.5). Let 4, be the recursive function which satisfies the Operator Speed-Up Theorem, i.e. if bi = be, then there exists a bj = &c such that
F ( o i ) ( z )< ai(z)
a.e.
We consider the r.e. sequence (pi)iLo furnished by Theorem (8.5) for the above fmed e and we shall prove that it ie a complexity sequence for 4,. From (8.4) it follows (8.1). From (8.7) and the totality of 4, we deduce the existence of a k such that be = @k and for every (8.1 1)
h( z, pi( z) ) 2 @ k ( z ) a.e.
We use now (8.10) and the property of 4, to be C-speedable: to the algorithm C$k corresponds an algorithm bn such that b,, = b k = 4, and
h(z,an(z)) 5
F(an)(2)
<@k(Z)
a.e.
From (8.11) we deduce the inequality h(z,@n(z)) I h(z,pi(z)) a.e.
which enables us to write the relation
a n ( , ) I Pi(z)
a*e.
(8.12)
since we can assume, without loss of generality, that h ia increasing in the second argument (see the proof of Theorem (8.5)). So, (8.12) shows that
277
Chapter 3
(8.3) holds.
Finally, condition (8.2) follows from (8.6).
Let i be such that
4e. Since 4, is E-speedable, it followr that there exists a j such that dj = di = de and
4i
=
f(@,)(z)< ai(z) a.c. By (8.10) and (8.6) we deduce that Pj(z)
I h(z,Oj(z)) I z(@j)(z)< a,(.)
a*c* 0
The above corollary shows that the recursive functions poesessing a sufficient speed-up have r.e. complexity sequences. The next result goes deeper into this phenomenon. (8.7) Theorem. (MEYER and FISCHER I197211 There exists a recursive function h :@ -* RV such that for every nondecreasing total effective operator
E:PR-.PR
,
satisfying condition (8.10) and for every recursive function f : N the following two statements are equivalent:
f satisfies the Operator Speed-Up Theorem for [
.
-.+
RV,
(8.13)
One can effectively fmd a r.e. sequence (pi)i20 for
f such that for every pi there exists a pi with F(Pj)(z)< Pi(z) a-e. Here
f
(8.14)
nondecreasing means that for then [(+i)(z) 2 F(dj)(z)a.c*
all
i
and
j, if
4il.I 2 4j(z) Q.c.,
Proof. We take h as in Theorem (8.5). For the direct implication we assume that f has an [-speed-up. In view of Corollary (8.6), f possesses a r.e. complexity sequence (pi)i20. For every pi we can fmd an index k of f such that @k(z) 5 pi(%) a.c. (see (8.3)). Furthermore, we can fmd another index t for f such that [(at)(.)< cPk(z) 0.c. By (8.2), we have a j such that p i ( z ) 5 Ot(z) a.c. Now, since f is nondecreaeing, we can write E(Pj)(Z)
I E ( @ t ) ( zI ) pi(%)
a*c.
Conversely, amume that (8.14) holds. By (8.2), if di = f , then there exists a j such that (oi(z) 2 pj(z) 0.c. In view of (8.14), we can find a t with the property: pj(z) > e(pt)(z) a.c. Returning to (8.3), we get an
278
Coiude
index k for f such t h a t p t ( z ) 2 ak(z) o x . Finally, since is nondecreasing, we can write f(pt)(z) 2 [ ( a k ) ( zu.c., ) a,(.) > [(@h)(z) o.e., thus proving that f has a [-speed-up.
a Remarks. a) The pathological behaviour of total effective operators has been investigated by HELM !1971]. One constructs a total effective operator which is not bounded by any nondecreaaing total effective operator.
b) Operator Gap Theorem shows that not every r.e. sequence of recursive functions is a complexity sequence. More precisely, if F is a nondecreasing total effective operator and t :N-+ N is a recursive function satisfying Theorem (4.10), then no sequence of recursive functions (pi), 2o satisfying the inequalities
for aU i , is a complexity sequence.
a.9.
the
A TOPOLOGICAL ANALYSIS
In this section we investigate, by means of a constructive version of Theorem, the size of classes of p.r. functions.
BAIRE Category
The set of recursive functions which are ultimately sero R ( 0 ) is r.e. (see Example (2.8.20)). We shall adopt the following complexity-theoretic enumeration of R(0). Let 9 = ((4;),(ai))be a BLUM space and let s :RV3 IV be a recursive fu&tion, furnished by an a-m-n construction, which satisfies the equation:
-.
4i(z)
, if
+,(i,r,z)(s) = 0 ,
for every z in
5 Y,
and
a,(.) I
otherwise.
Iz EN),where h : N + IV is the
We prove that R ( 0 ) = {++) recursive function given by h(z)=
2
a(rIS)(Z),r43)(Z),r433)(2))
Y
N.
For every natural number
2,
dr(.) in in R(0) (because for every
279
Chapter 3
I l p ) ( z ) , 6A(s)ti) = # ~ f j ( ~ ) ( ~f)
3 @$)c,t(i) 5 I!%”((.) < 3o f and 4+)(i) = 0, in other cases). Conversely, if f = 4, is in R(O), and i
4,(i) for every i
OC)
r
,
=0
> i,, then take 2
= ~(~),(z,i,,max(@,(y) I0 5
I I io)) ,
and notice that f = 4 h ( # ) (because dA( ( i ) = 0, for every i =! 4h(#)(i)= # s ( i )= f ( i ) ,for every i I i,, smce @ , ( i )I m=(@,(ar)
> i,,
and
lo 5 Y I io)).
If 4 is an unary p.r. function, then supp(4) = {z E N I#(.) Z o , ~ is the eupport of 4. If t E R(O), then t ( t ) = card(eupp(t)). From the above construction it follows that for every natural number z , auPP(+h(s)) c {0919--9143)((.)}
(9.1) Definition. For every p.r. functions 4:nV A N ,w that w eztendo 4 on the support, and we write
dcw
(94
*
:nV
we say
9
in case 8uPP(b) c dom(w) and for every z
J
E 8Upp(d) we have: w ( 4 =
If4 C w , and 4
f w,
4(4
-
(9.3)
C
then we write 4 z w .
Remark. It is seen that C is a quasi-order relation on P R. We defrne a system of basic open neighborhoods which induces a topology in P R. For every t E R(O), put
u, = (9 E P R It c 4)
(9.4)
Remark. In view of Corollary (7.5), it follows that the complexity of the functions in R(0) is bounded a.c. by some recursive factor. Hence, the sets U,are constructed by means of some “emy-tecompute” functions.
}
280
Cdudc
0,then
(9.2) Lemma. For every t l , t 2 in R ( O ) , if Ut, n Ut, f exists t , E R ( 0 ) such that
Ut, = UtI n ut,
I
t3(z)
*
h(z)(=t2(z)) i if z EX
9
if 2 E 8uPp(t,)-X if 2 E 8'PP(tJ-X
tl(4 1 = t2(4 , 0,
there
9
9
otherwise. 0
Lemma (9.2) guarantees that (U,),,=J(~) is a system of basic neighborhoods in P R . We shall work with the induced topology r . The next result is immediate. (9.8) Lemma. equivalent :
Let
I C P R.
Then the following statements are
X is open For every
.
(9.5)
6 f 1,and every w E P R , if
4' E X there exists t E X n R ( 0 ) such that t C 4' q5 C w , then w E X , and for every
Remark. The topology
r
.
(9.6)
is not separated and quasi-compact.
(9.4) Definition. (CALUDE [1982a]) A set c P R is said to be a reeursively nowhere denre set with respect to the recursive functions f :N Bv, g :N-* Bv if the following four conditions hold: .-+
For every n
E IN,6!(,,) E R ( 0 )
(94
281
Chapter 3
For all m,n in
N ,if
m
> g(n),
d/(n)(4 = 0
then (9.9)
9
For every n Em?dh(n) c +I(,)
(9.10)
f
There exiats a natural number i such
RV for which
that for every n in !(d,,(,,))> i,we have X
n
U+,(n)=
0 .
(9.11)
Remark. Defmition (9.4) is simply a constructive version of the usual defmition of a nowhere dense set (see OXTOBY [1971]). Particularly, condition (9.9) is motivated by the necessity that the support of every function df(,,)should be recursively determined.
We continue with an useful technical result. (9.6) Lemma. equivalent:
Let
Xc PR. Then the following statements are
X is a recursively nowhere dense set. There exist two recursive functions f ' : N
i:RV + RV
-
(9.12)
N,
such that X together with f ' and
81 satisfy conditions (9.%),(9.9), (9.11), and (9.10') For every n E m,d h ( n ) C+ 6,1(,)
(9.13) (9.lo')
Proof. Clearly, only the direct implication must be proved. Let X be a recursively nowhere dense set with respect to the recursive functions f and g. First, let us construct the auxiliary recursive function p:@ -* lV defmed for all i and z in RV by
I
d,(i)(z)
P(i,.)
= 1 ,
9
if 2
I g(i)
9
if2 = g(i)+l otherwise.
,
We use an 8-m-n construction to get a recursive function a : N satisfying the equation ~(i,.) = d,(i)(Z) and we put
9
-.+
RV
282
Caludc
f(i) =
8(i)
, ,
g’(i) = g ( i ) + l
for every natural number i. The above defmitions ensure the recursiveness of the functions f’ and 9’. By construction, for every i EN,p ( i , z ) = 0 a.e., hence is in R(0). If rn and n are arbitrary natural numbers such that m > g(n), then = +,(,,)(m) = p(n,m) = 0. For every n in IN, +A(,,) C #/(n) C * d,(n] = #,.(,), so 4A(n) C d{(,,). Finally, in view of (9.11), for the triple X , f , g there exists a natural number i such that for every n in RV C with e (4A(,,))> i,we have X n U, = 8.Since I$,(,,) z Qi(,,) we deduce !In) the inclusion +,I(~)
+fl(n,(m)
which ensures the required relation: 1n
U,
J’kl
=
0.
Remark. By Lemma (9.5) it follows that we may equally use either conin the context of Definition dition (9.10) or condition (9.10’), i.e. c or
s,
(9.4).
c
P R is said to be recureiucly meagre (or, a (9.6) Definition. A set X set of the recureively first BAIRE category) if there exist a sequence (Xi)i?o, X i C P R, and two r.e. sets (fi)i20, (gi)i2a of recursive functions f i : N+ PI,g; :RV fded:
-
RV such that the following two conditions are ful-
r=uxi ,
(9.14)
i20
For every natural number ;,Xi is a recursively nowhere dense set with respect to (9.7) Definition. If X C
fi
and gi
.
(9.15)
P R ia not recursively meagre, then X in called a
set of recursively second BAIRE category.
Remarks. a) Intuitively, the recursively meagre sets are “recursively small” sets, in opposition to the sets of the recursively second BAIRE category
which are “recursively big”. b) Every recursively nowhere dense set ia recursively meagre, but
283
Chapter 3
the converse implication fails. (9.8) Propoeition. The f a m of ~ recursively meagre sets is closed under subset. Proof. Let
9
be a subset of a recursively meagre set
sively meagre under the decomposition
=
x.
If 1is recur-
U &, where
every Xi is
i2 0
recursively nowhere dense with respect to fi and gi, then putting pi = Xi n y, becomes recursively meagre under the decomposition
Y
y = U Yi
(since, obviously,
IJi
is recursively nowhere dense with respect
i>O
to
fi
and gi). 0
(9.9) Corollary. The family of sets of recursively second category is closed under superset.
BAIRE
Proof. Directly from Definition (9.7) and Proposition (9.8). 0
(9.10) Propoeitlon. Let
1 C P R be a set which can be written as
X=U& , i2 0
and for which there edst the recursive functions f ,g:@ the following two conditions: For every i E N,Xi =
UYi,, ,
-
nV satisfying (9.16)
i 20
For all i , j f Bv, Pi ,J is recursively nowhere dense with respect to qb,(i,j) and 40(i,j)
.
(9.17)
Under these circumstances 1is recursively meagre.
Proof. From the hypothesis it follows that every set Xi is recursively meagre. For every natural number rn put: cm
= YK(m)C(m)
rm
= b/(K(m)C(m))
9
’
204
Calude
Pm = 4g(K(rn),L(m))
*
Clearly, for every rn in RV, C, is recursively nowhere dense with respect to rm and pm. Furthermore, since
Uri =
i20
it follows that
IJ
U(IJYi,j)= I
m
>O j > _ O
Cm
1
20
1 is recursively meagre.
(9.11) Corollary. The family of recursively meagre sets is closed under
union. Proof. Directly from Proposition (9.10).
(9.12) Theorem.
(CALUDE [1982a]) For every recursively meagre set and every t E R ( O ) , there exists a recursive function f :N4 RV such that f E Ut-X.
K cPR
Proof. Since X ia meagre it follows that X can be written as
r=uxi , 120
where Xi is recursively nowhere dense with respect to f i and gi, for every natural i . Furthermore, the sets {fiJiZO and {gi}i20 are r.e. In view of for all n anl; i in RV. Lemma (9.5) we can suppose that dh(,,)F Let us notice that for fured natural numbers n, i , and j the functional equality d!,(n) =
dh(j)
7
is equivalent to the following two conditions: for every z
I gi(n),
z E sup~(4j,(n)) (9.18)
(9.19) Consequently, the predicate Q : l V 3 -c {0,1} defmed for all natural numbers i, j, and n by
285
Chapter 3
is recursive. Moreover, since 4fi(,,) is in R ( O ) , for ail natural numbers i and n , then for futed such i and n there exists a natural number j (depending upon i and n ) such that Q(i,j,n) = 1. By means of the natural number q satisfying the equality t = dh(q) and of the predicate Q we construct the recursive function r:m -c IV defined by primitive recursion: r(0) = 0
4) =4 r ( z + l ) = r j [ Q ( K ( z ) , j , r ( z )= ) 11, z
, f
>0 ,
and the sequence (tm>,,,2o of functions in R(0): to(.) = tm(4
=
+)
9
21 #fKlm)(r("))(4 t
*
We notice that in view of the relation Q ( K ( m ) , r ( m + l ) , r ( m ) ) = 1 , rn
21,
we deduce the functional equality h K , m ) ( ' ( m ) )= h r ( m + l ) )
for every rn
'
(9.20)
2 1.
We show that for every natural number n , C tm + k + 1
Indeed, for m
= 0,
to = t
= C +
and
4") df K(&)
-
dfK(l)('(l))
-
tl
9
*
(9.21)
286
Calude
tm =
df,,,fiW
= dh(r(m+l))
C
* 4fK,m*,p+1)) =
fn+1
by (9.20).
f
On the basis of (9.21) we can defme the recursive function 4 nv by
:N
f(z) =
if
trn(2)
Y
= I iIK(m)(+4).
By construction, for every natural number m , t, cf f ; in particular, t = t o c f , i.e. f E U,. We must prove that f $! X . For the sake of a contradiction, assume that f E X , i.e. f E Xi, for some i E IN. Since, by hypothesis, Xi is recursively nowhere dense with respect to f i and gi we can use the property (9.11) to fmd a natural number ni such that for all n in N with t‘(4qn1)> ni we have
Xi n u+,ii,,l =0
(9.22)
We choose m to satisfy the conditions
K ( m + l ) = i , and [ ( t , )
> ni .
The existence of such an m foIlows from the fact that for every natural number j the equation K ( z )= j has an infmity of solutions and from the monotonicity property (9.21). Finally set n = r ( m + l ) . We have (by (9.20)): twa
= dJK,,,,fi(m))= Qh(r(m+l)) = dh(n)
f
and
(fin) =
(dh(n))
> ni
*
On the other hand,
(9.23)
Since f E Xi, it follows that (9.23) contradicts (9.22), and this completes the proof. 0
287
Chapter 3
(9.18) Corollary. The set of unary recursive functions recursively second BAIRE category.
R is
a set of
Proof. Suppose, by contrary, that R is recursively meagre. By Theorem (9.12) we get the following contradictory relation: for every t E R(O), there exists a recursive function f E R such that t C f , and f 4 R. 0
Remark. The relation between the classical BAIRE Category Theorem and Corollary (9.13) is more profound. Every irrational 0 < a < 1 haa a continued fraction expansion nopa,, given by the relations
...
ni = [l/ri], if ti # O
,
where r,=a
,
ritl = l/ri-ni
.
Hence every function
f:nv-,nv
(9.24)
can be identified with the expansion
f (O)+l,f (1)+1, ...,r(.)+l)... and this correspondence yields a homeomorphism between the set of irrational numbers between 0 and 1, and the set of functions (9.24). T h b homeomorphism preserves the correspondence between recursive functions and irrational recursive real numbers in [O,l]. Via the above identifick tions, Corollary (9.13) and Corollary (9.9) give: (9.14) Corollary. The set of all recursive real numbers in [0,1] ia a aet of recursively second BAIRE category.
(9.16) Corollary. The set of unary partial recursive functions P R is a set of recursively second B A R E category.
Proof. Directly from Corollaries (9.13) and (9.9). 0
288
CJudc
(9.16) Corollary. Every non-empty open set is a set of recursively second BAtRE category.
Proof. From Theorem (9.12) it follows that every basic open neighborhood U,ie a set of recursively second BAIRE category. Finally we apply Corollary (9.9). 0
(9.17) Theorem. (CALUDE [1982a]) Every measured set i~ recursively meagre.
-
Proof. Let X c P R be a measured set, i.e. 1 = {$qi)l i E N } ; here h :IN N is a recursive function, and the predicate ME : I N 3 {0,1} defmed for all i , z and y in RV by
-.
is recursive.
We shall prove the existence of two r.e. sets of recursive functions 2o such that the singleton {bG(il}is recursively nowhere (di)i Lo and dense with respect to di and gi, for every i E N. First we construct the recursive functions di and gi. recursive function p :aV3 -+ RV by Q)(n)'
if z 5Zh3)(n), and
rt"]c,,,(z5 1,
z+3,
for all i , n , and
2
-
in RV.
c. .
We define the
if
2
V
d
IF)( n 1,
= ZQ)(n)+l, and
if z = Z431(n)+l, and
Y
d
otherwise,
By two fold applications of the e-m-n Theorem we get a recursive function e :RV N which satisfies the equation
289
Chapter 3
Put:
for every n in RV. Obviously, the sets of recursive functions (di)i20 and (gi)i20 are r.e. To frnieh the proof we verify conditions (9.8)-(9.11) for the triple dh(i), di and gi, where i ian arbitrary fmed natural number. The conditions (9.8) and (9.9) are clearly fulfilled: dd,.(,,)(z) = p(i,n,z) = 0 a.c. for each fued natural number n , and 6di(,,)(m) = 0, for all n and m with rn > gi(n) = 1p)(n)+1. For every n in RV, C
#A(n)
f
#+,(i)(”) = ddi(n)
t
because dh(n)(Z) =
d4a1(n)(z)
9
for every z E e ~ p p ( + n ( ~n , ) {0,1,...,@1(n)}. To verify condition (9.11) we set ni = 0 and we show that for every natural number n with t(4h(nl)> 0, we have:
Suppoae, by contrary, that for some natural number n, with drfi)is in the open set U+ai(n,, i.e. ddi(n)
Thie means that for every 2,
= @)(n)+l.
2
It k seen that
c dA(i)
E a u ~ p ( d d ~ ( ~ ) dh(i)(z) ), = 2,
f supp(#,+)).
Let w e must analyae two
S,+2
caaes, according to the value of the sum
ME(i,z.,y). U d
A) Incaae s,+2
c MW,Z,,Y)
Y d
we have
> 0,
=0
9
6di(n)(Z).
290
Crlude
ME(i,Z0,Y) = 0
7
or, equivalently, #h(i)(zo)
for every
# Y
?
0'5y 5 z0+2. Consequently, 4d,(n)(Zo)
= 1< zo+2
,
and
hence
B) Incase
it follows that
and consequently
In both cases we have arrived at a contradiction,
so (9.11) was
proved. 0
Remark. The proof of Theorem (9.17) shows that { # } is recursively nowhere dense if 4 is an unary partial function with a recursive graph. In particular, { f } ia recursively nowhere dense in case f is an unary recursive function.
(9.18) Corollary. Every r e . set of recursive functions is recursively meagre.
Proof. Every r.e. set of recursive functions is measured, so, by Theorem (9.17), it iS recursively meagre. 0
Chapter 3
291
(g.19) Corollary. The following sets are recursively meagre:
a) The set of primitive recursive functions. b) Every subeet of the set of primitive recursive functions, in particular, every c h in the GRZEGORCZYK (or any equivalent) hierarchy, the set of KALMAR elementary functions. c) The set of real-time computable functions. d) Every r.e. complexity c h . Proof. Directly from Theorem (9.17) and Corollary (9.18). 0
If we combine the Honesty Theorem and Corollary (9.18) we get (9.20) Corollary. There exists a recursively meagre set S C R such that for every recursive function j : N + RV we can effectively fmd a recursive function f':N + N in S such that Cf = C.I, 0
We may ask whether the converse implication in Theorem (9.17) holds. The answer is negative and it will be obtained by strengthening Corollary (9.19), d). (9.21) Corollary. Every complexity class iS recursively meagre.
Proof. Let f :N+ I? be a recursive function. We can fmd a recursive function g:N + RV such that C, U R(0) C :C, It follows that C, is r.e., hence, by Corollary (9.19), it is recursively meagre. Finally, we use Proposition (9.8) to see that Cf c C, is recursively meagre. 0
The existence of complexity classes which are not r.e. (see Theorem 4.25)) shows that the converse of Theorem (9.17) fails.
(9.22) Corollary. The set of algebraic numbers (and, in particular, the set of rational numbers) is recursively meagre. Proof. In view of a well-known result of HARTMANIS and STEARNS [1965] (proved by means of multi-tape TURING machines and the timecomplexity) the set of algebraic numbers is contained in a complexity class, so, by Corollary (9.21), it b recursively meagre. 0
292
Cdude
Remark. Corollaries (9.14) and (9.22) reinforce the classical result on the real line: in the set of all recursive real numbers only a few numbers are algebraic. (9.28) Corollary. In every BLUM space the set of step-counting func. tions is recursively meagre.
Proof. We apply Theorem (9.17) to the measured set of the step-counting functions. 0
Remark. Corollaries (9.20) and (9.23) show that the sets occurring in the Honesty and Gap Theorems are sparse relative to recursive functions not only in the algebraic sense, but also in a recursively topological sense. Furthermore, Corollary (9.23) shows that the Gap Phenomenon ia not a consequence of the distribution of the step-counting functions between all p.r. functions.
a.io. HISTORY The rapid developments of mathematical logic, constructive mathematics and computer science were followed by a considerable interest in the construction of algorithms, in the analysis of their efficiency (see, for example, GODEL’s speed-up theorem for proofs in recursive logics, GODEL (19361, ARBIB [1969]). The first attempt to develop a systematic approach to a theory of computational complexity for the study of quantitative problems in computing was made by W I N [1959], [1960]. The study of specific time and memory complexities was a milestone in the development of ths area (see in this respect the papers of HART.MANIS and STEARNS [1964], [1965], HENNIE and STEARNS [1966], STEARNS, HARTMANIS and LEWIS [1965], HARTMANIS [1968]). The name “computational complexity” was given by HARTMANIS and STEARNS [1965]. Other three pioneering papers influencing much the growth of the field at its beginnings are: YAMADA [1962], RABIN [1963], and COBHAM j1964].
293
Chapter 3
The axiomatic approach waa introduced by BLUM [1967a]; his wonderful work WM written along the idem of RABIN [1980] and HARTMANIS and STEARNS [1965]. The recursive dependence of complexity measures, the Speed-Up Theorem (also a Speed-Up Theorem for total effective operators of the form f’(4) = r 04, where r is a fmed unary recursive function), and the Compression Theorem are due to M. BLUM. The algebraic study of BLUM spaces WM undertaken by ADRLANOPOL1 and DE LUCA [1974], and ADRIANOPOLI [1976]. The complexity classes were introduced by HARTMANIS and STEARNS [1965] and McCREIGHT and MEYER [1969]. The Gap Theorem waa derived independently by TRAKHTENBROT [1967] and BORODIN [1969]; the Operator Gap Theorem WM proved by CONSTABLE [1972]. The proofs of the last two theorems come from YOUNG [1973] (see alao, MACHTEY and YOUNG [1978]). The honesty property waa introduced by MEYER and RITCHIE [1968]. The Honesty Theorem appears in McCREIGHT and MEYER [1969]; it is one of the fvst examples of a result in computational complexity, whose proof is given by a “priority method”. The proof of the Honesty Theorem comes from MEYER and MOLL [1972]. The existence of non-r.e. complexity classes W M proved by LEWIS [1971], and LANDWBER and ROBERTSON [1972]; these papers include a detailed study of complexity clssses. BLUM’s Speed-Up Theorem proof is taken from YOUNG [1973] and MACHTEY and YOUNG [1978]. The Operator Speed-Up Theorem belongs to MEYER and FISCHER [1972]; another proof of this theorem can be found in YOUNG [1973]. An interesting survey on the speed-up phenomenon is VAN EMDE BOA3 [1975]. The proof of the Union Theorem (which belongs to McCREIGHT and MEYECR [1969]) was taken from BRAINERD and LANDWEBER [1974]. The material of Section 3.7 wad essentially taken from GILL and BLUM [1974]. The analysis of the complexity of recursive functions by EmR and FISCHhR means of complexity sequences was initiated by M [1972]; see also SCHNORR and STUMPE [1975]. A general result concerning the possibility of describing the complexity of recursive functions by a recursive sequence of honest functions wad explored in MEYER and W ” N [1979]; they have obtained a strong result from which we can derive the Compression Theorem and the Operator Speed-Up Throrem. Section 3.9 follows the MEHLHORN [1973].
paper
CALUDE
[1982a]; see
abo
294
Cdudc
The excellent survey paper of HARTMANIS and HOPCROFT [1971] contains many fundamental resulta in this field. The following b o o b contain chapters dedicated to BLUM’s axiomatic theory: ARBIB [1969], AZRA and JAULIN [1973], BRAINERD and LANDWEBER [1974], SCHNORR [1974], MACHTEY and YOUNG [1978],
CALUDE !1982b].
Useful bibliographies are included in BOOK [1969], IRLAND and FISCHER [1970], HARTMANIS and HOPCROFT [1971], USPENSKY and SEMENOV [1981].
9.11. EXERCISES AND PROBLEMS
Section 9.1 (11.1) (Open) (COOK (19831) Is any irrational algebraic number real-time computable in the sense of Definition (1.2)?
Section 9.2 (11.2) Defme a “memory-complexity” associated to the acceptable g6deliaation (w !‘I). (11.3) Use Theorem (2.11) to obtain Theorem (2.6.3).
Section a.8
9
be a BLUM space. Prove that for all recursive funcwe can effectively fmd an index j for g such that tions f ,g:N --* aj(z) > f ( z ) , for ull z E AT. (11.4) Let
Section a.4 (11.5) (BLUM; McCREIGHT and MEYER [1969]) Let ((di),(cD,)) and 4 = ((di),(6i)) be two BLUM spaces. We say that 4 iB a refinement of-+, if for all sufficiently large recursive functions t :nV --nV we can -fmd a recursive function r:HV -+ IN such that Cp =
C p = Cp. Show that for every BLUM space 9 , we can construct a BLUM 4, - such that neither 9- nor 4 - is a refmement of the other.
space
(11.6) Are the complexity c h s e s closed under intersection? But under union?
295
Chapter 3
(11.7) Show that every r.e. set of recursive functions is a complexity class in a suitable BLUM space. (11.8) Show that for each recursive real e > 0 and every recursive function f :N--., N we can frnd a recursive predicate F : N + (0,l)such that for each index i for F,ai(z) 2 f (2) a.c. and
(kF(j))AZ+l) < I 4
for all z EN.
(11.9) (CONSTABLE [1972])Show that in the context of Theorem (4.10) there ia no recursive function t * : N-+ N such that if a,(.) 2 t o ( = )i.o., then ai(z)2 J’(t*)(=) i.0. Section S.6
(11.10)Give a direct proof of BLUM’s Speed-Up Theorem for recursive predicates. (11.11) (BLUM [1969])Prove that no recursive function has an effective sufficiently large speed-up (see the comment following Theorem (5.5)). (11.12) (SCHNORR [1973])There is no recursive function which has a sufficiently large speed-up, such that both the index of the faster pro-
gram and the number of points where the speed-up fails to hold can be recursively bounded by the index of the slower program.
(11.13)(MEYER and FISCHER [1972])Let
E:PR+PR
,
be a total effective operator. Prove the existence of two recursive func{0,1}, b:N + N such that if +i= f , then there exists a tions f :RV j 5 b ( i ) such that = f and f‘(Qj)(z) < Qi(z) a.c. -+
(11.14) (HELM and YOUNG [1971])Prove that the statement in Exercise (11.13) fails to hold for all recursive functions with speed-up. Section S.6
(11.15) (McCREIGHT and MEYER [1969])For each recursive function t :N-+ N ,put 1, = {iE N 146 is total and Qi(z) 2 t ( z ) a.c.}. Does the Union Theorem remain true when replacing “Ctl’ by “It”? (11.16) Let t :N+ N be a recursive function such that Ct is precisely the set of all primitive recursive functions with respect to the BLUM space ((ui),(fli)). Show that t grows more slowly than the A C K E R W N - P E T E R diagonal function A, though both functions majorise almost everywhere each primitive recursive function.
296
Cdude
Seetion 8.7
A systematic interchange of “a.e.” and “i.0.” in Definition (7.1) leads to the notions of u.e. h-cornputable and i.0. h-hard functions. (11.17) (LANDWEBER and ROBERTSON [1972]) Prove the existence of a r.e. set of i.0. h-hard p.r. functions, which includes every i.0. h-hard recursive function; here h is an arbitrary recursive function. (11.18) (ROBERTSON11971)) Prove that for every sufficiently large recursive function h :N+ RV, the claes of a.e. h-computable p.r. functions is r.e.
Section a.8 (11.19) (MEYER and FISCHER [1972])Prove the existence of a recursive function h :@ * RV, such that for each recursive 4e, if a) pi(z)= + t ( J ( i , z ) ) for , all i and z,and b) for all i, there in an u, such that pi(z) 2 li(z,max(@I(J(j,n))Iu < j 5 n 5 2 ) ) a.e., then (pi) ia a complexity sequence for a recursive predicate f :N+ {O,l}, and if di = f , then +i(z)
> pi(z)
4.e.
Sectlon 8.9 (11.20) (ZIMAND [1983b](Added in proof. I have learned through Professor G. ASSER that the same results have been reached by G. SCHAFER (A note on conjectures of Calude about the topological sise of sets of partial recursive functions, 2. Math. Logik Grundlag. Math. 91 (1985), 279-280).) Show that the set of all recursive predicates is recursively meagre. Extend the result to recursive functions with fmite range. (11.21) (ZIMAND [1983b])Show that the set of non-total p.r. functions is recursively meagre, i.e. the set of all recursive functions is a “recursive residual”. (11.22) (Open) Is the set of speedable recursive functions recursively meagre? (11.23) (Open) Give a topological version of the Compression Theorem.
297
CHAPTER 4
4. KOLMOGOROV AND MARTIN-LOF’S COMPLEXITY THEORY
This chapter is devoted to the complexity analysis of “algorithmic descriptions”. Due to the fact that in what follows the input/output processes play the decisive r&, we are dealing with string-functions (over a non-binary alphabet). This study hae led to a satisfactory definition of random strings, which turn out to have many interesting applicationa.
4.1. EXAMPLES
In this section we present two problem which motivate the complexity-theoretic approach to random atrings, namely the opthisation of program length and the probabilistic tests of primality (with an application to cryptosystems). Paradoxes often turn out to be an important source of fertile mathematical ideas. That is why, we begin the analysis of the optimisstion problem below by presenting the famous BERRY paradox (see, for example, VAN HEIJENOORT [1967]). Consider the smallest natural number that cannot be defined by an English phrase whose length is less than lo3 characters. Let us suppose that n, is this smallest natural number and that the defmition of n, hm at lead lo3 characters. It is easy to see that, in fact, nocan be defmed by the following E n g h h phrase having much less than los characters: “the smallest natural number that cannot be defmed by an English phrase with less than lo3 characters”. Consequently, the natural number no cannot eziut!
Someone may argue against the linguistic and mathematical correctness of our former defmition (for an interesting discussion see BOREL
298
Cduda
[1946]). To avoid criticism, one can employ a formal axiomatic system having precise specifications. The problem of checking if a proof written in this system is correct is completely mechanical (for i=1,2, generate all strings of length i in the finite alphabet of the system and check for every such string whether is a correct proof; print all theorems of the system, i.e. our defmitiona, whose proofs were found), and consequently, it can be simulated by a computer (CHAITIN [1974)). In what follows we shall describe thin problem in detail (see aleo, DAVIS [1978], MACHTEY and YOUNG [1978]). We shall use a sufficiently strong programming language PL in order to give precise mathematical defmitions of natural numbers. A definition of a natural number n is a pair D = (P,m), where P is a (correct) program in PL and m is a natural number subject to the following condition: the program P accepts m as input and after running on m it prints n and halts. Clearly, every natural number n has at least a definition. Take, for example, D, = (P,,n), where P, is the program
...
BEGIN READ n PRINT n STOP T h e length of a defmition D = (P,rn) is the sum of the number of characters of program P and the characters number of the input data. For example, the length of D, is 20+[log,n]+l, where p is the base in which n is written. Consider now the following optimization problem: Find the shortest definition for every natural n. Every natural n has at least one defmition and there exist natural numbers VL which have significantly shorter defmitions than D,. For example, let us take n = p', for some k 2 35, and consider the program R, BEGIN READ k i = l n = p
WHILE i
# k
DO: n = n . p , i = i + l
PRINT n
STOP
Clearly, (R,,,k) is a defmition of n w h i h is shorter than D,, since A < p'-=, for every k 2 35. Let us SUPPOS~ that PL satisfies the following three conditions: PL is aufficiently strong in order to:
Chapter 4
299
a) contain a program which, for every given program P in PL, computes the number of characters of P and halts, b) accept subroutines, and c) perform some basic algorithmic operations
(including WHILE constructions), PL uses a fmite alphabet (consequently,
(1.1)
the number of correct programs in PL having a fued length is finite),
(1.2)
PL works with natural numbers written in a base p
2. 2
.
(1.3)
Each natural number has at least one shorter defmition, though it may well have several ones. So, the optimisation problem has at least one solution which, by (1.2) should be searched for in the fmite set of all defmitions of shorter length than the length of 0,. It seems quite natural to ask whether the optimal solutions (or, a t least, one such solution for every natural n) could be algorithmically obtained, i.e. by using a program in PL. We shall prove that under the hypotheses ( l J F ( l . 3 ) no such program exists. Suppose, for the sake of a contradiction, that there exists a program P in PL such that for every natural n, 4.) gives as output a shortest defmition of n and halts. Let us denote by (fln),rn(n)) the defmition f l n )*
For every natural t
2 1 we construct the program Qr as follows:
BEGIN READ t y=o z=o
WHILE z < t DO: CALL fly),
PRINT y STOP
z = length ( f l y ) ) + length (m(g)), y = y+l
In view of (1.1) and (1.2) it follows that Q, ia a correct PL program. For distinct naturala t , and t,, the corresponding prograxm Qt, and Q,, diifer with respect to the input data and the condition tested in the WHILE atatement. Consequently, there exists a constant c > 16 (which
300
Cdude
depends upon the programs in (l.l),a) and b)) such that for every natural t 2 2-e we have: length ( Q t ) = length ( t ) + e = [log,t+l]+c
< e+log,t+2
,
and, consequently, defmition ( Q r , t )is shorter than t , length
(8,)< t
.
In view of (1.2), the program Q, prints the smallest natural number requiring a defmition of length greater than t . This is a contradiction, becauae there exists already a defmition of it shorter than t . The above example suggests the possibility of measuring the complexity of fmite objects (natural numbers, strings etc.) by means of their shortest defmitions induced by a fmed computing device. The reader will a h fmd this idea in the next section. Recent results in approaching the complexity of concrete classes of problems have led to an important distinction between problems having a potynomial time algorithm and those requiring exponential running time. It is largely agreed that problems requiring exponential running time are intractable. Yet, problems for which no polynomial algorithm is known can sometime8 be solved by means of non-deterministic polynomial algorithms. The non-deterministic algorithms are very useful for theoretical purposes, but they are rather incongruous in practice. Furthermore, the problem of transforming non-deterministic polynomial time algorithms into the equivalent deterministic ones is open. In contrast, a new class of algor i t h m running in polynomial time has appeared: the clam of probabilistic algorithms. The probabilistic methods have been used for several decades (Bee
PAZ [1971], and the bibliography JANKO [1982]). The interest in these
new algorithm has increased when difficult problems turned out to be solvable by probabilistic algorithms that are working faster than the known deterministic ones. A typical example is the factoring problem. The complexity of factoring natural numbers is unknown (the best of the steps, for all large n a t u r b present algorithms work in (log2m)c'-*m m, where c ia a constant, NILEMAN, POMERANCE and RUMELY !1983]; thia means that within fdteen seconds a etrong computer can check the primality of a fifty-digit natural number, LANDAU (19831). MILLER [1976], using the Extended R I E M A " Hypothesis (ERH), has d e v k d a polynomial algorithm to test primality. More exactly, let n and b be natural numbers, such that 1 5 6 < n. Denote by M(6,n) the
Chapter 4
301
b”-’ fl(mod n), or
(1.4
following condition: rn = (n-1)2+ is natural and 1 < gcd(bm-l,n)
< n, for some natural i .
(1.5)
If M(l,n) holds, for some b , then n must be composite. On the bagis of ERH, there exists a constant c such that if n is composite, then we can for which fmd a natural 6 satisfying the inequalities 1 5 6 5 c M(b,n) holds. The number b is called the witncer of the compositeners of n. RABIN 119761 has shown, without ERH that, when n is compoaite at lesst half of the natural numbers 1 5 b < n are witnesses of the compositenem of n. SOLOVAY and STRASSEN [1977] constructed a probabilistic algorithm for testing primality by means o,f the JACOB1 symbol j(b,n). For every natural b , 1 <_ 6 < n, set 6 = J(l,n) (see RIVEST, S H A M I R and ADLEMAN [1978] for an efficient algorithm that computes j(b,n)). Assume that b is relatively prime to n. If n is prime, then
6 =- b(”-’)D ( mod n)
.
(1.6)
Since, for a composite n, the set of all naturals b, 1 2 6 < n, sstisfying (1.6) is a proper subgroup of unite of Z,,, it follows that at leaat half of the naturals b smaller than n and relatively prime to n do not satisfy (1.6). The SOLOVAY and STRASSEN probabilistic algorithm runs k independent trials. If for some trial the answer is “composite”, then the number n ia declared composite (and in this caae the output i s correct). In the opposite situation, the natural n is declared prime (and the probability that the output is correct is greater than 1-2-’). The general form of the MILLER and W I N , reepectively, SOLOVAY and STRASSEN probabilistic algorithm is the following. Take k naturals uniformly distributed between 1 and n-1, inclusively, and for every trial b, check the validity of some fmed predicate W(b,n). If for some b, W(b,n) holds then n is composite. If not, n is prime with p r o b e The predicates W(b,n), which are ddferent for bility greater than 1-2-‘. the MILLER and W I N , respectively, SOLOVAY and STRASSEN probabilistic algorithms, can be evaluated by polynomial algorithms. These probabilistic algorithms act deterministically, but they use a “random device” a coin flipping, for example in order to obtain, a t mme moments, “an auxiliary entry”. The given output is only probably correct; neverthekss, the correctness probability is sufficiently large. The study of the correctnetw of thew probabilistic algorithm requires an adequate notion of
-
-
302
Cdudc
randomness; some related results will be presented in Section 4.8. We end this example with an application in cryptography which will show the practical significance of the above probabilistic algorithms (see RIVEST, SHAMIR and ADLEMAN [1978], LANDAU (19831). In short, the idea is that on the basis of the diificulty of factoring large naturals a cryptosystem can be constructed, in which the encryption method is “public”, but for possible interceptor, decryption is very dBicult and it could take years to get. Such a mechanism ia called a f i b l i e - K e y Syetem.
RIVEST-SHAMIR-ADLEMAN’smethod use8 EULER’s phi-function
<
(#(m) = card{n E PV 11 5 n m,ged(n,m) = 1)) and the fact that calculating d(m) ia polynomial time equivalent to factoring m. Each partici-
4
pant in the cryptosystem fmds two large primes (each having about fdty digits) p and q, and a natural b, 1 5 6 < pg, which is relatively prime to d(pq) = (p-l)(q-1). Such a 6 does exist since most natural numbers smailer than pq are relatively prime to #(PQ). Every participant in the cryptosystem appears in the Public-Key Book with the pair (b,n), where n = pq. The encryption of a message is given by the following algorithm: 1. Translate the message into natural numbers.
2. Break the resulting message into blocks of convenient length. 3. Transform each block into (block)’( mod n).
The decryption of a message can be done by the following algorithm:
I. Compute the integers z and y , such that bz++(n)y = 1. 2. Break the message up into blocks. 3. For each block, compute (block)'( mod n). 4. Glue the block8 back together.
5. Decode the resulting message.
The decryption algorithm is correct because from the relation ged(b,+(n)) = 1 it follows that we can (eaaily) fmd the integers z and y, such that bz+g)(n)y = 1 (for example, by EUCLID’s modified algorithm in
MARCUS [1981]). Consequently, ((block)’)’
3
(bl~ek)’~
= (block)’*”)’ E
(block) (mod n)
,
by EULER-FERMAT’s Theorem (For every integer m and every natural u which is relatively prime to rn we have: ad”’) E 1 (mod m).). The decryption is “feasible”, for it takes polynomial time to compute
Chapkr 4
309
z if one disposes of +(n). The ddference between the addrewee and a possible interceptor lies in the former knowing #(n), while the latter knows only n (which is the product of two fdty-digit primes); factoring such a large natural number is a t present an intractable problem.
4.2. KOLMOGOROV’S COMPLEXITY
In this section we develop a complexity-theoretic method for defming “random strings”. This approach waa initiated independently by SOLOMONOFF [1964], KOLMOGOROV [1965], and CHAITIN [1966]. The adequacy of this method ia mainly due to MARTIN-LOF[1966a], [1966b]. We begin with an illuminating example. (2.1) Example.
(MARTIN-LOF [1966a]) Consider the following four binary strings of length 32: z = z y = 10011001100110011001100110011001 u = 00001001100000010100000000100000 u = 01001110100111101000001100101101.
Suppose that a random device produces reros and ones with probability 1/2. According to classical probability theory the strings z , y, u and u are equally probable (i.e., the probability of each is 2”*). We can compare the above strings from another, totally different, point of view, namely “regularity”. The string z is of maximum regularity, hence its information content is lower. It in easy to see the regularity involved in the string y: eight substrings of the form 1001. As concerns u and u , we can hardly specify a defrnite regularity. Nevertheless, a deeper analysis would point out a drastic difference in the structures of u and u. To see this let us return to the strings z and y and kt us defme them in a shorter way: z can be described by the English statement “only scrod”, y can be defined by “eight strings 1001”. In order to distinguish the strings u and v , we order the binary strings of a given kngth according to the increasing frequency of the ones and within c b s of equal frequency, in the lexicographical order induced by the relation 0 < 1. We define a string by its number in the above enumeration. The number of a string of length n having a small frequency of ones (i.e., m/n 5 1F,where m is
304
Cdade
the number of ones) requires approximately n*H(m/n) binary digits, H is the binary entropy function: H ( 0 ) = 0, where H ( t ) = -t.loglt-(l-t)*log2(l-t), 0
,
binary digits, which is smaller that n for small values of the quotient m/n. Note that u is such a string (8/32 < lb);consequently, u haa a shorter defmition. In contrast, the string v appears to have no shorter defmition. It is only one of the four strings which would be regarded as being the output of a random experiment which gives preference to neither ieros or ones. These examples point out a closer relation between complexity and randomness. Moreover, the length is not a decisive factor in this analysis. For example, the string u (or even, the string u ) is more complex than the string a consisting of 40 s e r a . The last remark suggests that the complexity basically refers to cognition processes (see also LOFGREN [1977]). KOLMOGOROV [1965] has defmed the complexity of a given string z with respect to the algorithm 4 as the length of the ahortest program which computes it. More formally, let us flx a fmite alphabet
x= with p
{Q1lQ2,...,QI)
1
2 2 elements, and consider a p.r. function
g:x*xm-Qbx* . (2.2) Definition. The KOLMOGOROV complczity induced by
4 ia a
function
K + : X *x N
-+
JV U
{m}
,
defmed by the formula
(X.
m w r ) Iv EX1,9(y,m) = 4 , in ca&e 2
KdZ
Im) =
for every z in X * and m in
=
d(v,m),
for some y in X * otherwise,
N.
,
306
Chapter 4
(2.8) Example. Let 4:X*x R'V + X* be the recursive function defmed by #(z,rn)= z, for every z in X* and rn in N. A simple computation shows that
K+(2 Im) = t ( z ) for every z in
X* and
m
in
,
RV. 0
(2.4) Example. Let f:Hv a X * be a p.r. function. Asaociate the p.r. x RV *X* given by t$,(z,rn) = f(rn), for every z in X* function +,:X* and rn in N. (Clearly, if f(m) = q for some rn in RV, then #,(z,rn) = q for every z in X*.)If z = f(rn), for Bome rn in R'V, then t$,(A,rn) = 2. Consequently,
i
0 , if2 = f(rn),
K+,(z Irn)
=
00,
otherwise.
(2.6) Example. Consider the p.r. function
+:X*x Hv A X *given by
in case t ( z ) = rn ot herwiee.
,
[(z), i f t ( 2 ) = rn 00 , otherwise.
,
z d(z,m) =
Then
K + ( z Irn)
=
i
(2.6) Example. (MARTIN-LOF [1966a]) Take p = 2, a1 = 0 and We defme a p.r. function #:X* x R'V *X* in this way: #(z,n) is the kth element in the enumeration of the binary strings of length n intrduced in Example (2.1), where k ie the natural number whose binary expansion is 2. Let m(z) be the number of ones in 2. Then, for every z a2 = 1.
in x*,
K,(Z
when m(z)/t
(2)
IW)
W.H(m(z)/W)9
5 lfi. 0
308
Cdude
(2.7) Lemma. Let
+:X*x IV a x ' be a p.r. function. Then:
For all natural numbers n and r we have: card{z
EX*l t ( 2 ) = A , K,(z
For all n and m in card{z
N ,if
n
In) = r }
5 p'
.
(2.1)
2 m, then
EX*l t ( z ) = n,K+(z In)
< n-m} 5 (p""-l)/(p-1)
t
(both equalities can occur).
Proof. (2.1) Let A = {Z E X * l t ( z ) = n, K,(Z In) = r). Assume A (the case A = 0 is obvious).
z0
We defme the auxiliary function D:A-,~x* by D ( 4 = {ar E X * It (u) = r , db,t (2)) = 2). For every z in A we have D ( z ) # 0; moreover, if z1 # z2, then D(zl) n D ( z , ) = 0, so D ( z J # D ( z q ) . Since the function D is injective it follows that
cardA = cardD(A)
5carW
.
= pc
(2.2) The case n = m being obvious, assume n
> m.
In view of
(2.1), we have:
card{z
EX*lt(z) = n,.K4(z In) < n-m}
n-m-1
=
card{z E X ' It (z)= n&,(z
In) = i}
id
n-m-1
5
c Pi
= (p""-l)/(p-l)
i4
. 0
For
all
c(n,m) = card{z
natural
numbers
n
EX* l t ( z )= n, K,(Z In) 2 n-m}.
and
m,
set
307
Chapter 4
(2.8) Corollary. Let 4:X' x RV ax*be a p.r. function. Then for all natural numbers n and m such that n 2 m, we have:
> P"(l-P-AP-1))
+,m)
20
(2.3)
9
(the last equality holds for p = 2 and m = 0). In particular,
> P"(P-2)/(P-1)
+PO)
20
-
(2.4)
Remarh. 1) Let 4:X' x RV S , X * be a p.r. function,'and let n and m be in RV such that n 2 m. I f p > 2 or m > 0, then limc(n,m) =
00
n-ca
.
The aesertion above fails to be true in caae p = 2 and m = 0. Actually, we shall present an example of a p.r. function 4:X' x RV having the property that e(n,O) = 1, for every n in RV. Let p = 2, a1 = 0, a2 = 1. Let < be the lexicographical order on X* = {0,1}* induced by 0 < l : X < 0 < 1 < 00 < 01 < 10 < 11 < 000 <... Recall that y(n) is the n t h string in the lexicographical order; it is seen that y(2"+'-1) = l", and y(2"+') = On+1. (Recall that for every a EX, a" = a...a, (n copies) for n 2 1, and ao = X.)
ax*
Let E(0) = {(A,O)}.
For every natural number R
E ( n ) = {(g(i),n) li=1,2,3 ,...,2"-1,2"+'-1}
2 1 set
.
uE ( n ) c X*x N. 00
ina ally, put E
=
n 4
Now we defme by cases the announced p.r. function +:E + X*: a) For n = 0,
4(X,O)
=
A.
b) For n 2 1, d(y(i),n) = y(i+2"-1), 4(y(2"+'-l),n) = y(2"+'-1).
for i=1,2,3 ,...,2"-1,
and
A rapid examination of the above defmition tells us that for.every natural n 2 1, one hae
{z EX* It(%) = n&+(z In) 2 n } = {z EX*l t ( z ) = n&,(z
In) = n }
308
Cdudc
.
= {y(2"+'-1)}
Hence c(n,O) = 1. This fact shows the existence of a drastic distinction between the binary ease and the non-binary e a ~ e s .
2) From the inequality (2.4) we deduce that for every p.r. function
d:X*x N A X * and for every n in N ,there exists a t least one string z in X*such that l ( z ) = n and K,(z In) 2 n. (KOLMOGOROV [1965]) There exists a per. function A X * with the following universality property: For every p.r. function # : X * x RV a x * , we can effectively fmd a natural e (which depends upon w and 4) such that (2.9) Theorem.
w
:X*x lN
K,(z for every z in Proof.
Let
I4 I K,(z
Im)+e
(2.5)
9
X*and m in RV. us
+i:x*x RV ax*.
consider
an
acceptable
giideljsation
u*,
(#i)i
For further purposes we defme the following auxiliary (primitive) recursive functions: 1) T : X * -+ X * , T(X)= a1a2, and for every z EX*, z = z1z2...2,, with n = l ( z )2 1, T(z)= 21212222...2,z,a1a2, 2)
f:X'+x*,
f ( z )=
and 3)
g:x*+x*, !7(4 =
1 1
z
, if z = T(z)y, for some
X
,
y
, if z = T(z)y,for some
X
in X * otherwise, y and z
in otherwise.
y and z
,
,
X* ,
Notice that the last two recursive functions are well-defined because the representation z = T(z)y is unique (when it holds). Let & : X * x (X*x N )A X * be an universal p.r. function, i.e. for all i,z in X*,and every m in N ,we have: #i2iv(i,(z,m)) = di(z,m). The p.r. function w :X*x N a x x will . be defined by the formula
309
Chapter 4
w (2 ,m =
4Eie ( f ( ~ ) , ( g ( ~ )1), m *
Now let 4:X' x PJ ax' be a p.r. function and let i be an index for 4, i.e. d = bi. Aseume that K& Im) = t < cq i.e. there elrista a string y in X ' with [(y) = t and #(y,m) = 2. Take z = T(i)y and compute: w(z,m) = w(T(i)y,m) =
4Eie(f ( ~ ( i ) y ) , ( g ( ~ ( i ) y ) , m ) )
= 4%e(it(y,m)) =
6i(r,m) = 2
and
e (2) = e ( T ( i ) y )= e (y)+2([
(i)+l)= t+2(! (i)+l)
.
Set c = 2(e (i)+l). We have proved that
K,(z Im) 5 e ( 2 )
= tfC
= K,(z Im)+e
.
Remark. The constant e appearing in the asymptotic relation (2.5) depends, in fact, upon the gcdelisation (di)=* and #.
(2.10) Definition. A p.r. function w :X' x PJ 4X' which satisfies the asymptotic relation (2.5) will be called an universal KOLMOGOROV algorithm. I n the following we shall choose a fized universal KOLMOGOROV algorithm w and we ehall write K ( z Im) inetead ofK,(z Im). (2.11) Corollary. There exists a natural number e (which depends upon the fixed universal KOLMOGOROV algorithm w ) such that for every z in
x*.
K(. It (4)I e(4+C
(2.6)
9
Proof. Take 4:X' X PJ -+ X' to be the recursive function in Example (2.3), i.e. t#(z,rn)= 2, for every z in X ' and m in PV. We have already noticed that K 4 ( z lt(z)) = e(z), for every z in X'. In view of KOLMOGOROV's Theorem (2.9) we have:
K ( z I+))
5 K,(z
(!(z))+e
=
for iome natural number e and every z in X'.
!(Z)+C
,
310
Cdudc
Remark. Corollary (2.11) enables us to claim that in case p EH of natural numbers, exists a eequence
>2
there
,
n<m,In+e
such that
Indeed, we use the equality (Z
EX*
= ~ , K ( zIn)
2 n)
C
=
U{ZE X * I!(%)
,
= n,K(z In) = n + i )
id
and Corollaries (2.8) and (2.11) to fmd, for every n in {n,n+l, ...,n+c} such that number m, card{z
EX' le(z)
RV,
= n&(z In) c- mn}2 pn(p-2)/(p-l)(c+l)
a natural
.
(2.12) Corollary. There exists a natural number q (which depends upon the fmed universal KOLMOGOROV algorithm) such that for every z in X' there exists a natural number m such that
KbIm)Gl
-
(2-7)
Proof. Let f :RV + X * be a recursive bijection and let qj,:X' x A' + X* be the recursive function defined by (p,(z,rn) = f(rn). In view of Example (2.4) we have: Kd,(z ~ m =)
k,
if
f(m) =
2
,
otherwise.
By KOLMOGOROVL Theorem (2.9) the existence of a natural number g follows, such that for every z in X * there exists an m in IV (i.e. the unique m such that z = f (m)), such that
K(.
I 4 I K,,(z
Im)+cl = Q 0
311
Chapter 4
(2.18) Deflnitlon. (KOLMOGOROV [1966]) A string z in X*is called a (KOLMGOROV) random string provided
(2.14) Theorem. For every natural number n there exists a random string of length n.
Proof. In view of Corollary (2.8), with card{z
w
instead of 4, we have:
EX*I t ( %= ) n , K ( z In) 2 n }
> P”(P-2)/(P-l) 2 0
-
Remarks. a) The defmition of random strings depends upon the chosen universal KOLMOGOROV algorithm w
.
b) The random strings are those elements of X* of maximal complexity with respect to w . c) In Sections 4.3 and 4.4 we shall prove the adequacy of KOLMOGOROVL defmition of randomness, both from the statistical and the recursion-theoretic points of view. Notation. Denote by R A N D ( w ) , (or, shortly, dom strings.
RAND)the set of
all ran-
(2.16) .Theorem. The number of random strings of a fmed length increases “proportionally” to the number of elements in the alphabet X.
Proof. By Corollary (2.7), with w instead of 4, we have: card{z
EX*l t ( z ) = n,K(z
Comment. If p are random.
In) < n}*p”
< l/(p-l)
.
> 2, then more than half of the strings of a given length
(2.16) Deflnitlon.
a) Let m be a fmed natural. We say that the string z (KOLMOGOROV) m-random provided
EX* is
312
Cdudc
.
K ( Z l e ( 2 ) ) 2 +)-m
(2.9)
b) A string in X* M said to be (KOLMOGOROV)ueymptotic random provided it is rn-random, for some natural number m. Random strings are precisely the &random atrings. Notation. Denote by RAND,(w), (or, shortly, RAND,) the set of all m-random atrings. (2.17) Theorem. For all natural numbers n and rn auch that n there exists an m-random string of length n.
Proof. In view of Corollary (2.8), with
w
> m,
instead of $, we have:
card{z E X * lt'(z) = n&(z In) 2 n-m}
> pn(l-p-/(p-l))
20 . 0
Comment. The proofs of Theorems (2.14) and (2.17), which rely on the proof of Corollary (2.8), are non-constructive. In Section 4.4 we shall prove that there are no (uniform) constructive proofs for these existential theorems. Actually, a bit stronger version of Theorem (2.15) can be stated: (2.18) Theorem. For every natural number rn m-random.
2 1, almost all strings are
Proof. Again, by Corollary (2.8) we have: card(z
EX*lt(z) = n&(z
In) >_ n-m}/p"
> 1-p-/(p-l)
.
Remark. (DAVIS [1978]) Take p = 2, a 1 = 0, a2 = 1, and m = 10. Then, more than 99.8% of all strings of length greater than n-10 are m-random.
313
Chapter 4
4.8.
MABTIN-LOF TESTS
In this section we study the statbtieal propertier of KOLMOGOROV’s (asymptotic) random strings. We prove that KOLMOGOROV’s (ssymptotic) random strings poaaew, in a sense, all poi+ sible properties of stochasticity. (8.1) Example. (MARTIN-LOF [1966a], [1966b]) Consider the binary case, i.e. p = 2, a1 = 0, a2 = 1. h u m e that we hare a test of randomness for binary strings which rejects relative frequencies of ones differing too much from the expected value 1/2. In other worda, if z = z122...z2,is n
a binary string and an =
czi,then our test of randomness rejects the
ill
hypothesis when
bta/n-lFI
9
is too large. Since we are interested in the magnitude order of the significance level, we may reatrict our attention to a discrete set of critical values (Sicherheitawahrscheinlichkeit (MARTIN-LOF [1966a], p.3.9)) c = 2-’,2-2
,..’,2- ,....
Consequently, the above MARTIN-LOF test rejects the hypothesis of randomness on the level E = 2- provided l8Jn-lF
where f :RV x RV tione:
+
I 2 f(m,n)
(34
9
N hi a function satisfying the following two condk
The number of strings of length n for which the the inequality (3.1) holda is less than 2”-’
.
One cannot diminish f without violating condition (3.2).
(3.2)
(3.3) 0
The above example euggesta a general notion of randomnetm teat. In order to get this defmition we establish a useful notation: For every set V c X*x (RV;{O}) and for every natural number m 2 1, denote by V, the set {z EX I(z,m) E V), that is the inverse image of the m t h projection.
314
Caludc
(MARTIN-LOF [1966b],CALUDE and CHITESCU [lSSZa])A non-empty r.e. set V C X* X ( N - ( 0 ) )is called a MARTINLOF test (M-L t e s t ) if it possesees the following two properties: For all n and m in dv, m 2 1, we have: (8.2) Deitdtlon.
v,,, c v m card{z E X * l!(z) = n , EV,} ~
(3.4)
9
< p”“/(p-1)
.
(3.5)
We agree upon the fact that the empty set in a M-L test.
Comments. (Motivation of Defmition (3.2)) a) The choice of a strict inequality in condition (3.5) is motivated by Example (3.3), which in turn relies on the strict inequality in Lemma (2.7). b) Each test of randomness must be capable of being effectively specifled before the running experiment; it follows that such a teat must be a r.e. set (this is the weakest constructive restriction). c) Condition (3.4) can be regarded M an “efficiency” requirement.
Remark. For every M-L test V and for every t(z)>m?l (8.8)
Example.
d:X*x Bv * X * be
(2,“)
.
in V one has
(3.6)
(CALUDE a p.r.
and CHITESCU [1982a]) Let function. We claim that the set V(4) defmed
~ ( d =) {(z,m) Iz EX*,^ E N , m 2 1, and K,(z (!
(2))
< 1 (2)-m} ,
(3.7)
is a M-L test.
First of ail we see that V(+)is a r.e. set. Let UE consider a (primirecursive enumeration of X*x RV given by the bijection e. :N X* x N. At etep i let e ( i ) = (2,m). Check if the finite set
tive)
A = (1 E X * l W < W - m , d ( u , W ) = 21 , is empty. Thin can be done by dovetailing. Let the algorithm which computes the p.r. function 4 run one step for all inputs (g,t(z)), with t ( y ) < !(z)-m. If for some such y we have #(y,P(z)) = 2, then the set A is non-empty. If not, let the algorithm run the second etep for all inputs M before. Again, if for uome y we have d(y,t(z)) = 2 , then the set A is non-empty. If not, p m to the next step, a.a.0. If A in non-empty, accept the pair (z,m). The set V(4)C O M M ~ U of all accepted pairs (z,m). For z in (V(+)),+,,we have K,(z lt(z))< 1(z)-m-l < l(z)-rn,
315
Chapter 4
thus proving that z is in (V($)),,,. Fmally, by Lemma (2.7), we have:
E X *le(z) = n
(8.4) Example. Let z be in t ( z ) > m 2 1. Then the set
, E~ (V(4)),,,)
X* and
m
in N. h u m e that
H(z,m) = {(Z,l),(Z,2),'..,( z t m ) )
,
(3.8)
is a M-L test. The only condition in Defmition (3.2) which must be checked ia (3.5). We have:
card{y E X * l l ( y ) = n , ( z , q ) . E H ( z , m ) )
=i
1 , i f n = t ( z ) , and 1 0 , otherwise,
< P"'/(P-1) because l ( z )> m 2 q (i.e.
q
5m,
9
p"'/(p-l)
> 1). 0
(8.6) Example. Let z be in X* and m in N. Assume that [(z)> m 2 1. Then the set i ( ( z , m )=
{(w) lo EX*,%E N , l I 12 I m,y 3 z} ,
(3.9)
is a M-L teat. (Recall that the relation y 2 z means that y = zz, for some z in Clearly, F(z,m) ia a r.e. set (in fact,a primitive recursive set). TO prove condition (3.4), let (y,n+l) be in H(z,m), i.e. 2 5 n + l 5 m and y> z;it follows that 1 5 n 5 m, and y 2 z,which shows that (g,n) is in H ( z ,m 1. Finally, let n and q be in RV such that q 2 1. We have:
x*.)
card{y E X * l q Y ) = n,(u,q) E@z,m))
318
Cdudc
Remarks. Let (z,m) be in are equivalent: a)
i) [ ( z )
X* x ( N - ( 0 , ) .
Then the following statements
> m 2 1,
ii) H_(z,m)is
a M-L test, iii) H(z,m) is a M-L test.
From Exampleel3.4) and (3.5) we know that i) implies both ii) and iii). If H ( z , m ) (or, H ( z , m ) )is a M-L test, then 1 < p'(')-/(p-l), for every 1 5 q <_ rn, i.e. P(z) > rn 2 1. b) For all z in
X*and
m in
Ehm)=
N-{O} we have:
u U
H(y,m)
3 '
We finish the presentation of the examples of M-L tests with a nonrecursive M-L test. (8.6) Example. Take A c {a,}* = {X,al,a~,...,a; ,...} a r.e. but not recursive set (see Example (2.5.16)). Then V = (A-{X,al}) X {I} is a nonrecursive M-L test. (The condition (3.5) is fulfilled because the left member of the inequality is always less than or equal to 1.) 0
In order to obtain the main enumeration theorem we shall give the following lemma.
317
Chapter 4
(8.7) Lemma. There exiets a p.r. function
f:(N-{o})2 ax*x
nv ,
with the following two properties: For all natural numbers i and j such that j(i,j)# oq we have f ( i , k ) # oq for all k
Aset A
c X'
.
5j
(3.10)
x N is r.e.
iff
(3.11)
A = { j ( i , j )lj=1,2 ,...}-{.0},for some i
21
.
Proof. Let (fp))im-j0) be an acceptable gEidelisation, where + / ' ) : I V - { O } a X x N. We defrne the p.r. function
f:(RV-{o})2 by the formula:
I,
ax' x nv ,
&!io(i,j) 1 if 4E!ie(i,k) for all k 5 j f( i d=
where
4gi0is an universal p.r.
+ 04 ,
otherwise,
function for
(+/'))i E~-{o).
Let us notice that among the p.r. functions h i : N - { O } A X *X RV, i EN-{O}, hi(j) = f ( i , j ) , for all j in RV-{0}, we can fmd all recursive functions as well as the empty function, thus ending the proof. 0 (8.8) Theorem.
(MARTIN-LOF [1966b], CALUDE and CHITESCU [1982a]) The set of all M-L testa is r.e. More precisely, there elrists a r.e. set T C Bv x X*X N auch that for every V C X*x Bv the following equivalence holds: V is a M-L test iff V = {( z, k) ] ( i , z , m )E T), for some i in N.
Proof. Throughout the proof we shall constantly use a fmed pa. function given by Lemma (3.7). Thia allows us to write 4 instead of {f (i ,j)li=1,2,...}-{4. We display a procedure of ge:eration, baaed upon Lemma (3.7), which constructs all r.e. subsets of X x IN and modfier only those sets which are not M-L tests (more exactly, makes empty all r.e. eta which are not M-L tests). Roeedute of constructing the eeetion of T, i.e.,
318
Cdudc
z = {(z,m)I(i,m,z) E T), for some f i z e d natural number i 2 1: 1. Put z = 0. 2. P u t j = 1.
If f(i,j) = + then continue indefmitely. 4. Compute f(i,j)= (zj,mj). 5. If l(zj) <_ mi, then put Ti = 0 and STOP. 6. P u t Ti = Ti U H(~j,mj). = 0 and STOP. 7. If Ti is not a M-L test, then put 3.
8. P u t j = j+l and go to step 3.
Comments. a) The test in step 3 is not recursive. But, in case f(i,j) = oq then the algorithm computing f will never atop, i.e. it will continue indefmitely, remains unchanged. If f ( i , j ) # cq then the algorithm computing and f will eventually give aa output the pair (zj,mj). b) In view of the Remark a) following Example (3.5), the step 5 can be considered a preliminary rejection, because if H(z,m)is included in aome M-L test, then H(z,rn) is a M-L teat itself. c ) An concerns step 7, it is obvious that the problem of deciding if for all natural numbers j , m1,m2,...,mi, and for all strings z1,z2,...,2,’ the fmite set
i-1
M-L test,
is recursive. Indeed, condition (3.4) is obviously fulfilled for and condition (3.5) must be checked only for 1 5 rn 5 max(m1,m2 mi) and z in the set {z1,z2,...,2 , ) . The test in step 7 ia essential, because otherwise we can generate sets Ti which are not M-L tests. This fact relies on the possibility that a finite union of M-L tests of the form H(z,m) need not be a M-L test. See, in this respect, Example (3.9) and the following Remark (CALUDE and CHITESCU [1982a]).
is a
H,
,...,
d) The procedure either stops after a fmite number of steps or conthUe6 indefmitely. It stops only when the reetion G is empty; but, it may ia fmite. well continue indefmitely even when All that remains t o be proved can be divided into two steps: 1) For every natural number i , the set Ti is a M-L test, and 2) For every natural number i , if 4. is a M-L teat, then Ti = A,. (Recall that A, = {f(i,j) I j=1,2 }-{a}.)
,...
319
Chapter 4
1) The interesting case is that one when the procedure continues indefinitely (see the procedure and Comment d) above). Obviously, q is r.e. If (z,m+l) is in then ( z , m + l ) is in some H(zj,mj), therefore (2,m) is in H(Zj,rnj) c
z, z.
For the sake of a contradiction suppose the existence of the natural numbera m and n, such that card{z EX* l t ( z ) = A , ( z , ~ E) q} 2 p""/(p-l) But,
q
t
5 cq
= UH(zj,mj), for some 1 5 t
.
where f(i,j)= (zjymj).
j-1
Hence there exist distinct strings ~,~,z,~,...,zof j~ length n, such that jl < j2 <...< j,, r 2 p""/(p-l), and m 5 min(mjl,mja mjr). In view of step 7 the set
,...,
jr
H
= IJH(zj,mj)
v
j-1
is a M-L test, consequently,
.
= n,(z,m) EH)< #"'/(p-l) ciud{z EX* It(%)
Since the set {z EX* le(z) = n,(z,m) EH} contains at least r elements it follows a contradiction. (i.e. zjl,zjs, zjr)and r 2 p""/(p-l),
...,
2) Notice that 4. = 0 implies stops). Aasume 4. z 0.
We prove that
4. c Ti, i.e.
q
=
0 (though the procedure
(zj,mj) E q,for every j
never
2 1 such that
f(i,j)= (zj,mj)*
i) For k=1,2 ,...,j , we have
(because the test in step 5 ie passed). Indeed, it is Been that zk
EB
It (2) = t (zh),(Z,mh)E Ai)
=
{z E X *
1
< card3 < p
9
therefore because A, is a M-Ltest. ii) For every natural number t
(sk 1-k
AP-1)
9
2 j , the set
t
H = IJH(zi,mi)
9
i-1
is a
M-L test (step
7 is paesed). Indeed, it is Been that all the fmite sets
...a( zt,m,) are included in
H(zl,m1),H(z2,m2),
the
M-L t e n t 4.. Their
320
Cdudc
union H is also included in the M-L test tional propert7: (z,m+l) E H for every m
4. and
haa the following addi-
* (2,m)EH ,
2 1. Consequently, H is also a M-L test.
iii) Following i) and ii) we conclude that H(zj,mj) c Ti and no # 0.The reader will realire that we “rerorisation” may occur, i.e. have apparently proved more in order to avoid a possible “seroriation” given by steps 5 or 7. Finally we prove that Ti c A,. Let (2,”) be in $; there exists j 2 1 such that z = z,,m 5 mi, and f ( i , j ) = (zj,mj). Since A, is a M-L test and (zj,mj) belongs t o 4. it follows that (z,m) belongs to A, too. 0
(8.9) Example. A fmite union of M-L tests of type H(z,m) need not be a M-L test.
For instance, take p = 2, a 1 = 0, o2 = 1, z1 = 00, z2 = 01, and 2 3 = 10. Then H = H ( z , , l ) u H(z2,1) u H(z,,l) ia not a M-L test (it violates condition (3.5)). 0
Remark. Assume, for the sake of contradiction, that the procedure in the proof of Theorem (3.8) would contain only the steps 1,2,3,4,5,6,!, and p = 2, a, = 0, a2 = 1. Then take the p.r.. function h:{1,2,3} + X x RV defmed by h ( j ) = z j , j = 1,2,3, where the 2’s are those of Example (3.9). For a fmed f M in Lemma (3.7) there exists some natural number i such that h ( j ) = f ( i , j ) ,j = 1,2,3. The procedure (without step 7) will produce the non M-L test which is exactly the set H in Example (3.9). The next theorem is analoguous to KOLMOGOROV’s Theorem (2.9) expressed in terms of M-L tests. (8.10) Theorem. (MARTIN-LOF [1966b]) There exists a M-L test U with the following universality property: For every M-L test V we can effectively fmd e in PV (depending upon U and V) such that
vm, c u m for every natural number m 2 1.
9
(3.12)
321
Chapter 4
Proof. Let T be the r.e. set constructed in Theorem (3.8). Defme
u = {(Z,rn)
12
d , m EN-{0},
(i,z,rn+i)
E T,for some i > 0)
.
Clearly, V is r.e. We prove that it ie in fact a M-2, test. Firstly, take some (z,rn+l)in U and prove that (z,m) is a h in U. Our hypothesis is therefore that (z,m+i+l) ie in Ti. Hence (z,m+i) is in the M-L test q,i.e. (z,m) is in U. Secondly, for all natural numbers n and m with n 2 1 we have: card{z EX4It(=)=
E Urn}
A,Z
EX*lt(z) = n, there exiata an i such that (z,m+i) E K }
= card{z
< gp"++)/(p-l) it1
= p""/(p-1)2
SP*-/(P--l)
*
Finally, let V be an arbitrary M-L test. In view of Theorem (3.8) we find some natural number i such that V = {(z,m) 1% EX*,m E N-{0}, (i,z,m) E 2"). Consequently,
v,,
=
{z E X *I(i,z,n+i) E TI
c {z EX*I(z,m) E U } =
u,
.
The constant e is therefore equal to i,and this ends the proof. 0
The previous theorem enables us to give:
(S.11) Definition. A M-L test U satisfying condition (3.12) in Theorem (3.10) will be called an uniuereal M-L tcet. Comment. An universal M-L test possesses the following intuitive prperty: if a string is random with respect to that test, then it is random with respect to every conceivable test, neglecting a change in the level of significance.
322
Caludc
(8.12) Lemma. A M-Ltest V is finite iff the section V, is fmite.
Proof. We must prove that in case Vl is fmite, V is itself fmite. Assume V,# 0 (in the opposite case V itself is empty) and put
n = max(t(z) 12 E Vl). Take a natural number m 2 n. Then V , must be empty, because otherwise every z in V, would have e(z) > m (notice that V, c VJ On the other hand
V1 IJ Vz
>see>
Vn-1
and
(8.1s) Theorem. (CALUDE and CHITESCU [1982a)) Every universal M-L test U has all its sections U, infmite.
Proof. We shall exhibit an example of a W, infinite. Defme
w = {(%,ma)
12
EX.,m
M-L test W having all sections
2 1,z 3 uY+l} .
a) The set W is a M-L test. Indeed, it is obvious that W is recurm 2 1, Wm+l c W, sive, hence r.e. For every natural = {z EX*Iz 2 a;""}. To check the last property, we fu the natural numbers 1~ > m and we compute: card{z
EX*It (z)= n,z E W,}
= card{y E X * l t ( y ) = n-m-1)
- pn--l
< Pn-/(P-l)
*
b) Obviously, for every natural m
2
1, the section W, is infmite.
c) According to Theorem (3.10), there exists a natural number e such that W,,, C U,, for every m 2 1. Since W,+c is infmite, it follows that Urnis infmite. 0
We introduce another measure of complexity: the critical level induced by a M-Ltest.
323
Chapter 4
(8.14) Definition. (MARTIN-LOF [1966b]) ZRe critical level induced by a M-L teet V is the function
rnV:X*4v
,
given by max(m
2 1 Iz EV,), i f z E V , , otherwise.
Remarks. a) As in statistical practice, the critical level is the smallest level of significance (i.e., p") on which the randomness hypothesis is rejected. b) We have 0 5 mv(z) 5 t (z), for every z in X '. If z # X, then m v ( 4 < e (4. (8.16) Theorem. Let U be a M-L test. Then U ia an universal M-L test iff for every M-L test V there exists a natural number c (depending upon U and V) such that: (3.13)
Proof. Let U be 'an universal M-L test. We prove that the constant e in (3.13) can be taken to be the same as that one in Theorem (3.10), relation (3.12).
The result ia obvious in caae mdz) = 0. Consequently, aaaume mdz) #O, i.e. z E V,,,+). We must check the inequality (3.13) only in caae mv(z)-e
> 0.
In view of Theorem (3.10) we have: Vmy(r)= Vm~(s)-e+c C u m ~ ( r ) - e
Consequently, z ia in Um,,+]-c,i.e. mdz)-e
5 mu(.).
Suppose now that U is a M-L test satisfying condition (3.13). We prove that V,, C U,, for all rn 2 1. h u m e that for some natural rn 2 1, Vm+c# 0. Let z be in Vm+c. In view of Defmition (3.14), rnV(z)2 m+e, or equivalently, my(z)-e 2 m. According to (3.13) we have: mu(%)2 my(+
which proves that mv(z) 2 rn
2m
9
2 1, i.e. z E U,,,dsiC U,. a
In the follow'ng
we
shall ehoore a fized universal M-L test U and
324
Cdudc
rhell write m inatcad of my. The following result establishes an aaymptotic relation between KOLMOGOROV’a compkxity K (induced by a fued universal KOLMOGOROV algorithm) and the critical level m (associated to an univehal MARTIN-LOF test). we
(MARTIN-LOF[1966b], CALUDE and [1982a]) There exists a natural number q such that
(8.16) Theorem.
I5
le(Z)-K(z l+))--m(z)
CHITESCU (3.14)
9
for all z in x*.
Proof. Firstly we prove the existence of a natural number c that
e (45 K(.
It (Z))+m(z)+c
2
1 such
(3.15)
1
for all z in x*. For this inequality we shall use the M-L test (3.3), with w instead of 4.
V(4)given in Example
Let ua notice that my(,,(.)
Assume
rnq,,)(z)= 0.
that
.
= 0 iff t ( z ) - K ( 2 le(z)) 5 1
Therefore
((2)
(3.16)
5 K ( z lt(z))+l 5
K ( 2 l e ( t ) ) + m(z)+l. Now suppose that rnqU1(z)# 0, i.e. t ( z ) - K ( z It! (2)) > 1. According to defmition, r n ~ ( , ) ( ~=) max(rn =
2 1 ( K ( z (t(2))< e(z)-m)
P(z)-K(z ( e ( Z ) ) - l
,
(3.17)
(see a h the Remark at the end of the proof). Theorem (3.15) furnishes a natural c’ such that rn for all z in X I . We take e = e’+l, because in case mq,$))’
(2)
5 rn(z)+c’,
# 0 one
has
.
e ( z ) - K ( z le (2))-1 5 m(z)+e’
Secondly we prove the existence of another natural number, aay d , such that
e (42 K(.
It (z))+m(z)-d
7
(3.18)
for all z in x*. The universal M-L k r t U,being infmite by Theorem (3.13), can be written U = g(aV-{O}), where
Chapter 4
g:N-(0)
325
-+x*x Hv ,
ie an injective recursive function (see Theorem (2.5.18)). Using the recursive function g we shall construct a p.r. function d:X*X N S , X * such that (3.19)
for all 2 in
x*.
We construct the p.r. function 4 by cases. First we consider the set A = { ( ~ , t ( g ) )IV EX*}and we put d(g,t(y)) = y, for every y in X*. Clearly, the “graph” { ( t , d ( t ) )It E A} ie recursive. Now we construct the second “part” of 4. Consider the range of g and partition it according to the following equivalence relation: The equivalence class of g ( i ) = (zi,mi) contains a t most h elements, where because U is a M-L test. Moreover,
We have therefore a sequence (Ei)i20of equivalence classes. Let a fued Ei contain r elements. We can order lexicographically the fust r strings of length .f (zi)-mi, obtaining the ordered set Ci. Here Ei is the cl&s of (zi,mi) and the lexicographical order on X* is induced by a1
< a1 <...< a,.
the sets Bi = {(g,t(zi)) Ig ECi},
and we put
B = U B i . Notice that for distinct i and j we have Bi
n Bj= (3, and
We construct 00
ill
AnB=@. The domain of 4 will be A U B. The p.r. function 4 will be completely determined by the following procedure (defmition of 4 on B). Let g ( l ) = (zl,ml). Then put and notice that t(zl)-ml 2 1 because (zl,ml) is in the M-L test U. Clearly, (a~(’l)-l,t (ZJ) is the fust element in B1,if El is the equivalence ClaM of (zl,ml). Let g(2) = (z2,m2). There are two possibilities: either (t(z2),mz)# (t(zl),ml), and in this case put
326
Calude
or, (t (z2),m2)=
( t (zl),ml),and in this case put d ( ay Z ) - x - 1
4 ( z 2 ) )=
22
In the rust case ( a 1'(sx)-',t(z2)) is the fust element in B2, if E2 is the '(aJ-+a2,e (z2)) is the equivalence class of (z2,mZ). In the second case, (aI second element in El. Notice that the last elements do not exist since L'(z2)-m2 2 1. The procedure continues: g(3) = (zs,m3). If we have two subcases:
(e (zs),m3)= (e (zz),ml)
i) If (t'(z2),m2)= (t(zl),ml),then one aet f(.))-ms-l
in case p
in
aS,e(ZS))
= 2s
9
2 3, or w-1-1
case
p = 2. The elements (a1 a d (2s)) and (a;(=a)-a-2 a 2 a , e (z3))are respectively, the third element of E l , or the fvst element in B2, according to p > 2 or p = 2. We must check that we have
"enough" elements to carry out our construction. Indeed, if p 2 3, the above computation.showa that t'(z3)-m3 2 1. If p = 2 we use the condition (3.5) and we have: 3 5 card{z EX*It (2) = e (zs),(z,m3)E V ) < 2 W-I 9 hence e(z3)-m3 2 2.
ii) If (t(z2),rn2)# (t(zJ,mJ, then one set W-ma-1
a2re ( 2 3 ) ) =
zs
*
Notice that ( a 1'('""'-'a2,e (zs))is the second element in B2. In case ( l (z3),m3)# ( l (z2),m2),three subcases appear: a)
If (P(z2),m2)= (!(z1),ml), then one set
+(ayl)-? ,e(z3)) =
23
where (al'(as)-tns,t(zs))is the fist element in
9
B2,if E2 is the clase of
(239m3).
b) If (f(z,),m,) # set
(f(Zl),ml)
and (e(zl),ml) =
(e ( 2 s ) m s ) ,
then one
327
Chapter 4
4(a:(~t)-m,--l
where (a1W - t - 1 c)
If
a2,t (23))
= 2s
.I,t(ZS))
I
is the second element in B,.
(e(z2),m2) f (e(Zl),ml) and ( t ( Z l ) , r n l )
f (t(zs),rns), then one
set
d(=;(=t)** ,%))
= 23
9
where (a1“‘””8,t (zs))is the fist element in Bj. Notice that the set B has “enough” elements, hence the procedure is well-defmed. Clearly A and B are r.e. sets. Therefore, d is a p.r. function. We c l a i i that the above constructed p.r. function 4 satisfies the equality (3.19). Indeed, for a given z in X*two possibilities may occur: A) m(z) = 0. In thia case, for all natural numbers i 2 1 and rn 2 1, we have g ( i ) Z (z,rn), so +(z,t(z)) = z and no other possibility for obtaining z via 4 occurs. Consequently, K,(z It (2)) = t (2).
B) m(z) f 0. In thia case there exist the natural numbers i 2 1 and rn 2 1 such that g ( i ) = (zi,rni) = (z,rn). The string z = zi may be obtained in two ways via +: or
d ( ~ (.if) 8 = zi
9
with y in X*,t ( y ) = t(zi)-rni, and g ( i ) = (z,rni). Hence:
K,(z It (2)) = &([
(Z)-mi
lo(;)
=
= min (t(z)-m I(z,rn)
(Zrmi))
E V)
= t (2)-max(rn
_> 1 I(z,rn) E U)
= t(z)-m(z)
.
According to Theorem (2.9) there exists a natural d such that:
K ( z It (2))
< K+(z It (z))+d
= t (z)-m(z)+d
.
From the inequalities (3.15) and (3.18) we conclude:
- d 5 ! ( z ) - K ( z lt(z))-rn(z)
5e
.
Taking q = max(e,d) we obtain the required asymptotic evaluation (3.14). 0
328
Cdudc
Remarkm. a) The constant g appearing in the inequality (3.14) depends upon w and U. b) Notice that the equality (3.17) used in the proof of Theorem (3.16) is valid only in c u e mqw)(z)> 0. We are in a position to specify the statistical properties of the KOLMOGOROV random strings. We begin by proving that the M-L test BBM)ciated to an universal KOLMOGOROV algorithm ie universal.
(8.17) Theorem. (CALUDE and CHITESCU [1984]) Let w : X x N A X * be an universal KOLMOGOROV algorithm. Then V ( w )i an universal M-Ltest.
Proof. Recall that putting w instead of # in (3.7) we get the M-L test ~ ( w=) {(z,m) Iz E X*,m E N , m and K , ( z [!(Z))
2 1,
.
< !(z)-m}
In view of Theorem (3.15) it is sufficient to prove that V ( w ) satisfies the relation (3.13). To this aim we use an universal M-L test U provided by Theorem (3.10): For every M-L test V there elcists a natural e such that
mvk) tor every z in
I mu(z)+e
(3.20)
t
x*.
Using Theorem (3.16) for the pair (w ,U)we get a natural number q such that muk)
for every z in
IW - K &
lW)+q
7
(3.21)
x*.
Now let V be an arbitrary M-L test and set t = q+c+l, where c is obtained from (3.20) and g is the fmed constant satisfying (3.21). We analyse two cases, according to mqw)(z)= 0 or m+)(z) > 0. If my,)(z) = 0,then by (3.16) we have:
e (.)-&
(2
It (4) I 1
In view of (3.20), (3.21)and (3.22) we have:
md.1
5 mu(z)+e 5W-K&
lW)+P+C
(3.22)
329
Chapter 4
< q+c+l = t = mV(&)+f
If m+,(z)
*
> 0, then by (3.17) we have: mV(w,(z) =
W - K & lW)--l
*
(3.23)
Using again (3.20), (3.21) and (3.23) we derive: mv(4
I mv(z)+c IW - K , ( z
I W ) + Q + C
= my,)(z)+1+q+c = mV(w)(z)+t
9
which concludes the proof. 0
(8.18) w
Corollary.
Fix an universal KOLMOGOROV algorithm
:X x IV 4X*.Then every random string (associated to
w ) with-
stands the universal M-L test V ( w).
Proof. Since z is random it follows that Kw(z
I+))
2 “4 > w - 1
f
which proves that (z,l)!$ V(w).
Comment. Corollary (3.18) shows that the KOLMOGOROV random strings possess almost all conceivable statistical properties of randomness (i.e. they withstand an universal M-L test).
(8.19) Corollary. Every asymptotic random string withstands the universal M-L test V ( w ) .
Proof. For some natural number m 4 [(z) we have
w. I W ) L w - - m
consequently (z,m) 4 V(u).
I
330
Cdudc
(8.20) Corollary. To every asymptotic random string z and every M-L teat V we can associate a natural number q such that
(ztm+q) 4
for all naturals m
v
9
2 1.
Proof. In view of Theorem (3.17), there exists a natural c (depending for every natural m 2 1. On upon w and V) such that Vn+c C (V(W))=, the other hand, ( z , d ) 4 V(W), for some natural d. Hence z ( V ( w ) ) d ,i.e. z Vm+(d+e), for every natural m 2 1. The constant q = d + c works. 0
Remark. When z is random, q can be taken to be c . We
close
this section
by
stressing
that
KOLMOGOROV’s
complezity-theoretic dc finition of (finite) randomness is compatible with almost all statietieal requirements.
4.4. UNDECIDABILITY THEOREMS
We pursue our analysis of the relevance of KOLMOGOROV’s complexity-theoretic definition of (fmite) randomness by proving that the (asymptotic) random strings are, in a strong sense, non-conatructable. This result reinforces the adequacy of KOLMOGOROV’s approach. We begin with aome preliminary results. (4.1) Theorem. Let w :X* x IV A X * be an universal KOLMOGOROV algorithm and let a:RV -+ nV be a (non-neceesarily recursive) function
such that lim a(.) n -3c
=
03.
Then every partial function f K , ( f ( n ) In)
:IV * X * satisfying the condition
2 a(*) and n E dom(f)
7
(4.1 1
for an infmity of naturals n, hae no p.r. extension. In particular f itself ie not a p.r. function.
331
Chapter 4
Proof. For the sake of a contradiction, w u m e the existence of a p.r. function F:BV S,X* which extends f. We construct the audliary p.r. function 4F:X* x
Ax* in X* and
given by 4F(z,n) = F(n), for all z n in dom(F). Notice that from condition (4.1) it follows that the domain of f is infmite, hence, the domain of F is abo infmite. In view of Example (2.4) (with F instead of f) we have:
K,p(.)
).I
=0
(4.2)
9
for all n in dom(F). Furthermore, if n is in dom(f), then
because F(n) = f(n).
KOLMOGOROV’s Theorem (2.9) furnishes a natural number e (depending upon w and F)such that
for all n in dom(f). ( . ) > e 0.c. From the divergence of function a we conclude that a We use condition (4.1): ultimately we can fmd a natural number n in dom(f) such that
K u ( f ( 411. 2 4.)
>e
-
(4.5)
The relations (4.4) and (4.5) are contradictory, thus ending the proof. 0
Remark. a ( . )
The recursive functions a(.) = n, a(.) = n%, and = Pog2n] satisfy the condition of divergence used in Theorem (4.1).
(4.2) Lemma. Let A C X* be an infmite r.e. set. Then there exists a p.r. function F:N S, X * having the following properties:
’
The domain of F is infmite.
(44
The range of F is contained in A.
(4.7)
For every n in dom(F), t (F(n)) = n.
(4.8)
Furthermore, if for all z and y in A, z # y impliss t ( z ) # t ( p ) , then:
332
Cdude
The function F can be taken to be injective.
(4.9)
The range of F is exactly A.
(4.10)
Proof. From the recursive enumerability of A it follows that A is the range of some injective recursive function f :N+ X*.The p.r. function F:RV %X* will be given by the following procedure: 1. P u t
a
= 0.
2. Put F(!(f(i))) = f ( i ) .
3. Put i
=
i+l.
4. If t ( f ( i ) ) = t(f(j)),for some j
< i , then go to step 3.
5. G o t o s t e p 2.
Property (4.6) follows from the infinity of the set A and the fact that step 2 in the procedure which computes F is reached infinitely many times. From the construction of F we easily conclude that (4.7) and (4.8) hold. Under the assumption that for every natural number n there is a t most one string of length n, the test in step 4 is always overpaaeed. Consequently, for all naturals n and m in dom(F) such that F ( n ) = F(rn), there exist two other naturals i and j satisfying the equalities
flil F(m) = F ( e ( f ( j ) ) )= f ( i ) F(n) = F ( W i ) ) ) =
I I
(see the procedure defming F). Hence n =
e(f(;)) = e(f(j))= m
which proves (4.9). We fmish the proof with the equality F(t(f(i)))= f ( i )which shows that range(F) = range(f) = A. 0
ax*
(4.S) Theorem. Let w : X * x RV be an universal KOLMOGOROV algorithm and let a:BV --+ BV be a (non-necesearily recursive) function such that lim a(.) = oa n
-00
For a set A C
X*we consider the following properties: The eet A is infmite.
(4.11)
333
Chapter 4
For almost all z in A , K , ( z It(.))
2 a(l(z)) .
For all z and y in A, if [(z) = l ( y ) , then z = 9
For infdtely many z in A,
K, (z it (2)) 2 a(t (2))
(4.12)
. .
(4.13) (4.14)
If A has the propertiee ((4.11) and (4.12)) or ((4.13) and (4.14)), then A is not r.e.
Proof. Suppose that A f u l f i i (4.11) and (4.12). For the sake of a contradiction, assume that A is r.e. In view of Lemma (4.2) there exists a p.r. having an infmite domain and range(F) C A. For function F:RV ax*, almost all n E dom(F) we have: t (F(n)) = n and K,(F(n) ( t(F(n)))= K,(F(n) In) 2 a ( n ) , because F(n) E A. This contradicts Theorem (4.1). Suppose now that fulzills A (4.13) and (4.14) and asoume by rcduetio ad obeurdum, that A is r.e. By Lemma (4.2) there exists an injective p.r. function F:N a x *such that range(F) = A and for every n in dom(F),
t ( F ( n ) )= n. Then there exists an infmite subset Y of dom(F) such that for every n in Y we have: F(n) € A , t'(F(n)) = n and K, (F(n) It (F(n))) = K, (F(n) in) 2 a(n), thus contradicting Theorem (4.1).
0
Remark. Theorem (4.3) is consistent! In fact, conditions (4.11) and (4.12) are satisfied by the identity function a(.) = n and the set of all raidom strings (see Theorem (2.14)). Again let a(.) = n and let A be a set of strings satisfying (4.13) and containing an infrnite set of random strings; we have a model for (4.13) and (4.14). For the rest of this section fm an universal KOLMOGOROV algo-
rithm w ; K = K,.
(4.4) Corollary. For every natural number m
2 0, RAND,
is immune.
( . ) = n A m . Let A be an Proof. Let a : N + N be the function a infmite set of m-random strings. Obviously, lim a(.) = 00; since A fuln-m
f i conditions (4.11) and (4.12) in Theorem (4.3) we conclude that RAND, is immune. R
334
Cdudc
(4.6) Corollary. (ZVONKIN and LEVIN [1970]; CALUDE and CHITESCU [1982b]) The set RAND is immune.
Proof. Set m
= 0 in Corollary (4.4). 0
(4.6) Corollary. The set X*-RAND, ia not recursive, for every natural number m . In particular, XI-RAND is not recursive.
Proof. Directly, from Corollary (4.4) and Theorem (2.5.7). 0
-
(4.7) Corollary. Let m be a natural number. Then there ia no recursive function f :N X* such that for every natural n we have t ( f ( n ) ) = n and K(f ( n ) In) 2 n A m .
Proof. Take A
= range( f ). Since A satisfies conditions (4.13) and (4.14) in Theorem (4.3), it follows that A is not r.e. We have arrived at a cont r adic t ion. 0
Remsrks. a) Corollary (4.7) shows that the “m-random strings are not constructable”, in fact, strongly non-constructable, by Corollary (4.4). Tireee reeults point out that, in a strong .sense, there i s n o “algorithmic rule” for generating m-random strings. In other worde, there are no afgorithmie t o o h for uniformly recognizing m-random stringe, thus reinforcing the adequacy of KOLMOGOROV’s defmition of fmite randomness. b) Corollary (4.7) stresses that the existence of m-random strings cannot be constructively proved. Hence, Theorems (2.14) and (2.17) cannot be proved in any constructive way. (4.8) Corollary.
(MARTIN-LOF(1966bl) The function
K:x*+w , defmed by
I?(=)
=
K ( z It(=))ia not recursive.
Proof. If I? were recursive, then one_ should fmd a recursive function which produces aiI 2 in X* such that K ( z ) _> t(z), i.e. the set of all random strings, thus contradicting Corollary (4.5). 0
Consider the set
335
Chapter 4
(4.9) Corollary. If for an infmity of natural numbers n one has
K(zlz2...z2,In) >_
n nrn
,
for some fmed m, then A is not r.e.
Proof. The set A satisfies conditions (4.13) and (4.14) in Theorem (4.3), with m(n) = A A m . Consequently, A is not r.e. 0
Comment. The non-constructable global property is not a decisive argument for a good defmition of randomness. For example, the set 1 A = {z E X * IK(z It (4)2 [logp(t (.) I> is clearly not r.e. (see Theorem (4.3)), but it must be clearly rejected as L candidate for the random strings set. We continue the analysis of the undecidable properties of (asymp totic) random strings with a characteriration of recursive M-Ltesta.
(4.10) Lemma. A M-L test V is recursive iff the critical level induced by V, my, is a recursive function.
Proo;.
Assume that my is recursive. The characteristic function of V, -+ {0,1} can be defmed by
xv:X x IV
1, ifrnv(z)2m>O, xv(z7m)= (0
, otherwise,
which proves that V is recursive. Conversely, suppose that xv is recursive. Then the critical level induced by Vcan be expressed by the formula
E WT Ixv(z,m) = 1) , if xv(zJ) otherwise. Hence, my is recursive.
=1
,
338
Cdudc
(4.11) Theorem. The universal M-L test V ( w )is not recursive.
Proof. Suppose, for the sake of a contradiction, that V ( w ) is recursive. In view of the equuality
X'-(V(w))1
= (2
E X * IK&
lt(Z))
2 q+1>
9
we deduce that the set of 1-random strings is recursive (for V(w) recursive implies the recursiveness of section (V(w))l). Thie contradicts Corollary (4.4).
(4.12) Corollary. a)
The critical level induced by a M-L test V ( w )ie not recursive.
b) Each universal KOLMOGOROV algorithm w has non-recursive graph; in particular, w is not recursive.
Proof. a) Directly from Lemma (4.10) and Theorem (4.11).
-
b) Assuming w has a recursive graph, the equivalence (2,m)
for some y in
E V(w)
w(ar,W)=z
,
X* with e ( ~<) e(z)-m, contradicta Theorem (4.11). 0
Following CHAITIN [1974], we consider a formal system to be a program for listing the set of theorem and the time at which a theorem is written out to be the length of its proof. We try to formaliie these ideas. Let P,(X*) be the set of all fmite subsets of X*. Consider a recursive function
F:X* x lN
-.,
P,(X*),
such that F ( z , n ) C F(z,n+l)
for all z in
X*,and
n
in
,
(4.15)
I?.
The recursive function F defines the rules of i n f e r e n c e of a class of formal systems. The value F(u,n) is the fmite (pomibly empty) set of the theorems that can be proved from the axioms coded by the string E in X * , by means of the proofs of length shorter than n. A recursive function F defming the inference rules of a formal eye tern can be described by the composition of a recursive function
337
Chapter 4
+:x*xBV-+x*, and a (primitive) recursive bijection
a:x*+ P,(X*). More precisely,
(4.12) Definition. (CHAITIN [1974]) The ordered pairwhere
F:X.x Hv
+
P,(X*),
ia a recursive function satisfying (4.15), and 8 is a string in X* (the codification of the set of axiom) is a f o r m a l eyetern.
Notice that a formal systemimplies both the choice of inference rules and the codification of axioms. (4.14) Definition. The set of all theorems deducible in the formal system is (4.16)
Recall that in the proof of Theorem (2.9) we have constructed an universal KOLMOGOROV algorithm w :X*X RV a x *by means of an universal p.r. function $mie:X* x (X*x nV) S,X* and three recursive functions T,f , and g. In what follows we shall make use of these functions. Fix a formal systemhaving the following two properties: The propositions of the form “ K ( z In)
> m”
can be coded as a recursive subset of X*
.
(4.17)
The formal systemia mund with respect to all propositions of the form “ K ( z In) > m”, i.e. if a proposition “K(zIn) > m” belongs to m ( F , 8 ) , then K ( z In) > m
.
(4.18)
338
Cduds
(4.16) Theorem. (CHAITIN [1974]) For every formal systemhaving properties (4.17) and (4.18), there exists a constant e (depending upon the system), such that for every proposition of the form “ K ( z In) > m”, that belongs to Z%(F,s),we have m < t?(a)+e.
Proof. We begin with the construction of a p.r. function 4:X* x RV ax*by the following procedure: 1. Read (z,n) in X* x hV. 2. If z # T ( z ) s ,for all z in X*, then 4(z,n) = OQ 3. P u t h = 0. 4. Generate F(8,h). 5. If F ( s , h ) contains the code of a proposition of the form “K(y In) > m”, with rn > t(s)+2t(T(z)), then +,n) = y, where y comes from the fmet generated proposition “ K ( vIn) > m”. STOP. 6. Put h = h + l , and go to step 4. It was already noticed that the representation z = T(z)a is unique, when it happens. Moreover, the test in step 2 is obviously recursive. In view of (4.17) and (4.18) it follows that the above procedure defmes a p.r. function. According to Theorem (2.9), we can fmd a constant q such that K(ar I.) for
5Q
Y In)+q
v
(u,n) in X* x N. Now let (z,n) be in X* x hV such that 2
= T(z)a
,
for some z in X* with t(T(z)) = 2(q+l). If for some etring y in X* we have d(z,n) = 4(T(z)8,n) = Y
,
then K(Y/ I
4 I K,(Y In)+q I e (W4+Q = e ( 8 ) i - t (T(Z))+q = q8)+2(q+i)+q
= e(4+3q+2
.
In view of (4.8) and step 5 in the procedure which computes 4, we
339
Chapter 4
deduce that there exists a natural m such that
We conclude that no such y exists, so
W(+,n)
=
03
,
for all n in RV. Take c = 3q+2. We have proved that every proposition of the form “K(y In) > m ” is a theorem of the formal systemonly when m
0
(4.16) Corollary. (GODEL) For every formal systemhaving the properties (4.17) and (4.18), there exista a true proposition of the form “ K ( z 11 (z))> t (2)” which is independent of (i.e., neither the proposition nor its negation is in Th(F,u)).
Proof. According to Theorem (2.14) we can fiid a random string z with t? ( 2 ) > l (s)+e, where c is the constant furnished by Theorem (4.15). The proposition “ K ( z lt?(z))> e(z)” is not a theorem of the formal system, for it violates the condition C (z)< e ( 5 ) + e . The negation of the proposition “ K ( z It? ( 2 ) ) > t (2)” cannot be a theorem of the formal system < F , 5 >, for it violates the soundness assumption (4.18). 0
Remsr ks. a) To realire the importance of Theorem (4.16) let us notice that there is no limitation to the form of axioms or rules of proof (presumably sound) for proving statements of the form “ K ( z In) > m”. We may include here all (constructive or non-constructive) methods of proof avsilable in usual mathematics. Theorem (4.15) puts down a severe limitation to the power of mathematics, since it indicates the existence of a constant, t ( e ) + e (depending upon the system) such that it is impossible to prove within the system that a string is more complex than 1 ( u ) + e . b) P ut p = 2, u1 = 0, a2 = 1. Theorem (4.15) asserts that we can find a constant e such that if a theorem constitutes more than t ( e ) + e bits of information, then it ia impossible to deduce it from the system (here
340
Cdadc
C ( 8 ) denotes the information contained in the axioms of the system).
c) GODEL [1931] pointed out that there are statements about natural numbers which can be neither proved nor disproved in the logical system Principia Mathernatica or in a i m i i systems. Corollary (4.17) allows a deeper look into the matter (see also Theorem (2.6.15); DAVIS (19781, CALUDE (1982bj).
4.6. REPRESENTABILITY THEOREMS
The critical levele induced by M-L testa constitute themselves aa an alternative to the KOLMOGOROV theory of complexity. The results of Sections 4.3 and 4.4 suggest that these complexity theories are "nearly equivalent". In the present section we shall prove that these theories are not equivalent and we shall investigate the possibility of expressing the M-L tests in terma of KOLMOGOROV's complexity. We shall show that this is possible by adding an element to the primary alphabet. The starting point ia Example (3.3), which we shall briefly recall. To every p.r. function 4:X* x IV a x * we aesociate the M-L test .V(#) defmed by
V(4) =
.I d , m E J V - { O ) , I+)) < W - m )
{(z,m)
K,(z
Notice that (z,m) cV(4) iff there exiats a string g in ( ( y ) < t'(z)--m and 4(p,t'(z)) = 2 . This example suggests the following defmition.
(5.1)
X* with
(6.1) Definition. (CALUDE and CHITESCU [1983a]) Let V C X*x IV be a M-L test. We say that V ia (KOLMOGOROV) representcable if there X N S , X * such that V = V(#). exists a p.r. function #:X*
(6.2) Example. The M-L test H ( z , m ) in Example (3.4) is representable.
Take for instance the p.r. q5(a:(*)*-',t'(z))
=
2.
Since
# : X * x N A X * , given by K,(z lC(z)) = .t?(z)--m-l, we have
function
H(.,m) = V(0). 0
341
Cbrpkr 4
(6.8) Example. The M-L test g((z,m) in Example (3.5) is representable. We shall construct a p.r. function d:X*X h' ax*,such that for all (y,n) in X* x h' satisfying the conditions y 3 2 and 1 5 n 5 m , we have
q a r It ( 9 ) ) = t ( d - m - 1
(54
9
thus proving that H(z,m) = V(4). Set d(apl(s)*-1
For every natural t
,+))
=
.
2
> !(z), we consider the sets 4 = {Y EX*lY 3 z , w = t }
9
and
. EX*l t ( 2 ) = t-rn-1} > t(z)-rn-l 2 0; so, Bt # 0. Moreover, Bt
Clearly, t-m-1
=
(2
c a r w = pt-'(s)
< - pt--l
=
CardBt
.
(5.3)
We order the sets 4 and Bt in the lexicographical order induced by up, thus obtaining 4 = {gl,v2 g,} and Bt = {zl,iq,...,z,}. In view of (5.3), 8 5 r . Now defme u1
,...,
< u2 <...<
+(Zi,t) = gi
9
for every i=1,2 ,...,8 . Clearly is a p.r. function satisfying the relation (5.2). 0
(6.4) Example. There exist universal and representable M-L tests. Take, x h' ax*, for example, an universal KOLMOGOROV algorithm w :X* and consider the M-L test V ( w )(see Theorem (3.17)). 0
Unfortunately, not all M-L testa are representable. (6.6) Example. Take p = 2, u 1 = 0, a2 = 1. The set
v=~
~
~
,
~9
~
~
~
b a non-representable M-L test.
Obviously, V is a (fmite) M-L test. We shall prove that V is not representable. Suppose, by absurd, that there exists a p.r. function d:X* x hT a x * such that V = V(4).We can infer the existence of three 1, such that strings go,yI,gl in X*, l?(ui)
~
~
~
342
Cdude
+(y0,3) = +t111,3) = 010
9
+ ( ~ 2 , 3= ) 111
It follows that {y0,yl,y2} = {A,O,l}. For instance, we choose @,3) = OOO
(and 4(0,3) = 010, +(1,3) = 111). For this t# we must have (000,2) E V(4), because t?(A) = 0 < t? (000)-2 = 3-2 = 1. This proves that (000,2) E V(4)= V, which is a contradiction. 0
In order to avoid this situation we “enlarge” the primary alphabet X = {a1,a2,...,ap}, p 2 2, by adding a single new elment ap+l (distinct from ai, 1 5 i 5 p). We obtain the new alphabet Y = {a1,a2,...,ap,ap+1}. In this case, every M-L test V c X* x IV c a n be viewed as a M-L test V c r‘ x N. We shall prove that all such M-L teats are representable and, in fact, the p.r. function 4 : f x lN af which represents V (i.e. V = V ( + ) )can be taken to have its range included in X*. Theorem. (CALUDE and CHITESCU [1983a]) Let {al,a2~..,ap}, p 2 2, and Y = X U aa before. For every M-L test V C X x lN there exists a p.r. function
(6.6)
X
=
4:y‘xN&f, such that V = V(+),and range(+) C X*.
Proof. Only the non-trivial case V # 0 will be considered. Let UB consider the lexicographical order on f induced by a 1 < a2 <...< ap < ap+l. We shall construct a p.r. function 4 : f x N &f having the property
K&
I[ (4)= e ( z ) - w ( z ) - l
?
(5.4)
for every z in X* for which (z,1) E V. (For the motivation see the p.r. function 4 exhibited in Example (5.3).) We distinguish two cases: a) The M-L test V is infinite, and in‘this cane there exists an injective recurshe function g : N - ( 0 ) -+ X* x IV,such that range(g) = V.
b) The M-L test V is finite, and in this caee there exists a (p.r.) injective function g:(1,2 ,...,q } + X* x hr, such that g({1,2 ,...,q } ) = V (we have assumed that c a r d V = q). In both canes we shall write g(i) = (zi,m,), for every i in dom(g). We shall describe the action of 4, on the basis of an uniform p r e cedure (which stops after a fmite number of steps in case V is fmite). We
343
Chapter 4
proceed similarly to the construction of the p.r. function Theorem (3.16).
4 in the proof of
Let g ( l ) = (zl,ml) and set
In the latter case set The construction is possible because t (za)-m2 > 0 ((z2,m2)belongs to the M-L test V). If the additional equality (t (z2),m2)= (t (zl),mr)holds, then we have (in view of (3.5)): 2
5 card{z EX.
(2)
=
t ( z z ) ,(%,ma)E v)
which proves that t (2,)-m2 2 2. In general, at step i > 1, let g(i) = (zipti). (t(zi),mi) (t(zj),rnj),for'all j=l,2,...,i-1, put
+
In
case
In the opposite case, let 1 <_
8
= card{j E IV
l i 5 j < 1, and (t(zj),mj) = (t(zi),mi))
(the k t inequality is a consequence of condition (3.5) for the M-L test V). The elements 8 in f,having t ( y ) = t(zi)-mi-l, are (in lexicographical order): Y 19Y21.*-9Yr
I
where r = (p+l)
Put
The construction is possible because
e (s;)-mi
-1
344
Cdudc
t(+6;-1
r = (p+l)
> ((pw+ -l)/(p-1))-1
28
.
It is obvious that 4 sets as a function. Moreover, the above procedure stops after the analysis of g(q), when V is fmite and hss exactly q elements; otherwise, the procedure continues indefmitely. To be more precise, we shall describe the domain of 4. To this aim, we partition the range of g according to the following equivalence relation: g(i)
g( i )
* (k'(zi),mi) = (k'(Zj),mj)
*
The equivalence class of an element (zi,mi) contains a t most h elements, where h = (p'(si)*iW(P-1) * 00
So, the range
V of g is the union
UE j , of equivalence classes E j (m
case V
j-I 8
is infmite) or is a fmite union U E , (in case V is fmite). For every j-1
-
-
equivalence clasa E j which contains t elements we consider the set Cj consisting of the lexicographically last t strings of length k' (zj)-mj-l;here Ej is the CIME of (zj,rnj). P u t then Bj = {(y,t (zj)) Iy E Ci},for the above m
pair (zj,mj). The domain of s
4
ia B = UEj, (in case V is infmite), or j-1
B = UE j , (in case V ia fmhe). j-1
Take z in X* such that (z,l) . . E V, so mv(z) - . > 0. There exists an unique natural i > 0 such that g(i) = (z,mv(z)).According t o the procedure, there exists a string y in f with l ( y ) = k'(z)-rnV(z)-l, and 4 ( y , l ( z ) ) = z. This shows that ~
K,(z le (2)) 5 e (z)-mV(z)-l
.
(5.5)
On the other hand, the equality #(y',k'(z')) = 2 implies z' = 2 , and [(y') = l(z)--mj-l, in case g ( j ) = (zj,mj) = (z,mj). This can be done for some mi 5 mv(z). We conclude that l(p') 2 k' [z)-mv(z)-l, i.e.
K , ( ~le(2)) 2 e(~)--my(~)-i
.
(54
From (5.5) and (5.6) property (5.4) follows, thus proving the inclusion
v c V(4).
To prove the converse inclusion, V(4) C V, we should notice fust that, in view of the construction of 4, (z,m) E V(4) implies (z,l) EV. Now we take (2,m) in V(#), and we prove that rn 5 my(z), (i.e., (z,m)E V). For the sake of a contradiction we suppose that m > mV(z). According t o the defmition of the critical level we have
345
Chapter 4
(z,mv(z)+l) EV(#), l (y) < t (z)-m,,(z)-l,
which and
yields
an
in
y
Y'
such
that
d(v,.f ( 2 ) ) = z. This contradicts property
(5.4). 0
Remark. If V is a representable M-L test, then the equality V = V(4) holds for many p.r. functions 4. The p.r. function 4 furnished by the construction in the proof of Theorem (5.3) is injective. Actually, Example (5.5) can be generahed: (6.1) Propomition. For every alphabet X,having p 2 2 elements there exist a frnite M-L test V, and an infmite M-L test W, which are both nonrepresen table.
Proof. a) Let p strings
2 2 and put
8 =
We consider
(pp-l)/(p-l).
Y1,12,"',J,
8
difrerent
9
in X * , with length t(yi) = p + l . We claim that the frnite M-L test,
v = ((ri,i) li=1,2 ,...,4 , is non-representable. Indeed, if V were representable, then we could fmd the (mutually distinct) strings Zl,Z2,".9Z,
9
in X* each having the length l ( z i ) < p + l - 1 = p, and such that
#(s,P+~) = yi
9
for i = l , 2 , ..,a. Since p'-' < 8 , a t least one of the strings zi, say zt,should have the length shorter than p-2. So, b(z,,p+l) = yt, and
w IP-2
< %/,,)-2
*
This shows that (yt,2) E V(O), contradicting the construction of V. b) Put W = V u {(ai,l) )i=p+2,p+3, ...}, where V is the M-L t e s t constructed at a). 0
346
Cdude
(6.8) Propodtion. For every alphabet X, having p 2 2 elements, and alphabet Y 3 X with p + l elernenk, there exists a p.r. function
T?xBv
A X * such that the M-L test test over X * x BV.
V(4) over
f x RV
is not
a
M-L
Proof. Let X = {a1,a2,...,4p}and Y = X U {ap+,}. We order X* lexicographically according to a 1 < a2 <...< ap, and r‘ according t o a 1 < a2 <...< ap < ap+l. Let A = {y E f IL(y) < p ) = {~~~...~y~,...,g~}~ in 1exic:graphical order. It is seen t h a t t = ((p+l)P-l)/p. Let B = {z EX lt(z)= p + l } = {z1,z2,...,z,}, in lexicographical order. We have 8 = pp+’ > 1 .
-
...,
The domain of 4 is the set D = {(ui,p+l) li=1,2, t } . We defme X*,by 4(yi,p+1) = zi. The set V(4) is a M-L test over r‘ X dv. On the other hand V(4)C X* x RV; a simple computation showa that
4:D
card{% EX*le(z) = p + l , ( z , l ) E V(4)} = t asserting that
> (pp-l)/(p-l)
,
V(4)is not a M-Ltest over X* x N. U
Remarks. 1) We can interpret the result stated in Theorem (5.6) aa follows: a) The complexity theories of KOLMOGOROV (based on the complexity function K,) and MARTIN-LOF (bssed on the critical level rnv) are not equivalent, according to Example (5.5). b) Considering the MARTIN-LOF theory over an “enriched” alphabet (in fact, an alphabet containing one more element) we can exactly express the M-L tests ae objects in the KOLMOGOROV theory. c) For every natural p 2 2, and for every alphabet X with p elements, there elcists a M-L test over X*x RV which in non-representable So, every non-repreoentable M-L test (see Proposition (5.7)). V c X* x Bv become representable in Y‘ x N,by adding a single new element to X. But in r‘ X RV there exist abo other non-representable M-L tests! And the “enlargement” may continue indefmitely. 2) Proposition (5.8) goes in a “converse direction”. Here, there are “too many” representable M-L tests over the enriched alphabet. Hence, the KOLMOGOROV theory over an alphabet with p elements is not equivalent to the MARTIN-LOF theory over an alphabet with p + l elements.
347
Chapter 4
Comments. In Remark 1) following Corollary (2.8) we have pointed out the distinction between the binary and the non-binary cases in the KOLMOGOROV theory of complexity. The representability analysis stresses this distinction; moreover, the same remark can be done for the MARTIN-LOF theory of complexity. The following result shows that, in a sense, the representable M-L test are “economical”. (6.9) Propoeitton. For every representable M-L test V the following inequality holds:
card{z
,
(5-7)
#:X* x IV
ax*,
E X * It (2) = n,mV(z) = m } 5 pn-cn-l
for all natural numbers n and m, n
> m > 0.
Proof. From hypothesis there exists a p.r. function such that V = V(4).
Fix the naturals n > m > 0. For every z in X*satisfying the conditions t ( z ) = n, and mv(z) = rn, there exista a string y in X* with t ( y ) < l(z)-m, and #(g,t‘(z)) = 2. We have t ( y ) 5 n-m-1. Actually, we shall prove that t ( y ) = n-m-1. Suppose; by absurd, Let [(y ) = n - m - 1 4 , with h > 0. This leads to that t ( y ) 5 n-m-2. the false relation (z,m+h) EV. Indeed, t ( y ) = n-,-h-1 < n-m-h and 4(y,t (2)) = z,thus showing that (z,m+h) E V(4)= V. The just proved equality t ( y ) = n-m-1 shows that
EX*l t(z ) = n,mv(z) = m } 5 card{y EX’ It (y) = n-m-1)
card{z =
pn-m-l
0
We continue this section with a result establishing a precise relation between the KOLMOGOROV complexity K, and the critical level induced by the M-L test V(#).
(6.10) Theorem. Let V = V(4)be a representable M-L teat. The following aseertions hold for all z in X.: my(.)
If my(.)
=0
iffK,(z I+))
2 t(z)-l
*
> 0, then K + ( z It (2))= t (z)-mv(z)-l
.
(54 (5.9)
In the particular case when range(#) = Vl, the equivalence (5.8) can be stated more precisely, namely:
348
Cdudc
Proof. Assume mv(z) = 0. Therefore (z,1)# V = V(+),i.e., for every string y in X’ with t ( y ) < t(z)-1, we have +(y,t(z)) # 2 . Then, either +(y,t(z)) # 2 , for all y in X * (which shows that K,(z 14(z))= co),or their exints a string y in X* with +(y,e(z)) = z, but this y must have e(y) 2 e(Z)-i. so, K,(Z l e ( Z ) ) 2 e(z)-i.
2 t (z)-l. There are two cases: then +(y,e(z)) # 2, for all y in X*,and then
Suppose that K,(z It (2)) i) if K,(z le(z)) = q (ZJ)B
v(4)
=
v,
ii) if K,(z le(z)) < cq then there exists at least one y in X* with d(y,t(z)) = 2, and one must have [(y) 2 e(z)-l. This shows that (ZJ)6!
V(+)= v.
Hence (5.8)was proved. According to the hypothesis, there exists a string y in 2. We have:
X* such that
4(y,t(z)) =
card{z
EX*le(z) = p+l,(z,l)E V(+)}= t > (p’-l)/(p-1)
,
fde ch4.5, 1. 587 (ms 347):
m v k ) = mq,,(4 = max(m
E N Im 2 l,+(y,t(z))= 2 ,
for some y in X*with t (y) < t (z)-rn) = max(m
E N Irn 2 l,+(y,e(z))=
for some y in
X*with
m
2,
< t(z)-e(y)) .
The last maximum is attained for those y in X * which are of minimum length, i.e. for those y in X* with t (y) = K,(z It (2)). So, mv(z) = t ( z ) - K + ( z lt(z))-l
.
In the particular case when range(+) = V , we have: if mv(z) = 0 , then ( z , l ) # V, i.e. z range(+). Hence K,(z “(2)) = oa 0
C range(+). So, the condition V , = range(+) Remark. We have (V(+)), in Theorem (5.10)can be equally stated as range(+) C V,.
349
Chapter 4
X N S,X* be an universal KOLMO(6.11) Corollary. Let w :X* GOROV algorithm. Then, range(w) # (V(W))~.
Proof. Use Theorem (5.10) and the relation Ky(zle(z)) # cq for every z hX*. 0
Recall that the enumeration of X* in the lexicographical order induced by a y < az <...< a,, is given by {y(n) In 2 11, where y(1) = A, y(2) = a1?... y,( p + l ) = ap, y(p+2) = alal It follows that
,... .
ln
ap" = y(#(m)), where s ( m ) = z p ' = (pm+'-1)/(p-l). id
(6.1%)Theorem. (STAIGER [1984) (added in proof)) Every M-L test V C X*x IV satisfying the condition:
card{z EX*l l ( z )= n,(z,m) €V) 5 p"-"'-' for all naturala n,m
,
(5.11)
2 1, is representable.
Proof. As in the proof of Theorem (5.6), fu an injective recursive (or, fmite) enumeration g for V, i.e. range(g) = V.. P u t g ( i ) 7 (q,mi), for
I
each i E dom(g). We define the p.r. function
4 :X x IV A X
, if n 2 2, and t
= pr[t(z,) = n,
zt
bod
=
m, = n-11
00,
and
aa follows:
EN,
otherwise,
I
zt
, if n 2 t (z)+2,
z = y ( 8 ( t (z)-l)+i),
and t = pr[e(z,) = n,m, = n-t(z)-l,
d.9.)
and card{j E h v 11 5 j
=
5 r,e(zi) = n,
mj = n-e (Z)-l} = i] E hv, 00,
otherwise,
\
for z # 1. We shall prove that V = V(4).
First, assume that (2,rn) EV, i.e. (z,m) = (zt,rnt), for mme t 2 1.
Since t ( 2 ) > m , two caaee may occur: a) If ! ( z ) = m+l, then put z = X and notice that +(X,m+l) = z . Indeed, in view of (5.11), there ie an unique string y of length m + l euch E V , namely y = 2. that (y,m)
350
Cdudc
b) If e(z)
> m+l,
then we compute the number
i = card{i EN11 5
J'
2
t , t ( z , ) = t(z),m, = m }
,
and we notice that, by hypothesis and (5.11), 1 5 i 5 pe(')--'. In this and it is easily seen that c w we put E = y(.g(t'(z)-rn-2)+i)
d(z,t (4)= 2 * In both cases we have found a string z of length e(z)-m-l such that ~(z,!(z)) = 2, thus proving that (z,m)E V(6). Conversely, if (z,m)E V(t#), then we can fmd a string z in X* with ! ( z ) 5 t ( z ) - m - l such that # ( E , ~ ( Z ) )= 2. In view of the construction of 4, we fmd a t E RV, with # ( E , ~ ( z ) ) = zt and mt = e(z)-e(z)-l 2 t ( z ) - e ( z ) + m + i - i = m. Consequently, z = zt, (zt,mt) E V , and m 5 mt; 80, (z,m)E V, thus ending the proof. 0
Remark. The condition (5.11) is not necessary.
See in this respect
Example (6.7). (6.18) Corollary. (STAIGER [1964]) Let V C X* x RV be a M-L test and let u E X*-{A}. Then the set tbv
is a representable
= {(=,m) I(z,m) E v)
!
M-Ltest.
Proof. For all naturab n,m 2 1, we have:
EX* (y) = n,(y,m) E uV) = card{z EX* (2)= n-e (u),(z,rn) E V)
card{y
5 (p"-e(.)5 pn--1
-1)/(P -1) ,
because t (u) 2 1. Hence uV satisfies the condition (5.11), being represent able by Theorem (5.12). 0
(6.14) Theorem. (STAIGER [1984]) There exieta a M-L test V c X* x Bv such that the relation V V(4)faib to hold for every p.r. function 4 xN 4
:x*
x*.
c
Chapter 4
351
.
Proof. Firstly, we prove the following combinstorial result: Intermediate etep. Let W C X* X PV be a M-L test which satisfies the condition card{% EX*I!(z)
= n,(~,mE ) W ) = (p""-l)/(p-1)
,
(5.12)
for some naturals m,n 2 1. If W C V(+),for some p.r. function +:X*x JV then 4 maps the set {(z,n) Iz EX', !(z) 5 n-m-1) in an one-to-one manner onto the set {y E X * It (y) = n, (y,m) E W). Indeed, in view of the relation W C V(+), we have mw(z) 5 myc,,(s) = e(z)- K,(z lt(z))-l, for all z in W,(see Theorem (5.10)). Hence, for every E X * with !(y) = n and (y,m) E W, (i.e. mw(y) 2 m), there is a string z, in X with t ( z , ) 5 n-rn-1 and +(z,,n) = y. Since there are a t most (p"--l)/(p-l) strings of length less than n-m-1, the assertion of the Intermediate step follows from
ax*,
(5.12).
We continue the proof by picking two r.e. sets A,B C JV which cannot be recursively separated (see Theorem (2.9.8)). Furthermore, assume that 0,1,2 A U B . We defme the M-L test V C X*x EV an follows:
I
0, (y(s(n)+l), ...,y( e(n)+p+l)},
= {y(e(n)+W,
b (8 (a )+2)1, ,0 9
if n 5 2,m 2 0, if n 2 3,l I m I n-2, if n EA,m = n-1, if n EB,m = n-1, otherwise.
(Recall that { ~ ( n In ) 2 1) is the enumeration of X* in lexicographical order.) Clearly, V is really a M-L test. Suppose, by contradiction, that v c ~ ( 4 1 , for some p.r. function #:x*x PV AX*. Since for every n 2 3, card{z EX*It (2) = n, (z,n-2) E V) = p + l , we can use the Intermediate step to derive that the restriction of the p.r. function # to the set X U {A} acts in an one-to-one manner onto the set (y(a(n)+l), ...,y(8( n)+p+l)}. In particular, $(A,.) # 00, for every n 2 3. According to the defmition of V, for each n 2 3, we have:
352
Cdudc
{YMn)+qh if {4(X,n)} = { V ( 8 ( 4 + 2 ) } ,
if
€4 n
EB.
The recursive set C = {n E RV In 2 3, #(A,.) = Y(a(n)+l)} separates the r.e. sets A and 8,thus contradicting our working hypothesis. 0
4.6. RECURSIVE MARTIN-LOFTESTS
In this section we focus our attention to recursive M-L tests. In this context we are able to express some previous facts in a more precise setting. (6.1) Theorem. (CALUDE and CHITESCU [1983c]) Let V C X* X RV be s recursive M-L test. Then we can effectively find a p.r. function d:X*x N a X* such that V C V(t$). Furthermore, 4 can be taken to poeseea the following properties:
4 is injective. The graph of 4 is recursive.
(6.1) (6.2)
For every z in X*,(z,l) E V iff (z,1) E V(t$)
.
(6.3)
Proof. The set A = {(zrmV(z))Iz E V,}is recursive in view of Lemma (4.10). We distinguish two caaes: i) V is infinite and in this case there exists an injective recursive function g:RV-{0} + X*X w’ such that range(g) = A; ii) V ie finite and A hss q elements, and in this case there X*X nV such that elrists an injective (p.r.) function g:{1,2, ...,q} g({1,2 ,...,g}) = A. In all caaes, if i is in the domain of 8, we put g(i) = (2; d z i 1). Due to the recursiveness of V, we may suppoee that g haa the following “lexicographical” property: for all natural numbers 1 i <
-
<
(zi) I-t(zj),
if e(zi)
=
e (zj),then mv(zi) 2 mv(zi)
+
(6.4) (6-5)
We are ready to defme the p.r. function 4. For i = 1, g(l) = (z1,my(z1)).Put z1 = ~(s(t(zl)-mV(zl)-l)) and
353
Chapter 4
4 ( ~ 1 , ~ ( Z l )= ) 21
Next, let i = 2, 80 g(2) = (z2,mv(z2)).
In c w e (tl)z t (4, we put
=
v ( ~ ( (22)-m~(z2)-1)). e
In case t ( z l ) = t(z2), we consider the greatest element (according to the lexicographical order) of the set {p(l),g(2),...,y( 8 (e (22)-mv(z2)-l))){zl}, and we call thia element z2. In both cases, put =
+2,+2))
Continuing
the
procedure
22
we
reach
the
step
i > 1,
g(i) = (zi,mv(zi)). There are two cases. In the former case e(zi) # e(z,),
for all 1 5 j < i;set zi = y(8(e(zi)-mv(zi)-1)). In the latter (opposite) case let 1 j(1) < j(2) <...< j ( b ) < i be all indices 1 5 j < i such that t ( q ) = t ( z j ) . In fact j(2) = J(l)+l,j(3) = d2)+i, due to properties (6.4) and (6.5). We defie zi to be the greatest element (m lexicographical ) , 8 (e (zi)-mV(zi))}-{zj(l),zj(2),...tzj(k)~. order) of the set { ~ ( 1 ) , ~ ( 2...,y( In both c u e s put
...,
d(zi,e (zi)) = zi
.
Notice that 4 acts ae a function, because if t(zi) = e ( z j ) , then is possible and here follows the motivation. Put =...- P ( ~ ~ ( =~ 1t ). We have:
zi # zj. The construction qz,)= e(Zj(q) = e(zj(a))
-
mi = mV(zi) <_ mk = mV(zj(t)) = mV(zj(k-1))
<...<
ml
=
5 mk-l *
mV(zj(l))
...,
For every natural t E {1,2, k} U {i}, let
4 = b(l)lY(2),...,Y(4 --mt--l))}
'
Notice that
B1 C 8 and for every 1 5 u
2
C-.C Bt C Bi
9
=
Bo iff
m, =
.
m,
We shall describe in detail the action of 4. Clearly, Zj(1)
J
~(8(e-m,-1))
*
In order to obtain ~ ~ ( we ~ 1differentiate , two possible cases:
354
Cdude
(6-7)
m1> m2
or
.
ml=m2
(6.8)
If (6.7) holds, then zj(?)= ~(s(t-rn,-l)); in the case of (6.8) we have It is obvious that in case (6.8) one has s(t-m2-l)-l 2 1, since
8,= B2,80 zj(2) = Y(d(t-m2-1)-1). 2
<_ card{z EX*l t ( z ) = e,(z,m2)E V)
I (P--l)/(P-l) = e(t-m2-1)
.
The case when the strict inclusion occurs in (6.6) being clearly favourable, we focus our attention on the “bad” situation, i.e.,
=...= m,
mh = mh+l = mh+2
for 1 5 h have
Here, in caae h
> 1,
z j ( , ) = y(s(t-m-l)-(r-h))
.
5 r 2 i.
=m
,
we conaider mh-l
> mh.
We
It remains to show that s(t-m-1)-(r-h) 2 1, i.e. r - - h + l 5 (p‘--l)/(p-l). This relation follows from the inequalitiee r-h+l
5 card{z EX*It(%)= t , ( z , m ) E V) L (Pl-4AP-1) *
It is worth adding that in caae V is fmite the procedure eventually halts. Property (6.1) is a coneequence of the injectivity of g:(zi,mV(zi)) # (mj,mdzj)) iff zi # z j or mv(zi) # mv(zj). This implies that for distinct i and j one must obtain dirrerent value8 4(zi,t?(zi)) = zi and +(zi,t(zj)) = zj. We prove now the inclueion: V C V(t$). Indeed, in case (z,m) is in
365
Chapter 4
V, let (z,rnv(t)) = (zi,rnv(zi)), in the enumeration given by g. So, rn 5 rny(zi), and ti = #(zi,t (ti)),where the length of zi is less than t(zi)-mv(ti)-l, i.e., K+(z (t(z))5 t (zi)-rnv(zi)-I < t (z)-mv(z) 5 t (z)-rn, showing that (zp)E V(4). It is seen that for every z in X* for which (z,1) is in V(d),there exists a natural number i 2 1 such that 2 = zi, and (zi,mv(zi)) EV. It follows that (z,l) .EV; hence (6.3) was proved. All it remains to show is the recursivenees of the graph.of 4. T h i ia proved by taking arbitrarily ((z,t),z) 2 (z,t,z) in X*x N X X*,and checking if ( z , t , z ) belongs to the graph of 4, according to the following algorithm (recall that r n V is a recursive function in view of Lemma (4.10)): 1. If mv(z) = 0, no. STOP. 2. If t (z)# t , no. STOP. 3. Chooee i such that g(i) = (zi,rnv(zi)) and z = zi. 4. Run enough steps in the procedure defming 4 in order to find zi. 5. If t = zi, gC8. STOP. 6. No.STOP. 0
Remark. For a given recursive M-L test V there are many p.r. functions
4 satisfying Theorem (6.1), e.g. our construction depends on the enumeration function g. The converse implication in Proposition (5.9) also holds for recursive M-L tests. (6.2) Theorem. Let V be a recursive M-L test. Then the following conditions are equivalent:
The M-L test V is representable, card{z EX*l l ( z ) = n , r n v ( ~ )= m } 5 p”--’ for all naturals n
>m >0 .
(6.9) 3
(6.10)
Proof. The implication “(6.9) (6.10)’’is in fact a weakened form of Proposition (5.9). We deal with the converse implication. We shall prove that V = V(4),where 4 is the p.r. function constructed in Theorem (6.1). All it remains to prove is the inclusion V(4) C V. Take (z,rn) in V(4). In any caae (z,l) E V (see Theorem (6.1)). We shall prove that (z,rn) is in V by showing that my(.) 2 rny+)(z). For the sake of a contradiction, assume that mv(t) < mq&). It followa that (z,rnv(z)+l) is in V(d),hence there exists a atring a in X’
356
Cdudr
with ! ( z ) < !(z)-rnv(z)-l and
b(z,P (2))
=
2.
Let g(i) = (zi,mv(zi)),where z = zi, in the enumeration given by g (see the construction of I# in the proof of Theorem (6.1)). We let the procedure giving 4 run enough steps and we obtain the string zi such that I#(zi,l(zi)) = zi. We shall show that e(zi) = e(zi)-mV(zi)-l = t! (z)-mV(z)-l, thus deriving a contradiction (in view of the injectivity of #; see (6.1)). Remember the action of 4. In case e(z,) # [(zj),for all 1 2 j < i, we have !. ( z j ) = !(zi)-mv(zi)-l, and the proof is finbhed in this case. In CBBe
e (2j(2)) =...= e ( Z j ( & ) ) = e (zi) , 1 2 j(1)< j ( 2 ) <...< j(k) < i,we have analysed several
e (.
)=
. 1(1)
possibilities, according to the existence of some equalities in the sequence of inequalities
for
mv(zj(1))L mv(zj(2))
>...> m ~ ( z j ( i t L) ) 4 . i )
*
<
In the case of the strict inequality rnv(zi) mv(zj(k)), we saw that P(zi) = !(zi)-rnV(zi)-l, and again the proof b finished. The most complicated cme is when mV(zi) = mv(zj(i))=
mv(zj(k-1)) =.**- -
md2j(k-))
9
where 0 5 r < k. In this case we must put zi = y(8(t(zi)-mv(zi)-l)-(r+1)). In any case we have r + 2 elements z such that P(z)= n and mv(z) = m (we put e(zi) = A , and rnv(zi) = rn) and the hypothesis gives r+2
2 pn--1=
card{z E X * l l ( z ) = n-rn-1)
.
But y(.~(n--m-l)) is the last element (in the lexicographical order) of the set x"--l=
{z
EX* lqz) = n-m-~)
.
It follows that zi EX"-"-', which shows that t ( z i ) = A-m-1. ie finished in this case too.
The proof 0
Using Theorem (5.10)we get
V be a recursive representable M-L test and let X* be a p.r. function such that V = V(#)and range(#) = Vl . (8.11)
(6.8) Corollary. Let
#:X* x N
S,
Then the partial function U,:X*A N Lr+(z)= K,(z {e(z)) is a p.r. function with recursive graph.
given
by
357
Chapkr 4
Proof. In view of hypothesis (6.11) we can apply Theorem (5.10). From (5.9) and (5.10) it followe that U, is a p.r. function. Moreover, ( ~ , mE) Graph(UJ w mV(z) # 0 and m =
e (z)-mV(z)-l
Here we have used the recursivenew of the function
my
.
(see Lemma
(4.10)). 0
Remark. The p.r. function q5 given by the proof of Theorem (6.1) satisfies the additional property: range(#) = Vl. (6.4) Theorem. Let q5:X’ x N 44’ be a p.r. function such that range(q5) = (V(#))l. Then the following assertions are equivalent:
The partial function
U,:X’ *Hv given
by V , ( z ) = K4(z le(z)) is a p.r. function
(6.12)
with a recursive graph.
(6.13)
The M-L test V(#)is recureive.
Proof. In order to prove the implication “(6.12) + (6.13)” we establish a chain of equivalences: For all (z,m) in X’ X IV we have: (2,m)
E V(4)
--
U,(Z)
< e (2)-
U,(Z)
E {0,1,2,...,[(2)-m-1}
U d Z )= 0 v U&) = 1 v...v V&)
=
!(z)-m-l
* ( ~ $ 0E) Graph (Vb) V (z,l)E Graph (V,) v ...V (z,e (2)-,-1) By convention, when .t (2)
E Graph (V,)
.
< m+l,the set {O,l, ...,l(z)-m-l)
For the converse implication, i.e., “(6.13) V = V(+)and we apply Corollary (6.3) to V and 4.
is void.
(6.12)”, we put 0
The following theorem will furnish a c h of recursive representable M-L tests Recall that for every set V C X’ x ( N- { 0 } )and for every natural number m 2 1 we have written V, = {z E X * 1(z,m) E V). We defme the critical level induced by V to be the function
.
358
Caludc
mV:X* -+NU
{m}
,
sup {m E N Im 2 1,z E V,},
in case such rn exists, otherwise.
Clearly, thia defmition ia compatible with the defmition of the critical level induced by a M-L test. (6.6) Theorem. Let V every natural number m
C X* x A’be a r.e. set such that V,,, C V,, for 2 1.
a) The following assertions are equivalent: For all natural numbers n
> m 2 1, we have:
card{z EX* le (2) = n,(z,m) E V) = (p”“-l)/(p-1) For all natural numbers n
.(6.14)
> rn 2 1, we have:
card(z EX* lt?(z)= n,my(z) = m } = pn-m-1
(6.15)
b) If one of the above conditions (6.14) or (6.15) iS fulfiied for a set V subject to the general hypothesis, then V is a recursive representable M-L test.
Proof. a) Firstly, we deal with the implication “(6.14) (6.15)”. The hypothesis of the theorem and condition (6.14) eneure that V ia a M-L test, hence my takes only fmite values. Fix a natural number j and let n 2 j+l. In view of the inclusion V,,, c V,, we have:
{z E X * lt?(z)= n,rnV(z)= n--(j+l)} = {z E X *l t ( z ) = n,(z,n-j-l)
EV)
- {z EX* lt(z) = n,(z,n-j) EV)
.
Consequently, according to (6.14), we have: ) n-(j+l)} card{z EX*( P ( z )= n , r n ~ ( z= =
((pn
-pJ
-(. +-I)
- 1 )/( p - 1)) - ((pn -in 4- 1)/(p -1))
.
Taking m = n - ( j + l ) , we obtain (6.15). Secondly, we prove the implication “(6.15) =+ (6.14)”. natural numbers n > m 2 1. For every natural g 2 1, put
Fix
the
Chapter 4
359
In view of (6.15), cardA,,-l = 1. Since A,, C A,,-l, it follows that car* 5 1. The equality car- = 1 would imply A,, = A,,-1, a contradiction. Consequently, A,, = (3. Moreover, A, = 0, for all u 2 n. We have proved the equality: {z EX* le(z) = n,(z,m)
E v)
From (6.16) we infer the equalities: card{z E X *l t ( z ) = n,(z,m) E V) n -1
= n -1
=
card{z EX*le(z) = n , m d z ) = j )
C pn-i-l
.
- (Fn--l)/(p-l)
b) All it remains to prove is that under the general hypothesis, condition (6.14) implies the recursivenew of V (because in this case V will be a recursive M-L test satisfying condition (6.10) in Theorem (6.2)). Clearly, in view of (6.14), V is infinite. Let g :N-(0)+ X ' x IV be an injective recursive function such that range(g) = V. Put g ( i ) = (zi,mi), for every natural number i 2 1. We take an arbitrary (z,m) in X*x N and we describe an algorithm for testing if (z,rn) is in V. Put t ( z ) = n. There exiets a natural q 2 1 such that the set
G
= {9(1),0(2),...,9(~))
9
contains all the elements (y,m) in V with t ( y ) = n. Moreover, q can be effectively found. For instance, q can be taken to be the l e d natural number h such that the set
1)
( 9 (1),!?(2),...,9(h
9
contains exactly (pn--1)/(p-l) pairs (g,m) with t ( y ) = n. If (z,m)is in G , then (z,m) EV;if (z,m) G ,then (z,rn) B V. 0
360
Cdudc
(6.6) Definition. A M-L test V satisfying condition (6.14) (or, equivalently, condition (6.15)) will be called full.
Remark. Every full M-L test is recursive and representable by Theorem (6.5). (6.7) Example. We shall give an example of a full M-L test V and we shall construct its associate p.r. function 9 such that V = V(#),M in Theorem (6.1).
a) Denote, for all naturals n > m 2 1, by A(n,m) the set {(z,m) E V l e ( z ) = n}. It is clear that V d be completely determined by the sets A(n,m). Recalling the lexicographical enumeration of X * given by { y ( n ) In > O} we set
A(n,rn) = {(y(s(n-l)+i),m) li=1,2, ...,s(n-m-l)} For every natural rn
.
(6.17)
2 1 one has a,
V, =
U
.
A(n,m)
(6.18)
n==m+l
Clearly, V ia a full M-L test. Moreover, for every natural n
2 2, one
haa: rny(y(s(n-l)+l)) = n-1
,
(6.19)
and rnv(y(s(n-l)+i)) = n-k-1
,
for every 1 <_ k 5 n-2, and i E {s(k-l)+l, s(k-l)+2, Also, rnv(z) = 0, for the other z in X * . An inspection of A ( n , l ) shows that for n
(6.20)
...,e ( k ) } .
2 2 we have:
card{z E X * l!(z) = n,(z,rn) EV, for some rn
2 1) = e(n-2)
.
b) In order to carry out the construction indicated in the proof of Theorem (6.1), we choose an enumeration function p for the set A = {(z,rnV(z))Iz E Vl}. This g will satisfy conditions (6.4) and (6.5). Furthermore, p has the supplementary property (which completely determines 9):
If for some i
<j
one haa [(z,)= e(zj) and
mv(zi) = rnv(zj),then zi is greater than zj
361
Chapter 4
in the lexicographical order.
(6.21)
> m 2 1, the set l t ( z ) = n,my(z) = m) ,
Property (6.21) says that for all n
{z EX*
is ordered by the “inverse” lexicographical order. The p.r. function 4:X*x PJ A X * produced by the proof of Theorem (6.1) is given by d(v(i),n) = y(s(n-l)+i), for every n 2 2 and i E {1,2,...,~ ( n - 2 ) ) . 0
4.7. INFINITE OSCILLATIONS
In thie section we deal with the set of all initial segments of a fixed .. It is shown that €or every recursive
infinite sequence x = z1z2. z,...
00
function f
:N--.* JV such that Cp-’(”)
=
CQ
every infmite sequence x
n 4
haa
an
infmite
number
of
initial
segments
zl...zz,
such
that
K,(z l...z, in) 5 n-f(n); here w :X* x PJ A X * is an arbitrary universal KOLMOGOROV algorithm. The motivation of the following results comes from probability theory. Recalling Example (3.1), it is known that the deviation of s,/n from 1/2 is of aeymptotical order of magnitude G / n (see also Exercise (10.7)). Furthermore, the law of the iterated logarithm tells us that, for each fixed infmite binary sequence x = z 1z2...z,..., there exist infmitely many more moments n when (sn/n)-(l/2) is bigger than G / n , i.e. conthere exist infmitely many moments n when the binary string zl...z,, sidered as an element of the population of all binary strings of length n, is “non-random”. Our aim is to prove that the phenomenon just described also occurs when the randomness is measured by KOLMOGOROVL complexity associated to an universal KOLMOGOROV algorithm.
362
Cdudc
Notation. By X" we denote the set of all infinite x = 2122...2... n of elements in X. m
If 'I E X", then a) x(n) = zl...zn,for every n EN-{O},
> 0, and
sequences
b) for all n,
We begin with an useful combinatorial reault.
(7.1) Lemma. (KATSEFF [1978]) For each (nl1...,nk)E nVk, k 2 1, satisfying the inequality k
cP-'rl
1
i=1
one can effectively fmd the strings e(8;)
= ni, for each 1
for every x i, 1
such that:
81,...,8k
5 i 5 k , and
EX", there exists an
5 i 5 k, such that 8 i
= x(ni)
.
Proof. Assume, without loss of generality, that n l <_ n2 I...< nt. The strings a,,..., at will be produced by the following algorithm: 1. Put e l = a "1 l
.
2. For every 1 < i 5 k, let 8i be the smallest string (according to the lexicographical order induced by a1 < a 2 <...< a,,)of the set
A,,; = {z E X * l l ( z ) = ni, card{j a j C 2 } isminimum}
E IN 11 < j 5 i ,
.
Condition (7.2) is obviously fulfiied. To prove (7.3) we proceed by h u m e , for the sake of a contradiction, the existence of an infmite sequence x EX", auch that for every 1 5 i 5 k , .si Z x(ni). In other words, we can fmd an infinite sequence x EX" such that si 6 x(nk),for each 1 _< i 2 k. For every 1 5 i <_ k, there exists a string z E X * such that c a r d ( j E RV 11 5 j < i , s l c z) = 0. Indeed, we take z = x(ni). Consequently, for all 1 5 n < rn 5 k , 6 8 , . reduetio ad absurdum.
To each string di, 1
5 i 5 k, we associate
the aet
363
Chapter 4
-
Ex' (e( V ) = n k , 8i c $f}
Si = {V
It is seen that card Si = pncei, and k
c
Usi + {V
EX*
I ~ ( v =) n t }
9
i4
.(tit) 4 Si, for each choice of i, 1 5 i 5 k. Furthermore, n Sj = 0, for distinct indices i and j , we can write:
because Si
h
h
k
i =I
ir l
i=1
c a r d ( U S i ) = x c a r d S i = x p n k l c i < pnk k
Hence, z p - " '
since
.
< 1, thus contradicting (7.1).
i-1
(7.2) Lemma. Let such that
7
:JV
S,
nV
be a p.r. function with a recursive graph,
(7.4)
Then we can effectively fmd a p.r. function r ' : N following five properties: n 4 '
Graph(7') C Graph(7)
<
~ ' ( n ) n, for each n
card{n € R V In-.'(.) 7'
=
a N having the
.
E dom(7')
.
(7.7)
k} 5 1, for each natural k
haa a recursive graph.
Proof. Recall that if m
4 dom(T),
.
(7.8) (7-9)
then r(m) =
so,
the term
M
p*(m) = 0 does not contribute to zp'("). r':N
&PI
Defme the p.r. function
n 4
by ~ ( n ) ,if r(n) 5 n, and for every m
oq
< R,
otherwise.
The properties (7.6)-(7.9) follow from construction. Hence, we focus our attention on (7.5). We define the sets
364
Cdudc
A = {a E N b ( n ) I
At
EN
= {n
In-r(n) = k}
,
.
From (7.4) it follows that
nEA
because
cI+)>.
p-+)<m . 1 Furthermore, A, n A j = 0 for distinct indices i and j, and {nEN
M
A=UAi
.
t 4
For every natural k for which At # 0, we denote by nt the smallest element of A t . It is obvious that dom(r’) = (at Ik E N , Ak # @). We have:
In case At #
0, EAk
n fn,
Since
n =nk+l a h
n =nk+l ni(n)==t
365
Chapter 4
we deduce that 00
(p/(p-l)).cp-+'(")
=
m=u
c
p+)
=
00
.
nEA
which proves (7.5). 0
(7.8) Lemma. Let 7 :RV a N be a p.r. function with a recursive graph satisfying (7.4). Then we can effectively find a recuraive function g:N---c X*satisfying the condition: For every x EX"", the set
4 x 1 = {t
E
Idt) = x(e ( g ( t ) ) ) and e
=
9
(7.10)
is infinite.
Proof. Replace 7 by 7 ' , the p.r. function furnished by Lemma (7.2). It is seen that for every natural n, .'(TI) # 00 iff ~ ' ( n= ) m, for some m 5 n. It follows that the domain of T' is actually rccureivc. The recursive function g will be defmed by stages a8 follows: Stage 0. n
I. Compute no= p n [
C
2 11.
p+'(j)
1 4
r'(j)+m Extract from the vector (7'(o),...,7'(nO)) all fmite components, thus obtaining the vector (r'(io), ~'(i~,)). 2.
...,
3. Use the al5orithm provided by Lemma (7.1) in order to fmd the strings 8,,...98k EX having e ( 8 , ) = r f ( j j ) ,0 j 5 k,, and such that for each x E xm, there exists a j E {(),I,...,k,} satisfying 8, = x(e (6,)). 4. Defme g(ij) = a j , for all j E {0,1,...,ko}, and g(m)= A, for all m E {o,l,...,~o}-{~o,...,jk~}. Stage ( q + i ) .
I. Compute nq+l = w[n,
< n,
i: p+'(j) 2
11.
jm,+l
r'(j)+m 2. Extract from the vector (~ '(n , +l), T ' ( A , + ~ ) ) the fmite components, thus obtaining the vector (r'(ik +l),...,Tf(ik,+l)).
...,
f
3. Use the algorithm provided by Lemma (7.1) in order to fmd the
366
Cdude
strings 8k,+l, ..., E X * , having [ ( a , ) = r ’ ( i j ) , J’ E {k,+l, ...,k,+l}, and such that for each x EX”,we can find a j E {k,+l,...,k,+l}, satisfying 8j
=
X(! (8j)).
4. Defme g ( i j ) = sir for all
E {kq+l,...,kq+l} and g(m) = A , for all
J’
m E (nq+l,..’,n,+l}-{iL,+~,...,i~,-~}.
It is easy to notice that the above procedure really defines a recursive function g:N -+ X*. Condition (7.10) follows from the construction of g and the infinity of the domain of 7 ‘ . 0
Remark. In case the p.r. function 7 itself comes from Lemma (7.2), i.e. 7 satisfies conditions (7.5), (7.7)-(7.9), then t ‘ ( g ( t ) ) = 7 ( t ) , for each t
E dom(7)
.
(7.11)
(7.4) Proposltlon. Let r :N3 N be a p.r. function with a recursive graph satisfying (7.4). Then for each universal KOLMOGOROV algrithm w :X*x N we can find a constant e such that for every x E X” there exist infmitely many naturals n E dom(.r), for which the following inequality holds:
ax*
.
K,(x(n) In) 5 n--7(n)+c
(7.12)
Proof. Construct, for the given 7 , the p.r. function 7’:N3 N furnished by Lemma (7.2). By Lemma (7.3) we can construct the recursive function g : N -c x*satisfying (7.10). Defme the p.r. function #:X* x N J+X*by 4(ar,n) =
[
g(n)y,
if n - 7 ’ ( 4
OG,
otherwise,
=
w,
for all y E X * , n EN. The above definition works because in case n--7’(n) = [(y), then this n must be unique by (7.8). Take now x EX”. For each t E A(x) = {t E IV I g ( t ) = x(t ( g ( t ) ) ) and P ( g ( t ) ) = 7 ‘ ( t ) } , we construct the string Y(t)
=x
e(u(t))+l.t
.
Clearly, P ( ~ ( ~ 1=) t - 7 ’ ( t ) and d(?+),t) = 9 ( l ) Y ( t ) = x u )
Consequently,
-
Chapter 4
367
K o ( x ( t )It) 5 % ( t ) ) = f - r ' ( t )
'
KOLMOGOROV's Theorem furnishes a constant
e
such that
.
5 t-r'(t)+e
K,(x(t) I t ) <_ K,(x(t) I t ) + c
Finally, t - ? ' ( t ) _> 0, so r ( t ) = r l ( t ) . Consequently, for an infiity of c dom(.r), (7.12) holds.
t E dom(r')
0
(7.6) Lemma. (MARTIN-LOF [1971)) Let f:RV function such that
+
RV be
a
recursive
00
C p - J ( n ) = 30 .
(7.13)
n d
Then we can effectively fid a recursive function
f':m
4
PI such
that w
.
p-1
=
co ,and
(7.14)
niO
for each c E N,there exists a natural that f'(n)
2 f(n)+c, for all
2 N,
N, such
.
(7.15)
Proof. We defme, by primitive recursion, the recursive function F:N + RV: F(0) = 0
,
F(m+1) = pn[n > F ( m ) , and
2
P-'(~)
> P"]
-
i=F(m)+l
Finally, defme f * by: f(n) = j(n)+m
if ~ ( m<) n 2 F(rn+~) .
Clearly f * hae the requited properties. 0
(7.6)
f
Theorem.
:RV -+ N
(MARTIN-LOF
[1971],
be a recursive function such that
every universal KOLMOGOROV algorithm w each I EX",
KATSEFF 00
[1978])
Cp-'(")= OQ " 4 .
Let
Then for
:X X IV 44. and for
368
Cdude
K,(x(n) In) 5 n - f ( n )
(7.16)
i.0.
Proof. Let f *:N4 N be the recursive function coming from Lemma (7.5). Clearly, T = f satisfies the hypothesis of Proposition (7.4). Hence, we can fmd a constant e such that for every x EX"",the set
I
= {n
EN IK,(x(n) In) 5 n-f.(n)+c)
,
is infmite. Lemma (7.5) guarantees the existence of the natural N, satisfying (7.15). Consequently, the set
I' = I n {n E N
If*(n)
2
f(n)+c)
is still infmite. For each n E I' we have:
K,(W
in) 5 n - f f . ( 4 + e I n -
w
9
thus completing the proof. 0
Remark. In contrast with the law of the iterated logarithm from probability theory, the inequality (7.16) holds for each x EXrn,and not only with probability one. Theorem (7.6) holds for f (a)= [logpa].
4.8. PROBABILISTIC ALGORITHMS
The probabilistic tests of primality diecussed in the rust section of this chapter are only probably correct. This ie a common feature for all probabilistic algorithms. In the present aection we shall describe the clam of all probabilistic algorithms and we shall prove that the ability t o make random decisions does not increase the global computational power. We shall analyse a complexity-theoretic condition under which a probabilistic algorithm is error-free. This result is only of theoretical interest, since it involves the use of an infmite set of random strings, which is not r.e., by Corollary (4.4). Roughly speaking, there is only a theoretical (but not practical) poeeibility to convert a large class of probabilistic algorithm into equivalent deterministic onee.
First of all we formabe the general notion of probabilistic algorithm.
Chapter 4
369
(8.1) Definition. (ZIMAND [1983a]) A pair (f ,e), where
f:nvxX*s,N
,
is a p.r. function and e E [0,2-'] is a recursive real, is called a probabilistic algorithm that c-computes the partial function g:nvanv
,
provided the following two conditions hold: If g(n) f
00
and f (n,z) = g(n), for some n in
N
and z in X*, then f (n,zy) = g(n), for every y in
X*
.
(8.1)
For every n in dom(g), there exists a natural number t , , (which depends upon e and n) such that:
card{z
EX*14(z)= t,,,, f (n,z) = g(n)} > (l-c)pf""
.
(8.2)
Remarks. a) The computation of a probabilistic algorithm is influenced by a "random" factor, for instance the tosses of an unbiased coin (in the binary case). When writing f ( n , z ) we denote by n the input value and by the string z the encoding of the "random" behaviour. Condition (8.1) says that if the probabilietic algorithm reaches an acceptable state, then further random experiments are superfluous. According to condition (8.2), the probability that f computes g is greater than 1-e (i the encoding of the "random" factor is sufficiently long). Finally, choosing e in the interval [0,2-'] will ensure the uniqueness of the function evaluated by f (see Theorem (8.5)).
b) A model of probabilistic algorithm is the probabilistic TURING is a TURING machine with distinguished states (the cointossing states, in the binary case). For each such dietinguished state, the fmite control unit specifies p possible next states (in case X = {a1,a3, tap}, p 2 2). The computation is deterministic except that in the distinguished states the machine uses the output of a random experL ment (having exactly p results) to decide among the p possible next states. See for example, SANTOS [1971),MA" [1973], GILL [1976]. machine which
...,
(8.2) Example. We shall prove that the MILLER and W I N , and SOLOVAY and STRASSEN probabilistic algorithms satisfy Definition (8.1). We shall take c = 2-' and g:N -* (0,l) the (primitive recursive) characteristic function of the set of primes: g = PRIME.
370
CJudc
To be more precise we recall the common construction of these probabilistic algorithm. For every natural number n (which can be tested) we take j natural numbers b uniformly distributed in the set {1,2,...,ta- l}. For each such 6 we check whether some rued predicate W(6,n) holds. If so, n is composite; if not, n is prime (with a probability greater than 1-23.
The encoding of the “random” experiment (which consists of the selection of 6’s in the set {1,2,...,n-1}) ia binary. Put p = 2, u1 = 0, a2 = 1. For every subset Zc {1,2,...,n-1}, consider the binary string z of length %-I, defmed by z = Z~Z~...Z,-~, 1, i f i c l ,
Condition (8.1) ia obviously fulfied. (8.2) holds too, because in case n ie prime,
Take t,,n = n-1.
Condition
card{z EX’ l!(z) = n-l,f(n,z) = g(n)}
- 2”-1 > (1-2-1)2m-l
,
and in case n is composite, at least half of 6’s between 1 and n-1 satisfy the predicate W(b,n), i.e. card{z EX* It (2) = n-l,f(n,z) = g(n)} = card{z E X *
lt(z) = n - 1 , ~=~ 1 and W(6,n) holds
...,
for some b in {1,2, n-1}}
2 2n-I
n-1
-
n-1
C(
)2-k
kI0
- 2”-1-(3/2)”-1 -
= 2”-’( 1-(3/4)”-’)
> 2n-l(l-2-1), for n
2 5. 0
(8.8) Example. We consider the p.r. function by f(0,z) = 0 and for n > 0,
f :NX X*
N ,defmed
371
Chapter 4
n
,
if z contains at least one in the fvst n positions, otherwise.
01
Take c = l -l /p and t , , = n. The probabilistic algorithm f c-computes the identity function g : N -+ N,g(n) = n. 0
(8.4) Lemma. Let /:Nx X* 4 N be a probabilistic algorithm that r-computes the partial function g :PI3 N.
For every natural n in dom(g), and for every natural number t 2 1 for which there exists a recursive real p E [0,2-'] satisfying the inequality card{z
E X * lt?(z)= t , f ( n , z ) = g(n)} > (1-p)p'
,
(8.4)
card{z
EX*l!(z)
> (l-p)pr
,
(8.5)
we have:
for every r
= r,f(n,z) = g(n)}
2 t.
Proof. We proceed by induction upon s = r-t. fact (8.4). Consider the sets:
If 8
= 0 , then (8.5) is in
A = {z EX* l[(z) = r,f(n,z) = g(n))
(8.6)
and
B
= {y
EX*lg
= zui, for some
z in A and ai in X}
.
(8.7)
Suppose that cardA
> ( 1 - p ) ~ ~.
Clearly, cardB = p cardA
> (1-p)pr+' .
(8.8)
Furthermore, for every y in B (notice that t? (y) = r + l ) we have, by hypothesis and condition (8.1), f(n,g) = g(n). In view of (8.8) it follows that card{g E X * "(y) = r f l , f(n,g) = g(n)} 2 cardB > ( 1 - p ) ~ ' ~ ' . 0
372
Cdude
Remark. Lemma (8.4) holds a h when
> is replaced
.
by 2 Moreover, the recursiveness of p can be dropped here; this condition will be used in Theorem (8.5).
(DE LEEUW, MOORE and SHANNON [1956], MA" [1973]) The class of all partial functions computed by probabilistic algorithms coincides with the clasa of p.r. functions. (8.6) Theorem.
Proof. If g:N 4 N is a p.r. function, then g is c-computed by the probabilistic algorithm f :Nx X* 4 N defined by f(.,~) = g(n), for all z in X*and E = 2-2. Conversely, we shall prove that the partial function c-computed by the probabilistic algorithm f as in Defmition (8.1) ia a p.r. function. Actually we shall present a procedure which computes the value of g for an arbitrary input n in EV: 1. Run the fvst step in the computation of f(n,z), for all z in with P(z) = 1.
X*
2. If for no z in X*with P(z) = 1, the computation halts within one step, then go to step 5. 3. In the opposite case, there exists a string z in X* with e(z) = 1 and f(n,z) halts in one step. Denote by n, the output thus obtained.
If
4.
f(n,z) = nl}
card{z EX*le(z) = 1, f ( n , z ) halts in one step and > (1-c)p, then g(n) = nl. STOP.
5. Run the fvst two steps in the computation of f ( n , z ) for all z in
X*with e (2) E {1,2}.
8. If for no z in X*with [(z)= 1, the computation halts within two steps, then go to step 9.
7. In the opposite case, there exists a string z in X* with t ( z ) = 1 and f(n,z) halts within two steps. Denote by n l the output thus obtained
.
8. If card{z E X * le(z) = 1, f(n,z) halts within two steps, and f(n,z) = nl)> (1-c)p, then g(n) = n,. STOP.
9. If for no z in X*with P ( z ) = 2, the computation halts within two steps, then go to step 12.
10. In the opposite case, there exists a string z in X* with P(z) = 2 and f ( n , z ) halts within two steps. Denote by n2 the output thus obtained. 11. If card{z EX* lP(z) = 2, f ( n , z ) halts within two steps, and f(n,z) = n2}> (l-e)p2, then g(n) = n2. STOP.
12. Run the fvst three steps in the computation of f(n,z), for all
2
373
Chapter 4
in x' with t ( z ) E {1,2,3}. As.0. It is seen that the above procedure acts algorithmically (since c is a recursive real!). Two possibilities may occur. If for all natural numbers m and t , f(n,z) does not halt within m steps or card{z EX*le(z) = t , f(n,z) halts within m steps, and f(n,z) = k} 2 (l-c)pt, for every k in RV, then g(n) = a In the opposite case, there exist the natural numbers m, t , and k such that card{z E X * It (2) = t,f(n,z) halts within m steps, (8.9 1 and f(n,z) = k} > ( 1 - e ) ~ ' , and this inequality holds fnst for the given m and t . The procedure asserts that g(n) = k. Indeed, condition (8.9) cannot hold for a fmed t and different k's according to the fact that c E [0,2-']. According to (8.2), the inequality (8.9) holds at leaat for some m, k and t = te,n. Moreover, in view of relation (8.1) and Lemma (8.4), (used for p = Q, t = t,,,) for d m' 2 m and t' 2 t the inequality card{z EX* lt(z) = t', f(n,z) halts witbin m' steps, and f(n,z) = k} > (l-c)p*', holds too. 0
Fix a probabilistic algorithm given by a recursive function 4 nV which c-computes the recursive function g:RV -+ RV.
f :pV x X*
For every recursive function h :RV + RV we consider the set:
~ ( h=){(z,m) Iz EX*,m E N - { o } ,
r(Wz)),z)f g ( h ( W ) ) , card{v
EX*l l ( v ) = W , f ( h ( W ) ,
> (1-P-AP-1NPV
Y ) = s(h(C(v))N
*
(8.10)
(8.6) Lemma. The set W ( h )is a recursive M-L test.
Proof. Clearly, W ( h ) is a recursive set. If (z,m) is in W(h)L+', for some natural k 2 1, then f(h(t(z)),z) # g ( h ( t ( z ) ) ) and , c a r d b EX*lW = W , f ( h ( W ) , v = ) o(h(W))}
> (1-p ++')/(p -l))p[ > (l-p-k/(p-l))p~(*)
(=)
.
Consequently, (z,m) is in W(h)b. Finally,
374
Calude
EX*It (2) = j,(z,rn) E W ( h ) }
card{z
<_ C-W
EX*
It ( 2 ) = j , f W ( j ) , Z )
=
e(k(i)),
< PJ+-P-/(P-WPj
.
= p'"/(p-l)
Fix an universal KOLMOGOROV algorithm w and an universal M-L teat U (see Defmitiona (2.10) and (3.11)). Recall that K = K, is the KOLMOGOROV complexity induced by w , and rn = m u is the critical level induced by U.
(8.7) Theorem. (CALUDE and ZIMAM) [1984]) Let f : N x
g,h :hT + N ,be three recursive functions.
X*
3
N,
Assume that: A) f is a probabilistic algorithm that ecomputea g. B) For every natural n there exist a natural tn and a recursive real p,, E [0,2-'] such that:
lim)c,=o
n -cm
,
(8.11)
and card{z E X * lt(z) = t , , , f ( n , t )= g(n)} 2 (l-pn)pt"
.
(8.12)
2 no
Then there elcists a natural number n, such that for every n satisfying n =
h(t(y)), and 4(y) 2 t,, for some y in X*
,
(8.13)
we have
f ( n 4= o ( 4 for every random string z in X*such that n
7
=
h(4 (2)).
Proof. In view of Lemma (8.6) and Theorem (3.10) one
geta a natural
i 2 1 such that: rnW(h)(a)
5 m(z)+i
7
(8.14)
for every a in x*. Let q be the constant furnished by Theorem (3.16) for the pair (w ,U), and put: kn = P ~ ~ ( l / ~ n ( p - l ) ) ] - ( g + ~ + l *)
(8.15)
In view of (8.11) there exists a natural number nosuch that kn
> 0,
375
Chapter 4
for every n 2 no. Let k = knk. We shall prove that for each n 2 no, if there exists a string y with h ( P ( y ) ) = n and t ( p ) 2 t,, then f(n,z) = g(n), for all random strings z such that h ( P ( z ) )= n. We proceed by rcduetio ad absurdum. Suppose z to be random, n = h ( t ( 2 ) )2 ti,, a d
f ( n , z ) # o(n)
(8.16)
In view of Lemma (8.4) (see also the Remark which follows) and the hypothesis (8.12) we have: card{z
EX' lP (2)
= t! (z),f(n,z) = g(n)}
.
2 (1-pn)P
(8.17)
From the construction of the critical level we conclude that (z,rnw(k)(z)+l) !$ W(h). Hence: card{z EX' l t ( z ) = !(z),f(n,z) = o(n))
s (1-P
-by*)(=)+1) /(P -1))P l ( = )
(8.18)
Combining the inequalities (8.17) and (8.18) we obtain the relation
Pn
2P
-c"'y*fi)f',
AP-1)
s
or, equivalently,
~ w ( A ) (2z )[logp(l/~n(~-1))J-1
-
(8.19)
*
(8.20)
From (8.14) and (8.19) it follows: m(z)
2 [logp(l/~n(~-1))]-(i+1)
-
Finally, we use Theorem (3.16) which has furnished the constant q and the relation (8.20):
K ( z It (4)I e (z)-+)+q
I
(z)+(q +i+ 1)-Pogp(1/pn (~-1))l = P(z)-k,
<+) since k,
> 0.
9
We contradict the randomness of z.
-
376
Cdudt
Remarks. a) The set RAND is not r.e. (Corollary (4.4)). Consequently, we cannot practically convert each probabilistic algorithm satisfying the hypotheses of Theorem (8.7) into an equivalent deterministic one. b) In view of Theorem (2.11), card{z E X*(!
(2)
= t&(z It (z))2 t}.p-'
< l/(p-1)
,
i.e. the probability that astring z is random is greater than (p-2)/(p-l). c) The consistency of Theorem (8.7) follows from Theorem (8.8) which shows that the MILLER and W I N , and SOLOVAY and STRASSEN pr*maIity tests satiafy hypothesis B) in Theorem (8.7). (8.8) Theorem. For almost all inputa n, the probabilistic algorithm of MILLER and W I N , and SOLOVAY and STRASSEN are error-free in case the encoding of the coin tosses is a random binary string.
Proof. We consider the recursive function h : N + N ,h(n) = n + l , and we set, for every natural number n, pn = 2-['"!4, tn = n n l . For every natural number n 2 5, the condition (8.12) folIows from (8.3). Since limp,, = 0, the condition B) in Theorem (8.7) holds. Conen
-00
quently, for almost all n, and every random string z in X* with P ( z ) = i - 1 , the primality tests of MILLER and W I N , and SOLOVAY and STRASSEN are error-free.
Remark. A slightly diierent version of Theorem (8.8) was fvst proved by CHAITIN and SCHWARTZ 119781.
4.9.BISTORY
The concept of program sire structure waa fust studied by SOLOMONOFF (19641, KOLMOGOROV [1965], and CHAITIN [1966]. CHAITIN [1977] credited MINSKY [1962] for the fvst publication of these ideas. Since that time, a number of different measures of program sise complexity have been introduced and studied, for instance BLUM [1967b],
Chapter 4
377
LOWLAND [1969], CHAITM [1975]. AU these measures, though differing in the programming language used and in the the additional information helping the computation, and in spite of varioue tradeoffs (see DALEY [1980]), have the same asymptotic properties. A comparative analysis was done in KATSEFF and SIPSER [1981]. The basic link between the KOLMOGOROV notion of randomness and the statistical tests was discovered by MARTIN-LOF [1966a] and [1966b]. He extended this study for arbitrary sequences. There some pathological phenomena occur (see CALUDE and CHITESCU [1983b]). See also FINE [1973] and NALlMOV [1981] for a critical discussion. The non-binary approach was investigated by CALUDE and CHITESCU [1982a], [1982b], [1983a]. The infmite oscillations of the complexity have been first announced by MARTIN-LOF [1965]. Detailed proofs appear in MARTIN-LOF [1971] and KATSEFF [1978] (see ale0 KATSEFF and SIPSER [1981]). Useful overviews can be found in MARTIN-LOF [1966a], ZVONKIN and LEVIN (19701, CHATTIN (19771, SCHNORR [1977], USPENSKY and SEMENOV [1981]; MANIN [1977] gives a hint of some results concerning KOLMOGOROV’s complexity in a slight different context. Related works are: KNUTH [1969], KAMAE [1973]. See ae0 KOLMOGOROV [1968], [19831. MANIN [1981] contains an interesting informal discussion of the basic resuits overviewed in Section 4.2. Many applications in biology, mathematical logic, cryptography and algorithmic information theory were developed: for related work see L. BLUM and BLUM [1975], CHAITIN [1977], COOK [1983].
4.10.
EXERCISES AND PROBLEMS
Section 4.2
ax*
(10.1) Let b:X* x nV be a p.r. function. For every z in X* and 0 < i 5 4(z), denote by z(i) the i t h prefm of 2, i.e. z ( i ) C z and e(z(i))= i. Pu t
378
Cdudr
l+(u,i)
D ( ~ , z= ) {y EX*
= z(i), for every
o < i 5 t (2))
.
Following LOVELAND [1969], defme the uniform eomplezity to be the partial function
induced by
+
K,( ; ) :x* x pv A N ,
i-, &(!
K,(z;t(z)) =
(Y)
Iv
E W , z ) ) ,if W , z )# otherwise.
0,
a) Check the validity of Lemma (2.7) and Corollary (2.8) using the uniform complexity inatead of KOLMOGOROV'a complexity. b) Show the existence of a p.r. function q:X* x JV 4 X *such that for every p.r. function d:X* x RV 4 X * there exists a constant e (depending upon 9 and +) such that
K & ; W ) 5 K,(z;+))+e for every z in
(10.1)
9
x*.
(10.2) Evaluate the difference I K,(z l-!?(z))-K,,(z;t(z)) I, for a fixed p.r. function satisfying condition (10.1) in Exercise (10.1). (10.3) (LOWLAND [lSSS]) Let f :N4 X * he a function. Show that f is recuraive iff K , . ( f ( n ) In) < e , for some conatant e in N ,and all n E IV;w :X*x JV 4 X is an univeraal KOLMOGOROV algorithm. (10.4) (LOVELAND [1969]) Recall the function rev:X* defmed in Exercise (1.10.23) by rev(1) = 1, rev(ail...a. ' k ) = ai k ...ail. Let w :X*x Bv A X *be a universal KOLMOGOROV algorithm. a) Show the existence of a constant q m EV such that
-x*
lK,(z for all z in
lW)-Kw(rev(z)
I++)))
I
?
(10.2)
x*.
b) Show that the uniform complexity induced by a p.r. function q satisfying (10.1) lacks the property (10.2). Section 4.8
(10.5) Construct a function f :mX IV .-+ PV eatk~fyingthe conditions (3.1)-(3.3) in Example (3.1). (10.8) (MARTIN-LOF [1966a]) Consider the M-L test in Example (3.1). Prove the existence of a constant c such that for every natural number n,
I2*s,-n
I<
f ( n - K ( z l...z, In)+c,n)
.
(10.3)
(10.7) (MARTIN-LOF [1966a]) Use the M O W and LAPLACE
Chapter 4
379
Theorem to prove that in the context of Exercise (l0.6),
where
Conclude that
1 2-en-n I is of the order of magnitude & provided
K ( zl...zn In) approximately equals ta. (10.8) (LOVELAND [1969]) Let V be a M-L test, n > m 2 1 two natural numbers and e = n-m. A string z in V, with t (2) = n is said to be terminal for claes c at m provided there does not exiet a string y in Vm+lwith !(y) = n + l , and J 3 2. Denote by r ( V ) the set of all terminal strings for claw c at r, for 1 5 r < m. A M-L test V is said to be an uniform M-L teat provided for d natural numbers n > m 2 1 we have:
card{z E X * It ( 2 ) = n , E~ Vm}+ cardc+(V)
*
(10.4)
a) Show that the set of aIl uniform M-L teats is r.e. b) Prove the existence of an universal uniform M-L test (i.e. an uniform M-L test satisfying condition (3.12) for the clam of d uniform M-L tests). c) Restate Theorem (3.16) for the uniform complexity and uniform M-L tests. (10.9) Does there exist a universal M-L test which is uniform?
(10.10) Exhibit a proof of Theorem (3.17) making no use of Theorem (3.16).
Section 4.4 (10.11) Is every universal M-L test non-recursive? (10.12) Is the set
X*-RAND, r.e. for some natural m?
(10.13) (Open) Is Corollary (4.16) a consequence of Theorem (2.6.15)? Check also the converse implication.
380
Cdudc
Sectton 4.6
(10.14) Is the universal M-L teat Theorem (3.10)representable?
U constructed in the proof of
(10.15)Does there exist a non-representable universal M-L teat? (10.16) (STAIGER (19843) Use Theorem (5.12) t o obtain a direct proof of Theorem (5.6). (10.17) (ZVONKIN and LEVIN [1970)) Let p.r. function satisfying the inequality
$:X*x N AX' be
a
I+))
F K,(z l W ) + C r (10.5) for every p.r. function 4:X' x nV a x *and each z in X'; here the conthere exist a stant e depends upon + and b. Show that for every u in X*, K,(z
natural 8 (depending upon $ and u) such that
K,(z for each z in
I+)) L K,(uz l w 4 ) + 8
?
X*.
(10.18) (CALUDE, CHITESCU and STAIGER [1985] (added in x Bv be a p.r. function. Then the following proof)) Let $:X* statements are equivalent:
ax'
a) The p.r. function $ satiafiea (10.5). b) For every M-L test V, there exists a natural number q (depending upon V and 4) such that
mv(4 for all z in
x*.
L e (z)-&(z
lW)+Q
?
c) The M-L teat V($) is universal and there is a natural number d such that K,(z I t ( = ) )5 ! ( z ) + d , for each z in X'.
(10.19)Use the above exercise to derive Theorem (3.16) in a direct way. Section 4.6
(10.20) (STAIGER (19841) A M-L test W ia called weakly recursive in case the set <(z,mw(z)) Iz E W,}ia r.e. Show that every recursive M-L teat is weakly recursive but the converae implication is falae. (10.2l) (CALUDE, CHITESCU and STAIGER [1985]) Show that every weakly recuraive M-L test is uniformly embeddable into a weakly recursive representable M-L test. (10.22) Show that Theorem (6.2)in valid for weakly recursive M-L tests. (10.23) Exhibit an a a m p l e of a M-L test which is not weakly
381
Chapter 4
recursive. (10.24) Show that the M-L test W is recursive and satisfies condition (6.10) in Theorem (6.2) iff W is representable by a (total) recursive func-
tion. (10.25) Show that the M-L test W is weakly recursive and sathies condition (6.10) in Theorem (6.2) iff W is representable by an injective p.r. function.
SectSon 4.7 (10.26) (CALUDE and CHITESCU [1983b]) For each z in X*, put zX" = {y EX" I y ( t (2)) = z},in case z # X, and AX" = X".
a) Sow that the set of all fmite mutually disjoint unions of sets of the form z x " generates a o-algebra C.
b) Prove that the computable function p:{zXo31zE X'} given by
p(2X.q = p+)
,
induces a probability p on C (i.e. the LEBESGUE probability). (10.27) (MARTIN-LOF [1971]) Let f : N + RV be such that
iro
Show that with LEBESGUE probability one, for each x in Xo3, K,(x(n) In)
Here w
2 n-f(n)
a.e.
:x'x PJ a x *is an universal KOLMOGOROV algorithm.
-+
[0,1]
This Page Intentionally Left Blank
383
CHAPTER 8
6. SUBRECURSTVE PROGRAMMING HIERARCHIES
This chapter contains an analysis of mme subrecursive hierarchies built on the restricted use of a few natural programming schemes. We are dealing with dynamic complexity (the number of instructions that a program performs on a given input), programming efficiency (the computational capacity of programming schemes), sire complexity (the total number of characters of a program), and various trade-offs between these criteria.
6.1. EXAMPLES
This is a short section aiming to present some natural questions motivating the material reviewed in the remainder of the chapter. The starting point of these investigations is due to CLEAVE [1963], and MEYER and RITCHIE [1967a], [1967b] who have used certain theoretical programming languages to obtain a syntactical description of GRZEGORCZYK classes. The attempts to establish claasifkations of computabIe functions in terms of natural algorithmic schemes lead to certain hierarchies defined by means of subrecursive programming languages. The converse influence holds too: the efficiency of programming languages, and therefore of prog r a m as well, can be measured by means of subrecursive classes of functions. In this respect, the following question is the fwst to mind: What is the best strategy in selecting formalism (he. programming languages) for computing the primitive recursive functions (or other functions of a subrecursive class having certain reasonable properties)? More precisely, is an universal programming language (i.e. a programming language powerful enough to compute all p.r. functions) preferable to a restricted subset
384
Calude
whose computational capacity reduces exactly to primitive recursive functions?
BLUM [1967b] gave evidence that if we look for economical sire prog r a m , then the answer to this question is affumative. With respect to the class of all p.r. functions most decision problem have been proved to be undecidable. Hence, most decision problems concerning arbitrary universal programming languages are undecidable. Reetricting the class of programs we expect more decision problems to be decidable as their computational capacity diminishes. Hence, two natural questions arise: 1) Under what restrictions concerning a claas of program can we effectively decide about its fundamental problem, i.e. the equivalence between program in the class?, 2) Can the barrier undecidability f decidability be described in terms of program site? The works of MEYER and RITCHIE [1967a], [1967b] and TSICHRITZIS [1970] show that both questions can be answered affirmatively. A third problem concerns the trade-offs between the number of steps executed by a certain program and its “siae”, i.e. its total number of characters. In this respect, BLUM [1967b] has proved that, for sufficiently complex functions f , a decrease of the sire of a program computing f b followed only by a negligible increase in the number of performed steps.
6.2.
THE LOOP LANGUAGE
In this section we present the subrecursive investigate its global computational capacity.
LOOP language and
MEYER and RITCHIE [1967a], [1967b] defmed the LOOP language using instructions of the following five types:
x=o
(2.1)
X=Y
(2.2)
x
=
LOOP
END
x+l x
(2.3 1 (2.4) (2.5 1
Here X and Y are names for registers. We shall use capital Latin letters {posribly with indices) to denote register names. Each register may
385
Chapter 6
contain an arbitrary natural number and the set of all available registers is infinite. The content of the register X will be denoted by 2.
(1.1) DeRnttion. The set L - of all loop programs is inductively defmed by the f~llowingrules: Each instruction of type (2.1)-(2.3) an well aa the empty program are in
L- .
(2.6)
If P and Q are in L,then the concatenation program P defmed by P
Q
is also in
L-
If P is in L, - then the program defmed by LO0P.X
P END isalsoin L. Sometimes we also specify the INPUT/OUTPUT registers used in the program in L. Hence, a loop program begins with an INPUT statement which design& the input registers of the program, and ends with an OUTPUT statement which names the output register. The fwst three types of instructions (also called arithmetical instructions) have the following obvious interpretations: “X = 0” means that the content of X is set to sero (clear register X),“X = Y” means the transfer of the actual content of register Y to register X (the previous content of X dieappears and the content of Y remains unchanged), “X = X+l” means that we add 1 to the actual content of X. The instructions in a loop program are normally executed in the order they occur in the program. The LOOP and END instructions determine the repetitive execution of a group of instructions. Each LOOP is paired with a unique END. The variable named in the LOOP instruction is called the loop variable. The group of inetructions following LOOP, including its associated END is called the scope of the loop. The sequence LOOP
x P
386
Cdude
END determines the X times execution of P, if z > 0, and i s ignored in case z = 0. There are no restrictions on uses of the loop variable within the scope of the loop. Notice that the execution process may change the value of the loop variable only by an arithmetical instruction; this change does not affect the number of executions of the loop scope. For example, the loop program
x
INPUT LOOP
x x = x+l
EM) OUTPUT
x
can be equivalently written
INPUT X
Y=X LOOP
x Y = Y+l
END
X=Y OUTPUT X (2.2) Definition. A function f : W ' + I?, rn
2 1, is called a
computable function provided there exists a program P in XI,...,Xmaa input registers and Y as output register such that
loop-
L having 3 we hi-
tially input zl, ...,z,, in XI,...$,,,, respectively, and set all remaining registers to rero, then P halts (i.e. one attains the output statement) and the content of Y is = f ( z l , 2,). Notice that Y may be one of the Xi's.
...,
Denote by
L the set of all loop-computable functions.
Remark. Due to the specific form of the instructions composing the loop programs it follows that each such program always halts. (2.a) Example. The loop program
INPUTX,
LOOP
x Y
END
=
OUTPUT Y
Y
Y+l
Chapter 5
387
computes the sum function: z+y. 0
(2.4) Example. The predecessor function P d ( z ) = z Q1 puted by the loop program
INPUT
z=o
can be com-
x
Y=Z
LOOP
x
Y=z
2 = z+1 END
OUTPUT
Y
(2.6) Example. The arithmetical difference function z p y is loopcomputable:
INPUT x, Y LOOP Y z1 = 0 Y1= z1 LOOP x
Y1= 21 21 = Zl+l
END
x = Yl END
OUTPUT
x
Remark. In view of Example (2.4) we may write, in a short form, the program displayed in Example (2.5) as follows:
INPUTX, Y
LOOP Y
X=X&l
END
OUTPUT x It is worth noticing that the above compact form is not just a correct loop program, for the simple reason that X = X A1 is not a permissible
388
Cdudc
instruction. The reader can easily realire that the introduction of such “subroutines”, which can be replaced by loop programs, does not affect the correctness of our reasonings. (2.6) Example. The sign function ao(z) is loop-computed by the pro-
gram
INPUT Y=O
x
Y = Y+l LOOP
x
Y=O
END OUTPUT Y U
Remark. It ie seen that the introduction of “dummy” input registers does not affect the correctness of loop program.. The main result of this section is (2.7) Theorem. (MEYER and RITCHIE [1967a], [1967b)) The class of primitive recursive functions coincides with L.
Proof. To prove that every primitive recursive function is loopcomputable we proceed by structural induction (see Defmition (1.3.1)). Firstly, we write the following loop programs which compute the base func tions: Succ(2) = z + l :
E(Z1,...,2 ” ) = zi: Cnr(Z1, ...,2,) = rn:
INPUT x x = x+l OUTPUT X INPUT X,, ..,.X, OUTPUT xi INPUT XI, ...&
Y=O
Y = Y+l Y = Y+l m times
Y = Y+1 OUTPUT Y
Chapter 5
389
Secondly, we prove the closure under functional composition and primitive recursion. If f :mi"' --+ IV, n 2 1, is obtained by functional composition from the functions h :RV"' -+ N ,m 2 1, and gl,. ..,om :W + N , then f is computed by the following loop program:
2 , = 9m(Xl,...Jn) Y = h(Z1,...,Z,,,) OUTPUT Y provided h and gi, 1 5 i 5 m are all loopcomputable. Notice the use of the subroutines computing the functions h and pi, 1 5 i 5 m, in the program above. If f:W+'--+ N ,n 2 0, comes by primitive recursion from the loop-computable functions g :W+ IV and h :BV"+' --+ RV, then f can be computed by the 1oop.program
INPUT XI,..&, 2 y = dXl,...Jn)
u=o
LOOP 2 y = h(Xl,...Jn ,u,q
u = u+1
END OUTPUT Y
(2.9)
The correctness of the above program can be proved by induction the content of 2 by noticing, a t the induction step, that the prograp (2.9) on the inputs z l ,...,z,, and z = n+l,is equivalent to the program
390
Caludc
on the inputa zl, ...,q,,and z = rn. (Recall that the content of the register 2 is 2 . ) The converse implication, i.e. every loopcomputable function is primitive recursive, w i l l be proved by induction on the length of loop prog r a m (i.e. on the number of instructions of type (2.1)-(2.5) occurring in the programs). Obviously, the programs having no instructions, M well as the programa consisting of a single instruction compute primitive recursive functions. Let P be a loop program consisting of more than one instruction with Xl, ...& as input registers and Xi, 1 5 i 5 n, as output register. Assume that all loop programs with fewer instructions than P compute only primitive recursive functions. We shall prove that P itaelf computes a certain primitive recursive function. The proof falls into two cases according to the form of the last instruction (recall that the declarative statements INPUT/OUTPUT do not count in our inductive analysis). cusc 1: the lust i n s t r u c t i o n in P i s not END. It foflows that the last
instruction in P must be of type (2.1), or (2.2), or (2.3), since the LOOP instruction is always followed by an associated END. The program P can be of the following three forms: a)
INPUT Xi,...,X,,
Q
x=o
OUTPUT Xi
b) INPUT Xi,...J,,
Q
X=Y OUTPUT Xi C) INPUT Xl,,..J,,
Q
x = X+l
OUTPUT Xi
where Q is a loop program. In subcase a) the output ia 0 in case X = Xi, or is exactly the output given by the loop program Q (which must have fewer instructions than P), in case X # Xi. Consequently, the function computed by P ia either Cp)(zl,...,z,,), or the primitive recursive function computed by Q. The reader can now easily supply the details necessary for proving that in subcaees b) and c) the program P also computes a primitive recursive function. Cusc 2 the Zast i n a t r u e t i o n in
P
i s END. Then
P must be of the
391
Chapter 5
form
xl, ...,& xj
INPUT
Q LOOP
R END OUTPUT xi where Q and R are loop program for which the induction hypothesis ...& and the outapplies. Assume that Q and R (with input registers Xl, put register Xt) compute the primitive recursive functions q,:W + N and r, :W-+ N ,respectively; here 1 5 t 5 n. It is seen that the above hypothesis does not decrease the generality since we can suppose that
Xl,...,Xnare all registers appearing in P. Denote by fi:W + nV the function computed by P. By induction on the value q,(zl,...,2,) (i.e. the value of the loop variable Xi) we can prove that
fi (z1,.**+n) = S(q1(z1,*+n
),.*.,qn
(zl,..*,z))n
9
(2.10)
where
6.8.
LOOP HIERARCHIES
A hierarchy (L,),zo of *the class of primitive recursive functions, barred on the depth of the nesting measure for loop programs, ia
392
Caludc
constructed. A refmement of this hierarchy is obtained by counting the number of instructions of depth n (we intersperse a new hierarchy (Li)k,o between LnAl and L,,). We begin with the hierarchy (L.), 20.
(MEYER and RITCHIE (1967aI) a) Denote by Lo - the set of all loop programs having no loops (i.e.
(8.1) Definition.
the set of all finite, possibly empty, sequences of arithmetical instructions limited by INPUT/OUTPUT statements). For every natural n 2 1, the set L , is generated by the following three rules: -
If P is in
then the loop program consisting of
LOOP x
P
END and arbitrary INPUT/OUTPUT statements is also in L,. -
If P and Q are in L,, then the loop program consisting of
P
Q
and arbitrary INPUT/OUTPUT statements is also in
b)
Ln. A program P in L,, - Ln-,has a depth of m e t i n g n.
(3.3)
c ) Denote by L,, the set of all number-theoretic functions which are computable by loop programs in I,.
(1.2) Example. AU loop programs that compute the base functions in the proof of Theorem (2.7) have depth of nesting 0, so they belong to Lo. 0
(8.8) Example. The program computing the sum function in Example (2.3) has depth of nesting 1. 0
393
Chapter 6
Remark. From Defmition (3.1) it follows that 00
Lo
C
L1
C.*C Ln C-*C L =
U Li
(3.4)
i4
Our fvst aim is to prove that (3.4) is a proper hierarchy of the class of primitive recursive functions. In view of Theorem (2.7) all it remains to prove is that Ln # L,+l, for all naturals n. To this aim we defme the following sequence of unary functions. For each n 2 0, the function t, :IV + EV is defmed by
1, 2 , to(.) = 2+2
ifz=o, ifz=l, , otherwise,
tn+,(z) = t,L(1)
(Recall that f " ( y ) = f(f(...f(y)...)), z times, for z The following formulas are obvious *l(') =
i
(3.5)
*
> 0, and
fo(y) = y.)
1, ifz=o, 2 *z, otherwise,
t z ( z )= 2"
, ifz=o,
(t,),,
The next result gives the monotonicity properties of the sequence >d. The proof by induction will be omitted.
(a.4) Lemma. The following assertions hold:
tn(z)2 z+l, for all n and z
,
(3.8)
The function f :Ns + N given by j(n,k,z) = tn)(z) is increasing in all arguments,
(3.7)
2 * t ; ( z ) 5 t:+'(z), for all
(34
k,z 2 0, and
21 z+tn)(z) 5 t;+'(z), for all k,z 2 0, and n 2 1 n
,
.
(3.9)
394
Cdudc
For all naturals n and k we can fmd a natural j (depending upon k) such that t,t(z)
< tn+l(z), for all z 2 j .
(3.10)
P having the input registers we associate the czeeution time function
(8.6) Definition. To every loop program
X,,
...&
Timep:hF -+
IN ,
...,
given by Timcp(zl, z,) = the number of instructions executed by P on We make the following counting convention: a) the exeinput (zl, ...,2.), cution of an arithmetical instruction increases by one the number of executed instructions, b) the LOOP statement counts only a loop in entered, c) the END statement counts each time the program reaches the end of the loop, d) the INPUT/OUTPUT statements do not count. (8.6) Exampie. Let P be the loop program in Example (2.4). Timep(l) = 6, Timep(2) = 9.
Then 0
Remark. We can think that Time is the restriction to the class of primitive recursive functions of a certain BLUM complexity measure (acting on a suitable “larger” universal programming language). See Section 5.4.
Ln,
(8.7) Lemma. if P in a program in n 2 0, with X, registers, then we can effectively fmd a natural t such that Timep(zl,
...,z,) 5 t,t(max(zl,...,2,))
,
,...J,
as input
(3.11)
for all z,,...,z , in Af.
Proof. We proceed by induction on n. In case n = 0, no loop belongs to P, so Timcp(zl, z,) = constant = the number of arithmetical instructions in P. Consequently, we can take k to be the constant above, and the result follows from (3.5) and (3.6). Aaaume that (3.11) holds for some n 2 0, and let P be a program in L,+,. In view of Defmition (3.1), we must analyse three cases, according to the fmal rule used in the construction of P. Case 1. The program P is in fact in L,,.In t h i case the result follows from the inductive hypothesis and (3.7): Case 2. The program P is of the form
...,
395
Chapter 5
xl,...J, xj
INPUT LOOP
P
END
OUTPUT where
P
xi
is in
X1,...J,,,are
Sn (without
all registers in
losa of generality we have assumed that
P). Denote by g the value max(zl,...,2,).
If n = 0,-then P' is in go, so k, for some k 2 0, (here k is the number of arirhmetic d instructions composing P). Consequently, n'mcp(zl, ...,z , ) = l+(l+k)zj 5 1 + ( 1 + k b <_ t;+'k). If n > 0, then, by hypothesis, we can effectively fmd a const& k such that
Again we proceed by cases.
...,
n'mep(zl,
2 ),
=
n'mcp(zl,...,z*)
I t:(m=(zl,...,Z,))
,
for all zl,...,z, in N.It is seen that after the fvat execution of tent of each X,,1 _< 8 m , must be less than
<
(see (3.9)).
P the con-
The next execution will produce values less than
again by (3.9). It is seen, by induction, that the loop instruction will produce values less than
(Recall that zj is the content of Xj.) This is also a bound on the number of instructions required for z j executions of P.Consequently,
...,2,) < 1+g+t#@+')(z) I l+z -+t#'i+l'(t#(l))
n'mcp(zl,
= l+g -+ t # @ + q l )
= 1+g+ tn+l(td:f
k))
< tlZ::&)+td::ki) I tZl :(g1
'
We have used, in order, the bound just established, the inequality tr(1) > m, the inequalities ti:i(m) 2 t:+'(m) = 2'+'m 2 m(k+2), for m, k _> 1, and (3.6), (3.8).
396
Cdudc
Case 9. The program
P ia of the form
INPUT XI, ...Jm PI
PZ
OUTPUT xi Each program P, may be in &,, or &,,+I; in where Pi, j=1,2, are in the laat case, Pjmust be of the form in Case 2. Four cases may appear according to Pj being in L, - or in & n + l . The result follows from the formula Tirncp(z,,...,)2, = Tirnepl(zl,...,z ,) + Timep,(zl ,...,z,), the induction hypothesis, the analysis made in Case 2, and (3.8). U
(8.8) Corollary. If f : P + JV, rn 2 1, is in L,, n 2 0, with XI,...,Xm as input registers, then we can effectively fmd a natural k 2 1 such that f(21,--,zrn)
for all zl,. ..,z, in
L t:(mm(z1,**+m,1))
(3.12)
RV.
Proof. Let P be a program in L, - that computes f . For n = 0, if P has k arithmetical instructions, then
f (zl,...,2,) <_ mm(zl, ...,z,)+Tirnep(zl ,...,)2,
I tf(m=(z1,...,2,,1)) all zl, ...,z , in N ,because each instruction can increase 9
for at most one. In case n Timep(zl,...,z,)
a variable by
> 0 we 5
use Lemma (3.7) to obtain a constant k such that tt(max(zl,...,2,)). It follows that
f (zl,...,zm) 5 max(z 1,...,zm)+ Timep(z1,...,2,) 5 max(zl,...,z,)+t~(max(zl, ...,2,)) 2 tnLf1(max(Z1,...,2,,1))
,
for all z 1,...,2 , in N (we have used (3.9)).
(8.9) Theorem. Ln-l f
L,.
(MEYER and R I T C H E [1967a]) For every
n >0,
397
Chapter 5
We show that tn EL,-L,,-l.
For all naturala n and k, t,(z) > for all z > j , where j is a certain natural depending upon k (see (3.10)). Hence, by Corollary (3.8), t, cannot be in L,-l. To complete the proof it suffices to show that t, EL,, for each n 2 1. The following program in
Proof.
INPUT X Y=O Y = Y+l LOOP
x
x = x+l
Y=X END OUTPUT Y computes the function t , . If t, is computed by some program in the program computing tnfl
INPUT
&,,
then
x
Y=O Y = Y+l
LOOP
x
Y = tn(Y) END OUTPUT Y hence will be clearly in L,+,, Remark. It is seen that t ,
tn+l is in f n + l .
B La.
Notation. The hierarchy (Ln)n20is known as the loop hierarchy. We are going to refme the loop hierarchy by additionally counting the number of in8truetions of depth n . This number will be called the loop-concatenation number.
(8.10)Definition. (GOETZEand NEHRLICH [1978]) n > 0, the smallest class of programs in a) Denote by that
&A,
hn-1
C &n 1
and if Pi is in Ln-l for i=1,2,3, then the loop program consisting of
k
such (3.13)
398
Cdude
LOOP x
p2 END ps (3.14) and arbitrary INFWT/OUTPUT statements is also in L,!. - n > 0, consists of all concatenations of k b) For k > 1, the class L:, 1 programs in L,,. c) denotes the set of all number-theoretic functions computable by programs in 4;. -
f.:
Notation. It is convenient to introduce the following notations. If A and sets of loop programs, then we denote by A 2 the set of all programs consisting of
E are
P
Q
where P E A, Q El?, and arbitrary INPUT/OUTPUT statements. By A('), k 2 1, we abbreviate the expression A &..A,k times. Finally, by < A > we denote the set of all programs
LOOP
x P
END (with P
E A and arbitrary INPUT/OUTPUT statements).
Remarke. a) For all naturals n
2 0, i 2 1,
=
L,,.
b) Using the just introduced notation we can write the formula > k,,-l)('), for all n , k > o (trivially, ~i = kn-1).
k: = kn-l ( <
(8.11) Definition. A program P haa the depth of nesting lees than n and the loop-concatenation number k, provided P i 8 in &I-&;-'.
(8.12) Example. For
n
> 0, the class
includes all program of the form
399
Ch8pter 6
END ps
LOOP
xj PI
END
ps OUTPUT x, where Pl,...,P are s all programs in L,-,. 0
(8.18) Example. The loop program in Example (2.3), computing the sum - > C La < &, > = & I1. function, belongs to < La
Lo
U
(8.14) Example. The function t , lies in Li. Indeed, the following program in I;, computes the function t 2 ( z )= 2':
INPUT X Y=O Y = Y+l LOOP
x
LOOP Y
Y = Y+l
END
END OUTPUT Y 0
(8.16) Example. Using the above loop program we can easily show that the function
t s ( t i ( 2 ) )= 2
is in
..
'
1
(2'
times)
,
L;.
Remark. From Defmition (3.10)it followa that a,
L,-l
c L: c LX c...c L, = u L: .
(3.15)
k-1
An in case of the clasaee L, we show, using appropriate bounding functions, that (3.16) b a proper hierarchy.
400
Cdudc
For all naturals p 2 0, k 2 1, and n 2 2 we define the function bt'P:IN + N ,by b:iP(z) = trf(tX-l(z)). The following lemma syntheeixes some monotonicity properties of the functions As in case of Lemma (3.4), we leave the proof to the reader. b:Ip.
(8.18) Lemma. The following assertions hold: If rn
< n, then tm(tn(z))5 tn(to(z)),for all z 2 0 . 2 0, t 3 y ) I tn+l(z+Y) * 2 0, k 2 1, (b,!*p)k(z) 5 b,$b(z)
For all n,=,Y For all n,p,z
(3.18) (3.17)
.
(3.18) 0
(8.17) Lemma. If n 2 2, k,q 2 1, then for every f : N q--c nV in can effectively find a constant p 2 1 such that f(ZI,...,Zq)
for all zl, ...,z9 in
s P(m+1,...
,zq,l))
9
fi we (3.19)
RV.
Proof. We divide the proof into three cases.
>. is computed by some program < From Corollary (3.8) and (3.17) we effectively get a constant p 2 1 such Case 1. The function f
that
Chapter 5
=
401
6,'!!F+'(max(z ,...,z9,1)) .
The constants p and e come from Corollary (3.8), and r was furnished by Case 1. We have also used (3.18). Case 9. The function f is computed by some program in = &,,-I( < &,,-I > L,-l)(k)= (&-I < L n - 1 > Ln-l)(k)p (see the Remarks following Defmition (3.10)). Using (3.17), t i e result just proved in Case 2, and (3.18), we deduce
Li
f .(
l,"Vzq)
5 (b,")L(max(z1,*..,z9,1)) < b,""(max(zI ,...,zq,l))
> 0 we
can fmd a natural j 2 0
6,'J'(z) < b,'+lVo(z) ,
(3.20)
(8.18) Lemma. For all naturala n,k,p such that
for all z
.
2 j.
Proof. By (3.10) we can fmd the natural j such that t,P-l(z)
< t , ( z ) , for
all z 2 j. Hence
6fSP(z) = t: (t: -1 (Z ))
< t,t(tn(z)) = t,'+'(z) = b,'+'nO(z)
,
for all z 2 j. We are now ready to show that ( f ,')k o, is really a hierarchy. (8.19) Theorem. (GOETZE and NEHRLICH [1978], [1980]) If n 2 2, then all inclusions in (3.15) are proper.
e
Proof. First, Lndl # LA because t , is in L i,but t, L (see the proof of Theorem (3.9)). We shall prove that t,' is in f,'-L,'-', for all k 2 2. From the con2, and p 2 0 . Hence, struction it follows that 6;" is in f,', for all k,n t,'(z) = t,"(t,"-l(z)) = 6ita(2) lies in L,'. To prove that t,' f,'-' we proceed by reduetio ad abeurdum. If t," is in Li-', then from Lemma (3.17), we get a constant p 21 such that t:(z) 5 b,'-lBP(z)< 6i"(z) = tf(z), for all z 2 max(i,l); here j comes from
>
e
402
Cdude
Lemma (3.18). We get a contradiction, thus ending the proof. 0
The hierarchy
6.4. A
(fi)m,k o, is called the loop-concatenation hierarchy.
UNIVERSAL LANGUAGE
We enlarge the list of instructions used in loop programs by a conditional instruction and a punctuation instruction. In this way, the corresponding class of computed functions becomes the family of all p.r. functions. The time execution of the extended class of programs will become an useful computational complexity measure; we shall use it in further investigations.
To the five instructions (2.1)-(2.5) used in defining the LOOP language we add two new instructions, namely: I F X z 0 GO TO La
La
(44
CONTINUE
(4.2)
where ((La”may be replaced by an arbitrary element from an infinite set of labels. Instruction (4.1) tests the content of the register X ; if the content of X is not equal to sero, then the next instruction executed is the one with label (‘La”; in the opposite case, i.e. when the content of X is equal to Lero, the next instruction executed is the one following it. Instruction (4.2) does nothing; it merely plays a punctuation role; the next instruction executed in the one following it.
(4.1) Definitlon. (MACHTEY [1972]) The set grams is inductively defined by the following rules:
UL of all
general pro-
Each instruction of type (2.1)-(2.3) aa well
aa the empty program are in
UL
.
If P and Q are in UL and have n o labels i n common, then the concatenation program
P
Q
(4.3)
403
Chapter 6
is also in UL.
(4.4)
LOOP x P END is a h in UL.
(4.5)
If P is in UL and docs n o t e o n t a i n
the label "La", then the program defmed by
La CONTINUE
P IF X # 0 GO TO La isalsoin UL
.
Remarks. a) The universal language UL uses labele, in contrast to the LOOP language. b) Every loop program is a general program, but the converse implication ia obviously false. c) As in the cam of loop programs, the general programs begin with an INPUT Statement, and end with an OUTPUT statement. We say that a program P halt8 on a certain input data in case P eventually reaches the output statement on it. The general programs do not always halt. This ia a consequence of the action of the instructions of type (4.1)-(4.2) which may cause infmite cycles. (4.2) Definition. A general program P, with input registers XI,...&, n 2 1, and output register Y,eomputce the partial function 4:W A N , if when started with arbitrary zl,...,zn as input values of XI, ...,Xn, and
with all registers initially sero, then the program P halts with #(z) aa the content of
Y,in case z E dam(#), or
the program P never halts in caae z fZ dom(4)
(4.7)
.
(4.8)
We say that the partial function 4:" SlV is an UL-computable partial function provided there exists a general program P that computes
4.
404
Calude
(4.8) Example. The following general program
INPUT x x = X+l 1
CONTINUE Y=O
x
IF # 0 GO TO 1 OUTPUT Y never hdta; hence, the partial function computed by it is nowhere defined. 0
(4.4) Example. The partial function
4:fla IV
defmed by
is computed by the following general program:
INPUT X,Y 2 = sg(y) 1 CONTINUE IF # 0 GO TO 1
s=o
v=
0 2 CONTINUE
s = S+Y
v = V+l
D=SAX T = Bg(D) IF T # 0 GO TO
v=VLl OUTPUT v
2
where G(Y), @(I)), S+Y, S A X and V e l are “subroutines” abbreviating the loop programs in Examples (2.6), (2.3), (2.5), and (2.4). 0
Our main task is to determine the class of partial functions computed by general programs. (4.6) Theorem. (MACHTEY [1972]) The clam of all p.r. functions coincides with the class of all UL-computable partial functions.
405
Chapter 5
Proof. To ahow that every partial function computed by a general program is partial recursive we may use an induction on the length of general programs (i.e. on the number of instructions composing the programs). The induction is similar to that developed in the proof of Theorem (2.7) with two exceptions. Firstly, we work with partial functions and, secondly, we must analyee three cases in the inductive step (according to the rules (4.4)-(4.5)). Onlr the case of a general program Q of the form INPUT XI,...& CONTINUE P IF Xi # 0 GO TO 1 OUTPUT xi
1
must be treated. Here we assume that the partial function Qr :hT" -% EV computed by P with Xl,...,Xnas input registers and Xt M output register is a p.r. function, for every choice of t E {1,...,n}.
We defme, by primitive recursion, the p.r. function r:RV"+' -%Nas f0Uows: n
r(Zlr--vZn 90)
=
I ~ ((tP-1))
4~(S~,...,S*) 1
t -1
...,z,,y+i) czp (8,r(z1, ...,z,,y)) #
where in case ezp (i-l,r(~I,...,Z,,Y))
=A 00,
,
for all 0 5
8
5 n-1
and
# 0,
n
A = rI(pn(t-1))
~,(*~(o,~(=*,...,z~,Y)),...,@zP (~-l,r(s~,...,z~,Y))) 9
t =I
in case ezp (8,r(z1, ...,zn,y))# ezp (i-l,l'(zl ,...,z,,y)) = 0,
for
00,
all
0
5 8 5 n-1,
but
A=O; otherwise,
A = w .
4:"
Finally, the partial function computed by the general program a a V given by d(z1,**.,zn)=
ezp (j-i,r(Zl,+,,
~Y[r(z1,.*.,zn,y) = 01 n l ) )
for all zl,. ..,zn in tion.
Q is
9
IV. A dovetailing argument shows that 4
is a p.r. func-
408
Caliidc
The converse implication, i.e. every p.r. function can be computed by some general program, can be proved using KLEENE's Normal-Form Theorem (Theorem (2.3.28)). Recall that ( W I ( ~ ) ) ~ > ~is an enumeration of all unary p.r. functions and every w j'):Na RV can be obtained from two fmed primitive recursive functions p :N-+ N ,T : N S-c (0,l) by means of the formula wj*)(z) = p ( w [ T ( j , z , v )= 11)
.
In view of Theorem (2.7) all it remains to show i that the operation of minimisation can be accomplished by general programs. More exactly, ...,.X,,, Y assume that: a) P is a general program with input registers Xl, and 2 as output register, which computes the (total) recursive function f :W+'-+ N ,n 2 1, b) Wo,Wl,...,W,, V are names of registers not used in P , c) La is a Label not used in P. Under these circumstances the general program
INPUT W1, ...,wn
XI
=
w,
x, = wm
La CONTINUE Y = w, P
w,= W,+l I F 2 z 0 GO TO v=o LOOP w, w,= v v = v+r END OUTPUT
La
w,
exactly computes the p.r. function 4:" 4(21,-**,2m)
A N defmed by
= c ( Y [ ~ ( z ~ , * * . ,= z ~0,1Y )*
Obviously, the functional composition can be realised by general programs; this completes the proof. 0
On the basis of Theorem (4.5) we can extend the execution t h e function Timcp:N"' --+ gY, associated to the loop program P to general progrsms. We obtain a partial function, also named Timep,
Chapter 5
n'mcp:W S , N
...,
407
,
defmed by n'mep(zl, 2,) = the number of instructiom executed by the general program P on input (zl, z , ) , in cam P eventually halta, and n'mcp(zl, 2,) = oq in the opposite case. The instructions (2.1)(2.5) are counted aa in Defmition (3.5); the instructions (4.1) or (4.2) count M an unit; the INPUT/OUTPUT statements do not affect the counting. The reader can easily develop a numbering of general programs leading to an acceptable gijdelisation of all p.r. functions for which the associated time partial functions satisfy BLUM axiom. More precisely, if P,,P1, iS a systematic numbering of all general programs and &,dl ,...,d, are the unary p.r. functions they compute, then (d,),z0 becomes an acceptable @delisation and the sequence (Timcpm),>o - will be a BLUM's computational complexity meaaure.
...,
...,
...&,... ,...
6.6. A
DYNAMIC CHARACTERIZATION OF LOOP CLASSES
We use the execution time functions to obtain a dynamic characteriaation of the classes L, and f:. As a consequence, we deduce that f,, Lk, as well aa the class of all primitive recursive functions are complexity c h e s with respect to a suitable BLUM space. Fmally we compare SUDAN and loop hierarchies. First we give a complete characterbation of L, in terms of execution times. Thia w i l l be done by showing that the implication in Lemma (3.7) is in fact an equivalence. (6.1) Theorem. (MEYER and RITCHIE [1967a], [1967b]) Fix the naturale m 2 1, n 2 3. Then for every function f :P + N,f e L ,, iff there exist a loop program P, with XI,...&,M input registers, which computes f and a constant k such that: n'mcp(21,...,z,)
for all zl,...,z,
in
RV.
I t:(m=(zl,...,z,))
,
(54
408
Cdude
Proof. (The technical details are due to S. BUZETEANU.) h u m e the existence of a loop program P and of a constant k satisfying the hypothesis of the theorem. We shall prove that the function f :N“‘ IV computed by P is in L,. Let Q be a program in L, - that computes the function l+Lt(max(z,, ...,2,)); furthermore, assume that the output of Q is T, a register different from all Xi, 1 5 i 5 m . Denote by Zl, fe the instructions composing the program P. Furthermore, anaume that P works with Xl, ...& as input registers and Y as output register. We shall use some new registers Cj, V,, R j , Ej in order to write a new loop program in L_, which simulates the program P. Firstly, we describe a procedure to replace each instruction Z, by a certain loop program P,. The analysis falls into three cases, according to the type of instruction.
-
...,
If Zj is an arithmetical instruction, then Pj is
LOOP
v j
I,:
vj = 0
v,+l= 0 v,+, = v,+1+1
END
Notice that the fmal value of Vj+l is 1; the effect of this assignment consists in the selection of the next instruction.
If for some 1 5 8 < r , Z, is of the form “LOOP X ” , and f, is the associated “END”, then P, will be
v, v, = 0
LOOP
R, = 0 R, = R,+I
c, = x
END
LOOP R,
R,
=0
v,,, = 0 v,,, = K+,+1 LOOP c, v,,, = 0 v,,, = 0 v,,, = v,+,+1 END
END
(select the next instruction to be executed)
409
Chapter 5
and P, will be
v,
LOOP
v,=O
R, = 0 R, = R,+1 E, = 0
END LOOP R, LOOP
c,
C, = E,
(C,= c, J-1)
E, = E,+1 END
END (C,is the loop variable; in case C,
= 0, the next instruction to be executed is Z,+l; in the opposite case, i.e. C, > 0, C, is decreased by 1, and the rust instruction of the loop is selected by means of the “semaphore”
R, -1 The loop program INPUT
P can now be equivalently written as follows:
xl, ...&
Q
v, = 0 v, = V,+l LOOP T Pl
p. END
OUTPUT Y A little reflection will suffice to see that the loop program works (see
Ln;
the remainder loop also Example (5.2)). The loop program Q is in thus program ie in &. Consequently, the resulting program belongs to proving that f is in L,.
Ln,
0
410
Cdudr
(6.3) Example. Conaider the loop program
x x x = x+l LOOP x
INPUT
Y=O LOOP
x = x+l LOOP
x x = X+l
END END
END
Y=X
OUTPUT Y Using the procedure described in the proof of Theorem the following equivalent loop program:
INPUT X T = t:(X)
T = T+1
v,= 1
LOOP T LOOP
END
LOOP
v, Y=O v,= 0 v2 = 1 v, v, = 0
R, = 1
c, = x
END
LOOP R2
R2 = 0
v,,= 1
LOOP
END END
LOOP
c,
v,,= 0 v, = 1
v, x = x+l
I2
(5.1)we
get
41I
Chapter 5
v, = 0 v4= 1 END
LOOP
v4 v4 = 0 R4= 1
c, = x
END
LOOP R4 R4=
0
v,, = 1 LOOP c 4 v,,= 0 v6 = 1 END
END
LOOP
v6
x = x+l v6 = 0 v, = 1
END LOOP
v, v, = 0 Re = 1
ce = x
END
LOOP Re
Re = 0
v, = 1 c, v, = 0 v, = 1
LOOP
END END
LOOP
END
LOOP
v, x = x+l v, = 0 v, = 1 v, v, = 0 Re = 1 Ee
END
0
13
412
Cdude
LOOP Re
ca
LOOP
(78
= E6
Ea
=
E,+1
ENI) END
LOOP
v, v, = 0
R4 = 1 E4 = 0 END LOOP
R4 LOOP c4 C4 =
E,
=
E4 E4+1
END END LOOP
v,,
v,,= 0
Rz
= 1
Ez = 0 END LOOP Rz LOOP
cz (72
=
Ez
=
E, Ez+1
END END LOOP
v,, Y = X
v,, = 0 v,,= 1
END END OUTPUT Y The reader will notice the abbreviation above.
V, = 1
used in the program 0
413
Chapter 5
(6.8) Corollary. For d naturals m 2 1, n are equivalent: The function f :W-+
2 3, the following assertions
nV is in L,
There exist a program
P in L_, - computing f
and a function g : W
-+
ZXmcp(2,
,...,z,)
nV
in
.
(5.2)
L, , such that
2 g ( z l,...,zm),for allzl ,...,z, in RV
.
(5.3)
Proof. Immediate from Theorem (5.1). 0
(6.4) Corollary. The statement in Corollary (5.3) holds too when replacing f, by Li,for all k 2 1, n 2 3.
Proof. Immediate from the proof of Theorem (5.1), Remark a) following Defmition (3.10), Lemma (3.17), and Corollary (5.3). 0
(6.6) Corollary. A function f :W-+ RV, m 2 1, is primitive recursive iff there exist a loop program P computing f and a primitive recursive function g : P + RV such that the inequality (5.3) holds.
Proof. We use the Theorem (2.71, the fact that (L,),Lo all primitive recursive functions, and Corollary (5.3).
is a hierarchy of 0
Remarks. a) In Corollary (5.5) we may equally use the genera1 programs instead of loop programs; in this case we can work with the extended partial function Timep introduced at the end of Section 5.4. b) In view of a), a function is primitive recursive iff it can be computed by a general program running “a primitive recursive number” of instructions. c) It is now easy to realise the “practically non-computability” of non-primitive recursive functions, and even of primitive recursive functions in f,,-fn-,, for n 2 4 (because their time function must grow faster than the function
414
Cdudc
t&) = 2
1 . .
,I
}
2
times ,z > o .
(6.6) DePlnHion. (RITCHIE [1963], MEYER and RITCHIE [1972]) A c l w of recursive functions is computation-time closed providing that a
function belongs to the c l w iff the function can be computed by a general program P for which n’mcp is bounded by some function in the class.
Remarb. merely state that L,, L: (for k 2 1, a) Corollaries (5.3)(5.5) n 2 3), and the class of all primitive recursive functions are each computation- t ime closed. b) Denote by TIME(h) the complexity class of the recursive function h:N + N with respect to the BLUM space ((Pi),(nmepi))(Bee also the end of Section 5.4). By a) we can write
{f If { f If
unary,
f E L n ) = IJ TIME(h) h EL, h~ U
u
UnSYT, f E f 3 =
h EL! h ~ U
9
J
TIMEP)
9
J
for n 2 3, k 2 1. Furthermore, in view of the monotonicity properties of the sequences of functions (ti)i l oand (bt*p),,k,,20, we deduce the relations {f
{f
f E L,) =
If
unary,
If
unary, f E ~
00
u TIME(t,P) ,
P d 00
f =) u T I M E ( ~ : * P,) P=o
If
2 3 and k 2 1, which prove that the sets {f unary, f E f,}, {f I f unary, f E L:} are complexity claeses (we have used the Union Theorem (Theorem (3.6.1))). Finally, again the Union Theorem guarantees that the class of all unary primitive recursive functions is a complexity class. We close this section with a result relating the structural hierarchies d i n c u e d in Chapter 1 and the loop hierarchy. Recall that ( S , ) , l o is SUDAN’S hierarchy and 8, consists of all unary functions in Sn. for n
415
Chapter 6
(6.7) Theorem. For every natural n
2 2, S,
=
L,.
L,, n 2 2. In view of the Proof. F i t l y we prove the inclusion S, results established in Section 1.6 we must only show that 8 , C L, (because ROBINSON functions R("') are obviously in L,, and L, is closed under functional cornposition). Consequently, we must prove that SUCC(Z), E(z), S,,(z,z), S,(z,z) are in L,, and that L, is closed under sum, product, composition and limited iteration. This reduces to the following two statements: a) S,(z,y), s,(%,~)are in f,, b) L, is closed under limited iteration. a) Clearly, S,(z,y) = z + y is in f 2 (see Example (2.3)). If S,(z,y) is in L,, then S,,+l(z,y) can be computed by the loop program
c
...,
INPUT X,Y
z=x
LOOP Y
T = Z+Y T = T+l
z = %(Z,T)
END OUTPUT 2 so, %+I(Z,Y)
is in
L,+1.
b) Asaume that h , g : N + JV are in L,, and f :JV + JV comes from h and g by limited iteration. Consider the loop program P:
x x
INPUT
Y=O LOOP
Q
Y=Z END OUTPUT Y which computes f in case Q is a program in L, computing A (Q works with Y and 2,respectively, aa input and outputregisters). We have: Timcq(z)5 tn((z)
,
and for all z in bv; the constants q and r come from Theorem (5.1). It is seen that
416
Cdude
nmep(2) 2
f+(t+z(tt”(z)+t))
,
for all 2; since the function in the right-hand side of the above inequality is clearly in L, it follows, by Corollary (5.3), that f is a h in L,. Secondly, we deal with the inclusion L, C S,, n 2 1. We proceed by induction on n. For n = 1 the result is clear (if not see Theorem (7.6)). h u m e L, c S,, and let f :hF + RV, m 2 1, be in Ln+l. Following Dtfmition (3.1) there are three caaes. i) If f is computed by some program in then f E L,, C S,, C S,,+l, by the inductive hypothesis. ii) If f is computed by some program P of the form
Ln,
xi,..,.X,, xi
INPUT
LOOP
R
END OUTPUT Xi
where R is in b,,, then f = f i , where f i comes from the formula (2.10) (see the proof of Theorem (2.7)), in which q,(z,,...,zm)= z,, 1 2 s 5 m. Hence, by the results concerning the SUDAN hierarchy, it follows that f is in
L+l.
iii) If f is computed by some program P of the form INPUT
Xi,..Jm
Pl
Pl OUTPUT Xi where each P,(g=1,2) is either in &,, or of the form in ii), then f is in L , +1 by closure under functional composition. 0
6.6. AUGMENTED LOOP LANGUAGES
We augmente the LOOP language with a fmed subroutine (that computes a recursive, not necessarily primitive recursive, function). In this way we are able to c U i y the recursive functions by means of the relation
417
Chapter 6
“primitive recursive in”. This classication is analysed from a computational complexity point of view using the notion of primitive recursivelyhonesty. MACHTEY [1972] defmed the augmented LOOP languages by adding to the instructions (2.1)-(2.5) the following instruction:
X
=
F(Y)
(6.1)
where “F” is a name of a recursive function. If y ia the content of Y and F is a name for the recursive function f : R V Hv, then the instruction (6.1) assigns to X the value of f(y); the content of Y remains unchanged. An instruction of type (6.1) works like a subroutine computing the function f . We are already acquainted with such “abbreviations” when dealing with loop programs. The difference s t e m in that f may be not necessarily primitive recursive aa in the preceding situations.
(6.1) Deflnftlon. Let f :RV -+ RV be a recursive function. We denote by I+( f ) the smallest class of number-theoretic functions 0:“ + RV,
which contains the functions Succ(z), Ci”’)(zl,...,z ~ ) , f (z), and which is closed under functional composition and primitive recursion. m
> 1,
fi“‘T(zI,...,z-),
If g ia in R(f ), then we say that g is p r i m i t i v e recureive in f .
Remark. Clearly, R(f ) coincides with the class of all primitive recursive functions, in case f is itself primitive recursive. (6.2) Definitlon.
a) The class Lf of augmented loop programe i n f can be obtained from Definition (2.lrif we replace & - by &’ - and the clause (2.6) by Each instruction of type (2.1)-(2.3), or (6.1) aa well as the empty program are in
Lf -
.
(6.2)
b) As in Defmition (2.2) we can define the c h L’ of all numbertheoretic functions computable by augmented loop programs. We shall call them augmented loop-computable functions. (6.8) Example. The augmented loop program
INPUT X,Y 2 = F(X) LOOP
z
Y = Y+l END
418
Cdudc
OUTPUT Y
computes the function f (z)+y. 0
(6.4) Theorem. (MACHTEY (19721) For every recursive function f :N-+ RV, we have: R ( f )= L’.
Proof. Similar to the proof of Theorem (2.7).
a We are now in a position t o develop the announced classification. For every recursive function f :N-+ N,the class L1 is a very small subset of the class of all recursive functions (more precisely, Lf = R ( f )is clearly a r.e. set of recursive functions, hence, by Corollary (3.9.18), is recursively meagre). Theorem (4.5) enables us to interpret .the instructions of the type (6.1) as general programs, and thus to chesify the recursive functione according to which class Lf they belong (every clam Lf is properly contained in the set of all recursive functions, and every recursive function fa& in some class Lf). In what follows we shall study the computational complexity of functions belonging to classes Lf and we shall prove that the classification above can be equally obtained if we restrict ourselvee to classes Lf generated by recursive functions which, in a sense, “honestly” reflect their time complexity (Le. with respect to the BLUM space ((Pi),(nmep,))).
:RV -+ RV be a recursive function. We say that the class Lf is honed if
(6.6) Definition. Let f a)
L/ = p
’
P
(6.3)
for some general program P.
b) The function f is primitive recursively-honed in case Lf is honest. We give a fmst example of primitive recursively-honest functions: the execution time functions.
P is a general program with registers, then we can effectively fmd a general program Q with input registers XI,...&, and Y aa output register such that (6.6) Theorem. (MACHTEY (19721) If
X,, ...&
M
Q computes the partial function Rmep ,
(8.4)
419
Chapter 6
TirncG(zl ,...,z , ) = 2.11t’mcp(zI,...,z,)+l for all z,,..,z, in HV.
,
(6.5)
Proof. The general program Q comes from the general program P by inserting new instructions as follows. The instruction “Y = 0” is placed aa the fvst instruction of the program Q. Then, we insert the instruction “Y = Y+1” after each instruction of type (2.1)-(2.3), and (4.2); furthermore, the instruction “Y = Y+l” is inserted before each instruction of type (2.4), (2.5), and (4.1). The resulting program is just the desired Q. 0
(6.7) Example. Let P be the loop program computing the sum z+y (see Example (2.3)). The loop program Q furnished by Theorem (6.8) is
INPUT
X,J2
Y=O Y = Y+l LOOP
x, x,= X 2 + l Y = Y+l
Y = Y+1
END OUTPUT Y
It is seen that it computes just the function llt’mcp(zI,z2) and Tirncq(zl,z2)= 4z,+3 = 2(22,+1)+1 = 2Timcp(z1,z2)+1. 0
(6.8) Definition. Let P be a general program which uses the registers XI, ...,Xm. A P-loop simulator is a loop program Sp which uses the regis...&, T (T # Xi,1 5 i 5 m) and acts aa follows. If the contents ters XI, of the registers XI, ...,Xm, T are z,,...,z,,t, respectively, the execution of S p leaves y, ,...,ym,t’ in XI ,...J,,T, respectively, where yj,t’(l 5 j 5 m ) come follows: we try to run the from the execution of P with input z,,...,~,
fust t instructions of P on the given input data (if P does not halt before), and we leave y,, ...,y, to be the fmal contents of XI, ...,Xm, respectively, and t‘ = 0 in case P did not halt, t’ equals t minus the number of steps until P halted if P did halt.
420
Cdudc
(6.9) Theorem.
(MACHTEY [1972)) For every general program P we
can effectively fmd a P-loop simulator.
Proof. We proceed by induction on the defmition of general programs. If P is the empty program, then S p is
INPUT Xl, ..&, T OUTPUT T If P consista of a single arithmetical instruction, then S p ia INPUT XI,...&, T U=leT U=I"U LOOP
u
T=TLl P
END
OUTPUT T (See Example (2.5) for the loop program computing A.) If P comes from the general programs Q and R by concatenation, then S, is the concatenation of S, and S,. If P is of the form INPUT XI,...&, LOOP x i END
Q
OUTPUT Xj then S, is
INPUT X1,.-*,.X,,, ,T
U=leT U=1LU LOOP
u
T=T&l LOOP
xi
U=l&T U=l&U
LOOP END END
u
T=T"1 se
Chapter 5
42 1
END OUTPUT T Finally, if P is of the form INPUT X1p*.,X,,, La CONTINUE
Q
IF Xi # 0 GO TO La then S p is INPUT Xi,...Jm U = l n T
,T
U=lQU LOOP
u
T=TQ1 Sa
U=laXi U = l N J LOOP u T= TLL Sa
T= T a l
END
T = TL1
END OUTPUT T
(6.10) Example. The P-loop simulator associated to the loop program P
INPUT x LOOP x
x
=
x+l
END OUTPUT X
is INPUT X,T
U=l&T U=lLU
LOOP
u
T=TLl LOOP x
422
Cdude
U = l n T U=l&U LOOP u T=TAl U = l n T
U=lLU
LOOP
u
T=T"1
x = x+l END
END END END
OUTPUT T
(6.11) Example. The P-loop simulator associated to the general program
P INPUT X , Y 1 CONTINUE
Y = Y+l
IF x # 0 GO TO 1 OUTPUT Y is
INPUT X,Y,T U = l L T
U=l&U LOOP
u
T=T n l U = l n T U=l&U LOOP u T = T l l Y = Y+l END
U=l&X U = l w J LOOP u T=Tnl U=1PT
U=l&U
Chapter 5
LOOP
423
u T=TAl
Y = Y+l END
T=TAl END
T=TP1 END OUTPUT T
(6.12) Theorem. (MACHTEY [1972]) If f :W-+ N ,m 2 1 is in L‘, and the general program P computes the total function g:N + N ,then we can effectively fmd a general program Q which computes f and Timeq
E Llimep
(6.6)
Proof. Let R be an augmented loop program in g which computes f . Amume that P and R use different registers. More exactly, assume that P works with W as input register, X as output register, and Xl, ...Jn, possibly other registers. The program Q ia obtained from R by replacing each instruction of the form “Y = g(2)” by the following instructions:
w=z x=o x,= 0 x, = 0 P Y=X It is seen that the above sequence can be thought as a general program which computes g ( z ) ( z is the content of 2; the output is Y). Consequently, proceeding to the just described transformation of R we get a general program computing f. We shall prove that this general program Q satisfies (6.6), i.e. Time* can be computed by some augmented loop program in TSmcp. (Notice that Timeq is a recursive function because f is recursive.) Let T , V, T,X’, 2‘ be completely new registers, and let S p be a P-loop simulator with X’and l‘ aa input registers and output register 2’. Furthermore, assume !hat S p and R have no common registers. The augmented loop program Q comes from R aa follows. We begin with the instruction “T = 0”; then, we insert the instruction “T = T+1” after each
424
Cdudc
instruction of type (2.1)-(2.3), and before each instruction (2.4) and (2.5); each instruction of the form “ X = g(Y)” is replaced by the following instructions
v=o v = V+l v = V+l LOOP v T = T+l END
v = Timep(Y) LOOP v
T = T+l
END
T = Time#)
X’= Y SP
x
=
2’
where the instruction “V_= V+l” appears (n+3) times. The augmented loop program in Timep, Q , computes exactly the function TimeO. 0
(6.M) Lemma. If the p.r. function f :P 4 N,m 2 1, is computed by the general program P, and, in addition, Tirnep(zl,...,z,,,)5 h ( z l,...,)2,
for all zl, ...,z, in
,
(6-7)
N,and
hELg , for some recursive functions h : W -+ RV and g : N
(8-8) +
N ,then f E La.
Proof. Clearly, f is total, by (6.7). We take an augmented loop program in g which computes h . To this program we add a P-loop simulator which, for all zl, ...,2, in N ,executes the fvst h(zl,...,z,,,)instructions of P: we obtain an augmented loop program in g which computes f . 0
425
Chapter 5
(8.14) Corollary. If the recursive function *Bv" --+ N,m 2 1, is comk 8 p puted by the general program P,then f E L
.
Proof. Immediate from Lemma (6.13) and Theorem (6.12). 0
(8.16) Theorem. (MACHTEY [1972]) A recursive function f : N -+ N , ia primitive recursively-honest iff there exists a general program P which computes f and Timcp E L f .
Proof. Let P be a general program computing f and satisfying the relalimep tion Timcp E L f . By Corollary (6.14) we have f E L Consequently, by Theorem (6.4),
.
Lf
=
~ ( f= )B(Timcp) =
Ll i n e p
9
showing that f is primitive recursively-honest. Conversely, assume that Lf = L R , for some general program R. Theorem (6.6) furnishes a general program Q which computes the function 2TmeR, and Timeg(2) = 2.Timc (z)+l, for all 2 in N. In view of the &r, fact that f E B ( f = ) Lf = L we deduce, b y Theorem (6.12 the kmeO existence of a general program which computes f and Timed E L Since ZIme
4
Lnnr8Q= ~
.
( ~ i m c ~ )
= B(2-TimeR+1) = A.(TimcR)
-L =
~
~
~
R
Lf
it follows that Timed E L f . Hence, the required general program P is exactly Q
.
0
Remarko. a) Intuitively, the primitive recursively-honest functions are those unary recursive functions which can be computed by general programs in time primitive recursive in themselves.
b) The classes L', when f ranges in the set of all primitive recursively-honest functions, classify all recursive functions.
426
Cdude
(6.16) Corollary. Let g:N + N be a primitive recursively-honest function. The following aasertions are equivalent: The recursive function
f:BV"
-
N,m
2
1 is in f U
.
(6.9)
There exist a general program P which computes f and a function h : W '
--c
UV in 'L such that
n'rnep(zl ,...,zm)5 h ( z ,,...,z,,,),for all zI,...,2, in
N
.
(6.10)
Proof. Immediate from Lemma (6.13) and Theorem (6.15). 0
Remsrke. a) From Corollary (8.18) it follows that each class B(g) ia computation-time closed in case g ki primitive recursively-honest. b) The recursive function g:N
iff { f : N+ N
I{ E A.(g)}
complexity class of h in the
=
U
--+
N is primitive recursively-honest
TIME(h), where TZME(h) in the
h *(#I hunw
BLUM space ((fi),(TXrnep,.)).
c) The reader can now easily compare the notion of honesty defrned in Section 3.4 and the primitive recursively-honesty.
(6.17) Corollary. If f : N + IV is a primitive recursively-honest function, then R ( f )is a complexity class.
Proof. Immediate from Corollary (6.16) and the Union Theorem (Theorem (3.8.1)). 0
Remarks. a) The above classification of recursive functions coincides with the
KLEENE classification according to the notion of relative primitive recursiveness (see KLEENE [1958]). b) MEYER and RITCHIE (1912) have clawified the recursive functions by means of the elementary-honed C h U 8 C 6 t(f)( q f )b the smallest class of number-theoretic functions which contains the functions z+y, z-y, z ' , f ( z ) , and which is closed under functional composition, limited summation, limited product and limited recursion).
Chapter 6
427
6.7. SIMPLE FUNCTIONS
The equivalence problem for loop program (i.e. the problem of establishing whether two arbitrarily given loop programs compute the same function) t undecidable. This problem remains undecidable for each class n > 1; the barrier of undecidability lies between L, and L2(TSICHRITZIS [1970]). This fact motivates the interest in theclsee L :(called, the claw of simple functions). To this aim we shall give a complete characterisation of L1,and, in particular, we shall solve the hierarchy problem for the classes (L -
An,
The equivalence problem for a class C of loop programs is the problem of deciding whether two arbitrarily gi& programs in C - compute the same function. (7.1) Theorem. The equivalence problem for
L- is undecidable.
Proof. From KLEENE's Normal-Form Theorem (Theorem (2.3.28)), every unary p.r. function w can be written as
1')
wl')(z) = p ( w [ T ( i , z , y )= 11)
9
appropriate primitive recursive functions p : N -+ N , and T : N S-+ {O,l}. The set {z E RV lwi')(z) # 00) is not recursive, hence the problem of deciding whether for arbitrary z there exists an y such that T ( z , z , g )= 1, is undecidable. Hence, the problem of deciding whether for arbitrary z the unary function f , : N -+ N ,f , ( v ) = T(z,z,y) is the rero function, ia undecidable too. Finally, assume, by contradiction, that the equivalence problem for L were decidable. In view of Theorem (2.7), the problem of deciding for 'arbitrary z, if f,(g) = 0, for all y, would be decidable, thus arriving at a contradiction. for
0
(7.2) Corollary. The equivalence problem for n 2 2.
&,,
is undecidable, for each
Proof. It suffices to notice that KLEENE's predicate T : N 3+ {O,l} t in
s,= 12.
0
428
Cdudr
Remark. In view of Theorem (2.8.15) we can effectively fmd two programs P , and Pz in L2such that the proposition “Pl is equivalent to P2”is an independent statement. Our fmst task is to prove that Theorem (7.1) (which is equally true L and for all n 2 2) fails to hold in case 0: kl. for -
hn,
(7.8) Theorem. (TSICHRITZIS [1970]) A function f : W + RV, 2 1, is in toiff f ( z ,,...,z,) = k or f ( z ,,...,z,) = z , + k , for appropriate natural numbers k , and j (1 5 j 5 m), and all z1,...,2, in RV.
m
Proof. Recall that Lo is the set of number-theoretic functions computed by programs in Lo, - i.e. by loop programs consisting only of arithmetical instructions. If f is of one of the forms speesed in the theorem, then f can be obviously computed by a loop program having no loops. To prove the ...,X,,, as input converse implication we consider a program P (having Xl, registers and output register Y) in Lo and we rewrite it by making the following transformations starting wit< the fwst instruction: a) replace each instruction of the form “X = 2” by “X = E”, where E is the expression appearing on the right-hand side of the last previous instruction with X in the left-hand side. If there is no such instruction, then we write “X = z”, z being the current content of X;
b) replace each instruction of the form “X = X+1”by “X = E+l”, where E is the expression appearing in the right-hand aide of the last previous instruction with X in the left-hand side, in case such instruction exists; in the opposite case write “X = z+1”; c) each instruction of the form “X = 0” remains unchanged; d) after performing all replacements of the form a)-c), retain, for 2 appearing in P, the last instruction containing 2 in the left-hand side, if such an instruction exists; in the opposite case, write
every register
z = z.
Every register 2 appearing in P, in particular Y, wiU appear in an “equation” of the form 2 = zj+k, or 2 = k , where z j , is the content of some input register X,. 0
(7.4) Example. Consider the program P:
INPUT X J d ,
x,= X,+l
x, = X,+l
429
Chapter 5
x2= x1 x 2 = x2+1
OUTPUT
x 2
The transformations described in the proof of Theorem (7.3) lead to:
x,= 21+1. x,= (z1+1)+1, x 2=
(z1+1)+1,
x, = ((z1+1)+1)+1, and fmally
x1= 21+2, Xz = Z1+3.
X 3
=
23.
Hence, the function computed by
P is
f(2+2,23)
= 21i-3.
U
(7.6) Definition. (TSICHRITZIS [1970]) The clams of eimplc function8 is the smalleat class of number-theoretic functions which contains the functions Succ(z), C{"')(zl,...,zm),drn)(zl ,...,zm),z+y, 'Pd(z) = z P l , [z/k], rm(z,k), (A 2 2), and
1
,
wb,v)=
ify=o,
0 , otherwise,
and which is closed under functional composition.
(I.6) Theorem. (TSICHRITZIS [1970])The clam of all simple functiuxts coincides with L1. Proof. Since it is obvious that every simple function is in L1,we focus our attention to the converse implication. Let P be in L,; - write it as
p r n
where each portion P, is either a loop or an arithmetical instruction outside a loop. We ahall prove that each P, computes a certain simple function, hence the function computed by P can be obtained by functional cornposition from simple functions.
430
Cdude
The case when P, consists of an arithmetical instruction is obvious. Let us sssume now that P, is of the form
LOOP
END
x p:
and let Y,, ...,Y, be the registers used by P:. Furthermore, let X be different from all (1 2 j <_ n). The program Pi does not contain any loop; therefore, we can apply here the transformations a)-d) in the proof of Theorem (7.3). The result will be a set of equations of the form yi = gj+k, or ~ l =. k, for every Y;. appearing in P:.
5's
In case Y, = pj+k we say that register r;. links register Y,. Notice that every yi links a t most one 5. We can draw, on this basis, a directed graph whose nodes are just the names of the registers in Pi,i.e. Y l ..., , Y,; an arrow comes from yi to in case yi links q. According to the position in this graph, each Yt falls into four cases, namely: Case 1.
There are no 'arrows into
Yt.
Case 2. The node Y, belongs to a cycle, i.e. there exist the nodes yil ,...,Kt, f 2 1, such that Y;. links q , 1 5 g < t, and ql links g+l
x,.
*
Case 3. The node Y c does not belong to a cycle, but there is a path from some node in a cycle t o Yr. Caee
4 . There is a path from a node in Case 1 to Yc.
Assume now that
ti,.. .,&,,z
are the contents of the registers
Yl, ...,Y,, X, respectively, a t the beginning of the loop; the contents of . . ,V,,z upon the end of the loop. Our aim is to these registera are
cl, .
show that
ci can be expressed by means of simple functions of ilJ. . .,in,
2.
. In Case 1, the node Yr can be obtained in two ways: a) if Yt = y l + k , then Vp = j t + k z ; b) if Yt = k, then
c, = w ( g l , z ) + w ( k , G ( z ) )where , G(z) = w(1,z). In Case 2, assume that xL, ...,xt,t 2 1 is a cycle such that
and it ia seen that
431
Chapkr 6
K,
= Yil+ki,,
x1
= Yit+lfil.
Without lose of generality we shall compute the fmal value k,. By means of the function w(n,z) we can separate the caaes,z = 0 and z > 0. Hence, assume z > 0. After the fmt execution of P,, the contents of yi, ,..., are: yi, = j7it-l+kit ,...,yix = ii1+kix, XI = ii;.,+kil. After the second execution we have: yit = &1 4+ki 1-1 +kit,...,Kx = iit+kil+kix, Y;.1 = iit-l+kit+kil. In general, the content of 5, after z iterations b
xl
-
l i t = [Z / t ]
+
'(kil+*:-+kit)+
c
t4
w(frn,bs(eq(rm(r:,t),m)))
s
m 4
where fo
=
ii,
9
for all0 < m 5 t nl. The above s u m contain a fized number of terms; therefore, to prove that &, can be expressed by means of a simple function it suffices to show that for every natural m, eq(z,m) is simple. Indeed, for m = 0, cq(z,O) = w(1,z); for rn > 0, eq(z ,m) = G(Pd([z/m])+G(z)+G( [z/m])+rm (z,m))
.
In Case 3, assume that we have a cycle yi,,...,yi,, (t 2 1) and a path Y;.t,Y;.t+l yit+,, r 2 1. More exactly, we have the equations in (7.1) and, in addition
,...,
Cdudc
432
The content of t + r after z > r iterations can be expressed from the content of after z e r iterations plus kit+l+...+kitrt. The fwst cases, i.e. those corresponding to the iterations z = O,l, r, can be treated by means of appropriate switching functions built from the functions w , Pd, e q , and rm. Hence, the content of can be expressed by simple funetions.
xt
...,
x,+r
The last case corresponds to a sequence of equations
and
A similar analysis shows that the content of can be expressed by in two cases, according to z > t ,
a simple function; the construction falls or z 5 t .
0
Remark. The above proof shows that there exists an uniform method for obtaining the expression of a function computed by a program in L1, - as a functional composition of initial simple functions.
(7.7) Example. Consider the following loop program:
INPUT X,Y,,Y2,Y3
x
= x+1
LOOP
x
Y&= Y4 = Y4= Y4 =
Y3 Y2 Y4+1
Y4+l
Chapter 6
433
Y4= Y4+l Y3 = Y4 Y4 = Y1 Y4 = Y4+l Y4= Y4+l Y2 = Y4 Y4 = Y5 Y4= Y4+l Yl = Y4
END OUTPUT Y3 The transformations abd) in the proof of Theorem (7.3) lead to the following equations expressing the scope of the loop:
YE4 = Y3? Y3 = y2 = Y1+2, y4 =
I3+1,
Y1 = y s + l . We have a cycle Yl,Y2,Y3,and two registers depending upon the cycle: Y4, YP The function computed by the above program is f(Z,Yl,Y2ia(S)
f, = Y S , f l
2
C w(fm,b9(CQ(rm(z+1,3),m))),
+
= 6[(~+1)/3]
where
m 4
= ~ 2 + 3 ,f
2
= YI+~. 0
(7.8) Definition. Let G be an expression defming a simple function g : W -., N,n 2 1 , as a functional composition of initial simple functions (see Defmition (7.5)). Let fl,..:,fm be the constants appearing ae second arguments of the functions [ z / f i ]or rm(z,ti) occurring in G , allowing repetition. Let q be the number of Occurrences of the predecessor function in G. Finally, put m
T = flti , 1-1
M = qT+1 Notice that T 2 2, because for all 1
. 2 i 2 m, ti 2 2.
(7.3)
434
Cdude
(7.9) Dcflnitfon. (TSICHRITZIS (19701) Let 0:" + RV, n 2 1, be a simple function and let T and M be two constants coming from Definition (7.8) and mme expremion C for 9 . Two n-tuples (zl ,...,2,) and (yl y,) are called (T,M)-compatible if the following two conditions hold for all 1 5 i s n :
,...,
5 M ) zi = yi , > M and vi > M )* zi = yi(mod T ) (zi
(zi
5M
or yi
(7.4)
.
(7.5)
We notice the following obvious properties of the above relation of compatibility: For all T 2 1 and
M 2 0, the relation of
(T,M)-compatibility ia an equivalence relation.
(7.6)
If z1,...,zn)and (ul ,...,yn are (T,M)-compatible
M)
then they are also (9,)-compatible for all
T=k.Il',
k21.
M' < M
If a (T,M)-compatibility claes has two distinct elements, then it has actually an infmite number of elements.
and (7.7)
(7.8)
(7.10) Theorem. (TSICHRITZIS [1970]) Let g : W -+ RV, n 2 1, be a simple function. Let T and M be two constants associated to g ae in Defmition (7.8). Then g gro+s linearly with respect to each variable on every class of (T,M)-compatibility. Proof. We proceed inductively upon Defmition (7.5). The theorem holds obviously for the initial simple functions. For notational convenience we 'deal only with acts of points diifering only at one coordinate, say zi. We pass to the inductive step. Assume h :pv" + N,n 2 1 is a s h ple function satisfying the statement of the theorem with the constants Th and Mb. If the function g : W -+N is defmed by g(zI,...,2,) = Pd(h(zl,...,zn)), then, according to Defmition (7.8), Tp = Tk and M, = M b + T h . Consider now two (T,,M,)-compatible n-uples (zl, ...,2,) and (yI,...,us) differing only at the i t h coordinate: zi = j i + u * T h , 8 > 0, zj = yj, for j # i . We have
436
Chapter 5
and then
Consequently, g possesses the required property with coefficient pi/t. If g ( z l,...,2,) = rm(h(zl,...,z,),t), then T, = T h ' f , M, 2 Mh (ain the preceding case). Again we consider two (T,,M,)-compatible n-uples (zl 2,) and (yl ,...,y,) for which zi = yi+8 .T,,8 > 0. h view of (7.7), the equality (7.9) will also hold, thus showing that
,...,
.m (h(zl,...,z,),t)-rm(h(gl,...,y,),t)
=0
'
The reader can easily check the validity of the induction step for Succ, Cp), and @". Now assume that h 1 , h 2 : W -+ N are two simple functions satisfying the induction hypothesis for appropriate constants Tl, Ml, and T2,Ad2. If g(z, ,...,2), = w(hl(zl,...,2,),h2(zl z,)), then by defmition Tv = Tl.T2, and Mu2 max(M1,M2).If (zl 2,) and (vl,..,v,) are (T,,M,)-compatible, zi = yi+s .T,,8 > 0, then (by (7.7))
,..., ,...,
hl(zl,...,z,)-hl(vl,...,g,)
= Pi '8
*T'
,
hz(zl,...iz,)-hz(yl,...,y,)
= qi '8
'Tg
*
,...,
,...,
case qi # 0, hz(z, 2,) 2 h2(gl g,) 2 1 since zi _> g; > M,, and In case qi = 0, h&l, 2,)thus g(zl,...,zn)-g(yl ,...,v,) = 0. h2(yl,...,U), = 0. Again two subcases occur. If h 2 ( z , 2,) = 0, then 9(zl,".,z,)-~(Yl,..',yn)= hl(zl,...,z,)-hl(yl,...,y,) = Pi ' 8 'T,. If
In
,...,
...,
430
Cdudr
h ~ ( z 1 , . . . , ~+, ) 0, then 9(21,...,Z,)-g(Ylr...,Yn) = 0. The reader can e d y supply the detaib for the inductive step involving the sum function aa well m the extension to sets of compatible tr-upler, in general. 0
Remark. Theorem (7.10)can be also used in showing that certain functions do not increase linearly on classes of (T,M)-compatibility. example, consider the function sqrt (z)= [z'''].
An an
(7.11) Theorem. Every simple function g : W -+ RV, n 2 1, is completely specified by a finite number of n-uples. More exactly, if T and M are g sssociated constants, then g is completely specified by its values in the frnite set
N Proof. z , + ~5
=
((2,
,...,z,) E W
Imax(zl,...,2,)
2*T+M}
.
For all (Zlr...,z,] in pv" with z 1 > M ,...,z, > M , and M ,...,2, 5 M ,we construct the following two sets:
A = {(y, ,...,y,) E N " jari = ji E
zi( mod
T),M
zi,8
< a' 5 a, and
< yi 5 M+T,15 i 5 8 ) ,
and
B
=
{(zi ,...,2:) E W 11 2;
2;
5 r 5 8,z:
= zi,8
< i 5 n, and
= z,( mod T), if M + T < 2,' 5 M + 2 * T ,and = zit mod T), if A4 < 2: 2 M+T,i E (1,...,a}-{r}}
.
. It is seen that (zl ,...,zn), (gl,...,y,) and (2; ,...,2;) are (T,M)compatible in case (jl,...,y,) € A , ( z : ,...,2:) E B, 1 5 r 5 8 . Theorem (7.10)gives the relation: #
g ( Z l ? * * . , z n )=
g(Y1,-,ln)+C (g(z:,---,zL) 1-1
Clearly, A u values on N.
- g(vl,...,Y,)).(z,-y,)/T * 8 C N ; hence g(zl, ...,2,) is completely specxed from the 0
437
Chapter 5
(7.12) Corollary. Let g l , g 2 : W -* IV, n 2 1, be two simple functions. Let Tl, Ml, T,, Ad2 be the associated constants. If g1 and g2 agree at every n-uple in the set
N
,...,z,) E W Im+, ,...,2), 5 MI
= {(zl
+M,+2.T,.T,} , then g1 = gp
Proof. Put T = T,*T2,M = M l + M p Suppose that g1 and g2 agree on N, and consider an arbitrary n-uple (zl,2,) such that z1 > M ,...,2, > M , and z , + ~5 M ,...,z,5 M. Consider also the sets A and B associated to (zl ,...,z,,z,+I,...,z,), T and M , as in the proof of Theorem (7.11). Clearly, A U B C N, and every n-uple in A U B iS (T,M>compstible with (zl, 2,). In view of (7.7), all n-uples in A u B are (T,,M,)-eompatible, as well as (T2,M2)-compatible, with (zl,...,z,). From Theorem (7.10) we deduce the formulas:
...,
...,
c(d4,..4 a
Ol(Z1,...,2,)
= 91(Yl,...,Yn)+
r=l
- Ol(Yl,...,Y,))(z,-Y,)/T
9
8
92(21,...,2,
1 = 82(11,--.rln)+C r=l
( g d 4 ,.4
- 92(11,...,~n))(zr-~r)/T
9
which prove that g1 = g2. 0
(7.11) Corollary. (TSICHRITZIS [1970]) The equivalence problem for L1in decidable. Proof. We can uniformly construct the function computed by a program in L1and therefore we can get the aeaociated constants T and M. Finally, we-only run the programs with input data in the fmed fmite set furnished by Corollary (7.12). In case the outputs coincide on each input, the prog r a m are equivalent. In the opposite case, they are not. 0
Remarks. a) There is a drastic difference between L1 and L,, n 2 2 M far M the equivalence problem i concerned. Furthermore, we can formulate other decision problem which turn out to be also decidable for L1,but undecidable for each L,, n 2 2. For example, the problem to determine
438
Cdudr
whether a function in L, eventually takes eome d u e k, or the problem t o determine whether two functbm in fn are equal almost e v e w h e r e are decidable for n = 1, but undecidable for n 2 2. b) It is worth noticing that the decidability of the corresponding problem for programs in does not imply the decidability of the corresponding problem for programa in UL having loops without nesting because the instructions of UL have much power than the instructions of &. Furthermore, we can express every simple function in UL without using loops and it can be proved that the equivalence problem for prog r a m in UL having no nested loop8 is undecidable. We are going to the next problem in this section, namely, the hierarchy problem for the c h s (f:)t21. Notation. If f :W4 N ,n 2 1 b a function and 1 5 i n, then fxifO is the (n-lkarguments number-theoretic function defined by =
f=i=O(21,...,Zi-1,Zi+1,...,2n)
f
-
(z1,...,2i-1,O,zi+l,’..,zn)
The next result uses an idea in OSTROWSKI [1954].
-
(7.14) Lemma. If f : W hV, n 2 1, is in L :, for some A 2 1, then there exists a natural i , 1 5 i 5 n, such that f*i’O belongs to L.:-’.
Proof. If f E Lf-’, then for each i, f s i l O , is also in f f-’. Therefore, and let P be a program in Lf computing f asaume that f EL:-L:-’, with input registers Xl,...,X,,, and output register Y. Let rLOOP Z” be the fvst loop instruction in P. The content of 2 before entering the loop is 2
= 6*Zi+k
,
where k E N ,1 5 i 5 a, and 6 E {O,l}: see Theorem (7.3). If 6 = 0, then the fvst loop is actually executed exactly A times. We conclude with the fact that this loop is not “proper”, i.e. it can be replaced by an equivalent program in Lo. - This means that f is in fact in L:-’, thus contradicting our working hypothesis. Hence 6 = !., i.e., t = zi+A. Then P computes the function fXi=,, with Xl,...,Xi-t,Xi+l,...,Xn M input rcgbters, and output register Y. But again the fvst loop of P is not “proper”, showing that fZi’0
is in f f-I.
0
439
Chapter 6
(7.16)
(f&
o,
Theorem. (GOETZE and NEHRLICH [lSSl]) The clsssee form a proper hierarchy: (7.10)
LT", for every n 2 2. Actually, we shall prove by induction on n that the function .3umn:W + I?,
Proof. We must show that Lr-' #
czi,is in L;-'-L:", n
~um,(z~,..,q,) =
for each n
2 2.
i-1
The function ~ u m ~ ( z ~=, z1+z2 z ~ ) can be computed with one loop (Bee Example (2.3)). Hence, 8um, is in LF-'. We focus the attention to the relation 8umn 4 L;-2. For n = 2, 8Um2 4 f,"= Lo (h case 6Um2 E Lo,then by Theorem (7.3), 8Um2(21,22) =
for appropriate naturals 6 tion). For
all
i, +
N
,
6 'zj+k
E {O,l}, j E {1,2}, k 2 0, which is a contradic-
1 2 i5 n+l, coincide:
the
functions
8umn,
and
n +1
=
(8Umn+l)ri,0(21,".,2i-1,zi+1,".,2n+1)
...,
= 8Umn(21, 2i-1,2i+1,...,Zn+1)
2j j=l j#i
.
were in Consequently, in case 8umn E L ;-2, via Lemma (7.14), i.e. if 8umn 4
Li'-' we would also have L :-?, then 8Umn+1 4 L,"-'. 0
Remarks. a) The proof of Theorem (7.15) relies upon the fact that the number of variables of the function .3umn, n = 2,3, is increasing. GOETZE and NEHRLICH [1981] have proved that this result fails to be true in case we restrict our attention to functions having a fized number of arguments. Indeed, they have proved, using Theorem (7.6), that for each fmed number n of variables the corresponding hierarchy (7.10) collapses a t level ( n + l ) . In other words, ( n + l ) unnested loops are sufficient to compute all simple functions of n variables. Here we have a new diiference between f 1 and L,, for n 2 2.
...
b) By slightly modifying Defmition (3.1), AMIR and CHOUEKA [1981] have obtained a hierarchy (Lb), satisfying the equality
440
Cdudr
Lk+l = L,, for all n 2 2. Furthermore, L; coincides with the set of “polynomially computable functions”; alternatively, L; is the claw of all recursive functions that are computable with a polynomial number of steps by the modfied loop programs. A syntactical defmition of the problem P = P U P is fmally obtained.
6.8.
PROGRAM SIZE
This section is devoted to the trade-offs between the computational complexity and “sire’.’ measures, i.e. between the number of instructions a program uses in its computations and the number of its characters. Let
=
((d,),(an)) be a BLUM space.
(8.1) Definition. (MACHTEY and YOUNG [1978]) A recursive function
II:ov-mv, in called a general eize mcaaurc for (&)n20 if for all naturals n , the set
Idi I I; I = n )
1
(8.1
is fmite.
In other words, we can effectively compute the general sire of any given #i, and the number of incquivolcnt programs (algorithm) of arbitrarily given sire is finite. To give the following two examples of general sire measures we notice that, for each natural n , only fmitely many inequivalent UL prgramo have n characters (instructions), in spite of the fact that infinitely mury distinct UL programs have exactly n characters (instructions). This is poseible because we work with an infinite “alphabet” of register names, and a “systematic” change of register names in a given UL program does not affect the function computed by it. (8.1) Example. The total number of charactem in an UL program gives general sire measure with respect to the effective enumeration (Pn), 2oof all UL programs. a
441
Chapter 6
(8.S) Example. The total number of instructions in an UL program gives another general sire meamure. 0
(8.4) Example. The total number of instructions in an ALGOL program fails to lead to a general sire measure. The motivation is fairly simple: every constant function can be computed by a single ALGOL instruction. 0
As in the c u e of BLUM spaces one can eaailp. construct examples of “pathological” general sire memures. (8.5) Example. (MACHTEY and YOUNG [1978]) There exist a padding ---c RV (i.e. di = 4,(i,j), for all naturals i and j ) , and a genfunction p :d eral she measure I 1:N -+ RV such that
ip(i,j) I = li
I
for all i and j . Indeed, take without loss of generality an injective padding function p with recursive range (see Exercise (2.11.10)), and an arbitrary general ste measure I r:aV --c PV. Defme
In
Clearly
I I works.
I=
I
li
1’ ,
In
TI
in cane n E range(p) and p(i,j) = n, for mme j , otherwise. 0
(8.6). Theorem. Let g,f:aV + RV be two recursive functions such that
the set { ldn) I In
EN) is infmite for some general sire memure I I:RV
(8.2)
9
-+
IV.
Then we can effectively find two naturals i and j (depending upon g and f ) such that:
d,(j) f(li I) < lo(i) I di
=
(8.3)
9
.
(8.4)
442
Cnludc
Proof. We consider the recursive function r :N4 N given by
1) < l o b ) ill function 8 :M a N ,
r b ) = rm"9 (eee (8.2)).
Next we use the p.r.
+,d
9
= 4r(r(r))(4
(8.5)
*
From the Uniform Recursion Theorem we get a natural i (uniform in g and f ) such that for each natural 2,
di(.) where z is an index for 4 . r : j = r(i).
=
48(z?i)
P
Finally, the natural j comes again from
We shall prove that the just obtained i and j work. Indeed, condition (8.4) follom directly from the construction of r and j. h concerns condition (8.3),
di(z) = d s ( z 9 i ) = for each
2;
e(z,i) =
dg(r(i))(Z)
=
+g(j)(z)
9
we have used formula (8.5) and the construction of j. 0
(8.7) Definition. (BLUM [1967b]) A general sire measure I (:N + IN is called canonical size mca8urc if there exista a recursive function b:N N such that for all naturals i and j, -+
(8.6)
Remark. From (8.6) it follows that for every canonical s h e measure the following two statements hold for each j: The set {iE N }l i 15 j}ia fmite.
(8.7)
There exists an algorithm which generates the set of all program di with l i I = j, i.e. by inspecting the fmite set {iC RV Ii 5 b ( j ) , I i I = j}.
(8.8)
(8.8) Example. The general sire meaaures in Example (8.2) and (8.3) are not canonical because the sets {iE RV I i I = j } are infmite for almoet all naturab j , thus contradicting (8.6).
I
13
443
Chaptor 5
(8.8) Example. Let (P,),20 be an effective enumeration of all UL pr-., N the general sire measure in Example (8.2). We g r a m and I (:N replace each UL program P, by the equivalent program p', which UWE only the regbtem XI,...&, where m is the total number of registers used by P,. In this wry we obtain an acceptable gGdelisation for which the total number of characters in each program gives a canonical she measure. 0
(8.10) Seholfum. (BLUM [l967b]) Let g , f : N -+ N be two recursive functions such that g has infmite range. If I I:N -+ Hv is a canonical sire measure, then we can effectively fmd two naturals i and j (depending upon g and f ) such that conditions (8.3)and (8.4)in Theorem (8.6)hold.
Proof. If I I:Hv RV is a canonical measure and 0 has infmite range, then the eet { lg(n) I .In E N}must be infmite (by (8.7)). -+
0
(8.11) Theorem. (MACHTEY and YOUNG [1978])Let recursive function satisfying the following two conditions:
range(g) is infmite, + u ( i ) is total for each natural i Then, for every canonical she measure
g:N-+ N be a (8.9) (8.10)
.
I I:N
-+
(4,,),,lo, the set Mu,(+") = {z EN Iz E range(g), y E range(g), if 4, = dl, then 1% I IIr I} is r.e.
N associated to and
for
each
Proof. We shall prove that A4g,(4sl is the domain of a certain p.r. function +:RV &HV. To this aim defme the partial function $:N&nV by I
pz[for each y E range(g) with Iv I C Iz 1, there exists a w 2 a d2)= 'such that #s(w) # +l(w)], if 2 E range(g) otherwise. 00,
,
\
In view of (8.1), (8.7)-(8.10) it follows that 91 is in fact a p.r. function. The inclusion dam($) c Mg,(,nlis obvious; to prove the converse inclusion we we (8.7).
444
Cdudc
Comment. The r.e. set of recursive functions enumerated by p is c k u l y a small fraction of the set of all recursive functions (this set in recureirely meagre by Corollary (3.9.18)). Nevertheless, it may include all the recursive functions which we are dealing with in practical computations. An illuminating example is the set of all primitive recursive functions. In connection with this subrecursive clasa we may aak whether one does need general programs for any practical purpose though all practically computable functions are primitive recursive and the loop programa are sufficient for computing them. Theorem (8.11) and Scholium (8.10) give strong reasons for answering the above question in the atrumative. Indeed, let g*:N IV be a recursive enumeration of all loop programs having smallest canonical sire (see Example (8.9) and Theorem (8.11)). Now, Scholium (8.10) (with g(z) = g*(z) and f ( z ) = nz) guarantees the eldstence of a primitive recursive function whose minimal (with respect to the canonical sire meaaure) loop program computing it has the canonical sire n times aa large aa the canonical sire of its minimal general program. Hence, general programs are preferable to loop programs in computing primitive recursive functions, in case the sire meaaure gives the comparison criterion. The next result can be viewed aa a complexity-theoretic version of the Uniform Recursion Theorem. --+
(8.i2) Theorem. (MACHTEY and YOUNG [1978]) There exiat two recursive functions T : N + N and h : M + RV such that for each total we have: 6qJ)(') = dbx(qS))(')*
'Or
'?
and
(8.11) (8.12)
Proof. We construct the auxiliary recursive function r :N3 --* EV ae follows: 'qJ)(z)9 if
+,2,60
=
'S(T(z))
%I(qS))(')
10,
where the recursive function T = Theorem (see Theorem (2.4.7)).
5
and
=Y
9
otherwise,
TIcomes from the Uniform Recursion
Assume 4, is total. If d b x [ q J ) ) ( # z ) c q then
445
Chapter 6
Put
(8.13)
Remark. In view of (8.13), the recursive function h is increasing in the second argument. We are ready to give information concerning the trade-offs between computational complexity measures and sire measures. We prove that for sufficiently complex functions, the increase in the number of performed steps that follows a reduction in sire is negligible.
(8.M) Theorem. Under the hypotheses of Theorem (8.6) there exists a recursive function h : @ + hV such that we can effectively fmd two naturals i and i (depending upon the given recursive functions g and f ) such that conditions (8.3) and (8.4) in Theorem (8.6) hold, and in addition @i(z)
I
(8.l4)
h(z,@g(j)(z))a*e.
Proof. The constants i and j come from Theorem (8.6) and the recursive function h is furnished by Theorem (8.12). It is seen that for each natural 2,
4i(z) = dg(j)(z) = ++;[o(j))(z)
-
Consequently, @i(z) I h(z,*+i(o(r(i)))(z) 0.e. = h(z,*,(j)(z))
*
(8.14) Seholium. (BLUM [1967b]) Let I I:N + JV be a canonical sire measure. There exists a recursive function h:M -+ RV such that for all recursive functions g,f :RV -.+ RV, if range(g) is infmite, then we can effectively fmd two naturals i and j (depending upon g and f ) such that conditions (8.3), (8.4) and (8.14) hold.
446
Cdude
Proof. Immedirrte from Scholium (8.10) and Theorem (8.13). 0
In contraat with Theorem (8.11), the set of all minimal indices with respect to a canonical sire measure I I:Bv -+ N ,
q,") = {z
lfor each Y with
A
= dl,
.I I 5
lY
I>
9
ie not r.e. Actually we have: (8.16) Theorem. unmune.
(BLUM (1967b], MEYER (1972)) The set M(+ ie
Proof. We shall prove that for every infmite r.e. set W c Bv, W n ( h r - M ( , 1) f 0.We return to the idea of the proof of Theorem (8.6). Let f :RV --r: N be an injective recursive function such that W = range( f ). Construct the p.r. function
$:p a Bv by
flit.) = df(fislj(s)>i$z)
9
for all i and z. The s-rn-n and Recursion T h e o r e m furnieh a fmed point zo:Sio(z) =
fliacz).
P ut no= f ( p z [ f ( z ) > io]). It follows that no E W, but no4 and i, < no. because 4i0 =
M(,*), . o
6.9.HISTORY
As we have already pointed out the fmt systematic programmingoriented studies in complexity were due to CLEAVE (19631, and MEYER and RITCHIE [1967a], [1967b] and concerned the primitive recursive functions. The papers of MEXER and RITCHIE contain the basic resulta concerning the LOOP language, the loop hierarchy and ite relation with GRZEGORCZYK c l w e r . Prior to these fundamental papers RITCHIE (19631, and COBHAM I19641 investigated the structural subrecursive hierarchies by meanr of complexity-theoretic toob. CONSTABLE [1971] extended the loop hierarchy through the multiple-recursive functions of PETER (1957). CONSTABLE and BORODIN [1972] contains a syskmatic rtudy of trade-off8 between program
Chapter 5
447
structure and computational complexity. The loop concatenation hierarchy waa investigated by GOETZE and NEHRLICH [1978], [1980]. Extensions of these hierarchies to sequence functions have obtained by FACHINI and MAGGIOLO-SCHETTINI [1979], [1982]. The universal language. UL comes from CONSTABLE and BORODIN [1972] and MACHTEY [1972]. The definition of computation-time closed sets of functions is essentially due to RITCHIE [1963]. The time analysis of loop and loopconcatenation hierarchies was made by MEYER and RITCHIE [1967a], [1967b], and GOETZE and NEHRLICH [l980]. The augmented LOOP languages and the related classification of recursive functions have been constructed by MACHTEY [1972]. h4EYER and RITCHIE (19721 developed a classification of recursive functions by means of the “elementary-honest” classes; MEHLHORN [1976] haa studied the “polynomial-honest” classes. Simple functions were fvst investigated by TSICHRITZIS [1970]. The analysis of the hierarchy (f.&,,, waa done in GOETZE and NEHRLICH [1981]. PRESBURGER’a characterisation of simple functions as well as the investigation of the complexity of simple functions can be found in IBARRA and LEININGER [1981]. The she measures were fvat introduced and investigated in BLUM (1967bl; HARTMANIS and HOPCROFT (19711, and MACHTEY and YOUNG I19781 contain the basic results on size measures. The following monographs contain results concerning the subrecursive programming hierarchies: BRAINERD and LANDWEBER (19741, SCHNORR [1974], CALUDE [1982b]; GOETZE and NEHRLICH [1980] is a good suwey paper in this area.
6.10. EXERCISES AND PROBLEMS
Section 6.2 (10.1) Show that for every k _> 2, [z/k] and rrn(z,k) are loopcomputable functions. How many loope are necessary for computing these functions? (10.2) h u m e that we allow only a finite number of register names. Under this restriction, does Theorem (2.7) remain true?
4#
Cdudc
Settfon 6.S (10.3)Prove that the functions [z/2] and t m ( 2 , 2 ) are exactly in
L 1- Lo.
(10.4)Prove that the functions zy and 2’ are exactly in L2-L,. (10.5) Give the exact position of the functions [z/2], rm(z,2), z i , and z’ with respect to the loop-concatenation hierarchy. (10.6) (GOETZE and NEHRLICH [1980])Prove that for all n 2 3, g1,...,g,:N -+Nare all in then the function h :Bv Bv, h(zf = f(g,(z),...,om(2)) ie in Li. (10.7)(GOETZE and NEHRLICH [lSeb]) Show that the classes n 2 3, are closed under limited summation and limited product. (10.8) Check the closure of the classes Li, n 2 3, under limited recursion and primitive recursion. k,m
fi,
2 1, if f :W -+RV is in Ln-l and
Li,
Section 6.4 (10.9) Construct in detail the acceptable giidebation induced by a systematic numbering of all general programs. (10.10)Prove the validity of BLUM axioms for the time partial functions associated to general programs. (10.11)Denote by UL - {LOOP,END} the set of all general programs not containing the instructions LOOP, END. Check if each per. function can be computed by a program in UL - (LOOP,END}. (10.12) Write CJL programs for the ACKERMANN-PETER and SUDAN functions. (10.13)Write UL programs for the time functions associated to the program in Exercise (10.12). Section 6.6 (10.14) (GOETZE and NEHRLICH [ISSO]) For all n in,...,i, 2 1, put .
.
- & 2-rJrn ’
L?....Jrn-
-
.
.
jm-l,....j,,,
(CLn-1
> m 2 2,
im-l,..& (in)
1
L~’”’”” the corresponding class of functions. i ,.-& Show that each class L,,” is computation-time closed. Prove that the classes (L~””””’) form a hierarchy of primitive
and denote by a)
b) recursive functions.
(10.15)Check the validity of Corollary (5.3) for n € 3. (10.18)Show that for every n 2 3, f.: contains an universal function
449
Chapter 6
for
Ln+
(10.17) Show that for all n 2 3, k 2 1, Lf+' contains an universal function for Lf. (10.18) Using the existence of the universal functions, prove that Li (respectively, Lf?;) contains a predicate which is not in L n-l (respectively,
LIZ). Section 6.6 (10.19)Exhibit examples of primitive recursively-dishonest functions. (10.20) (MACHTEY [1972]) Show that for every recursive function f :RV + Hv, we can effectively fmd a predicate g in L', such that for each general program P, computing 9 , we hare Timep(z) 2 f(z) a.e. Compare this result with the Compreosion Theorem (Theorem (3.4.19)). (10.21) (MACHTEY [1972]) If f , g : N + Hv are primitive L', then there eldsts a primirecursively-honest functions, such that 'L tive recursively-honest function h :Bv -* Bv, such that L f S Lh S LO.
5
Section 6.7 (10.22) a) Prove that the predicates A , V : M -+ (0,l)(see Exercise (1.10.6)) are simple. b) Prove that the predicates gr, t 8 are simple. (10.23) Fmd the constants T and M (aa in Definition (7.8)) for .the following simple functions C:w+ RV, C(z,y) = (l+)z, D:M 4 RV,
",d
= z4f.
(10.24) (TSICHRITZIS [1970]) Prove that the following problems are decidable: a ) Does an arbitrary simple function f:P + RV, n 2 1, take ultimately a given value k? b) Does two arbitrary simple functions f , g : W + N ,n 2 1, agree on all but a fmite number of n-uples? c) Is an arbitrary simple function bounded? (10.25) (IBARRA and LEININGER [1981]) Prove that the claas of simple functions coincides with the class of PRESBURGER functions. We briefly recall the defmition of PRESBURGER functions. We consider the (logical) formulao about natural numbers; P(zl, 2,) denotes a formula having n 2 1 free variables zl,...,z, . The set of PRESBURGER formulae is the smallest class of formula8 satbfying the following four conditions (GINSBURG and SPANIER [1966]):
...,
n8
(a) a,+Caizi ill
m
= be+xbizi is a PRESBURGER formula for i=I
d
450
Cdude
2 1, u, ,...,u,, b,,..,,b,. (b) If PI and P2are PRESBURGER formulae, then junction Pl A Pzand disjunction P1V Pa. naturals m
so are their con-
(c) If P is a PRESBURGER formula, then so ie its negation non(P). (d) If
P(z,,...,z,) is a PRI%BURGER
formula, then so is
( 3 zi)P(z1,*.vzn).
A (total) function f :W+ Bv, n 2 1, ia a PRESBURGER junction if there exists a PRESBURGER formula P(zl, ...,z,,~),such that for every (il,...,in) E W ,the following two conditions hold: i) if f ( i l,...,in)= j , then P(il,...,i*,j) is true, and
ii) if P ( i ,,...,in,j)is true, then f ( i l,...,in) = j. (10.26) (GOETZE and NEHRLICH [1981]) If 7is a class of numbertheoretic functions, then we denote by [q" the set of all functions of n variables in T, for e k h choice of n 2 1. Prove that for each n 2 1,
[L;In
s [L:I^ 5.5[L;-'I" 5[L;In 5[L;+'I^
=
[Ll)" .
Section 6.8 (10.27) Supply the formal details in Example (8.9). (10.28) (BLUM [1967b]) Prove that every two canonical sire meas-
+ hT are two canonical sire ures are recursively related, i.e. if I 1,1 (.:N measures, then we can effectively fmd a recursive function g : N 4 R V such that for each natural n:
a)
.1 I I dln I'h In I' 5 o(l. I).
b) (10.29) (BLUM (1967bl) Let I I,I (':N+ Qv be two canonical sire measures. Then we can effectively fmd a recursive function h:Qv --+ N such that for all naturals n and m:
I IIm I, then In I.I h( Im I.), b) i f h ( In I) 5 Irn I, then In 1' 5 lm I'. (10.30) (BLUM [l967b]) Let 1 (:h' + IV be
a) if In
a general sire meaeure and g : N + h' a recursive function such that 4,,(,,) = d,, for all n. Then, for all recursive functions f :N-+ N ,h :fl-c Qv, and for each natural i,we can effectively fmd a natural jsuch that a)
+i = dg(j),
b) f ( l i I) < ldi)I, c) h(z,Oi(z)) < O,(jl(z), for every z in nV with d r ( z )# ca (10.31) (MACHTEY and YOUNG (19781) a) Prove that the function
Chapter 5
f
:N-+ RV
451
defmed by
f (2) = pv[d,(O) = z and for each natural k, ifh(0)=
2 7
then lk
I2 Iv I1
9
i s not recursive.
b) Compare the above result with the fwst example in Section 4.1.
This Page Intentionally Left Blank
463
BIBLIOGRAPHYT
ACKERMA", W., Zum Hilbertwhen Aufbau der r e e h n Zahlen, Math. Ann. 99 (1928), 118-133.
ADLEMAN, L., POMERANCE, C. and RUMELY, R., On dutinguihing prime numberr from comporite numberr, Ann. of Math. (2) 117 (1983) 173-208. ADRIANOPOLI, F.,Una nuova forma normale per le funrioni parridi ricorrive, UniveraitZ degh rtudi di Salermo, Prcprint Series, ISI-TR-017, 1978. ADRIANOPOLI, F. and DE LUCA, A., Closure oprrationr on meuurer on computational complexity, Cdcolo 2 (1974), 1-13. AHO, A.V., HOPCROFT, J.E. and ULLMAN, J.D., The D e r i p and Analytir of Computer Algorithms (Addiron-Werley, Reading Mw., 1974). AMIR, A. and CHOUEKA, Y., Loopprogramr and polynornia& computabh functionr, Internat. J. Comput. Math. 9 (1981), 196206.
ARBIB, M A , Theorier of Abstract Automata (PrenticaHalI, E n g l e w d Cuffs, N.J., 1969). ASSER, G., Rekurrive wortfunktionen, Z. Math. Logik Grundly. Math. 6 (lOeO), 258-278.
AZRA, J.P. and JAULIN, B., Recurrivite' (Gauthier-Viarr, Paru, Bruxeller, Montrdd, 1973). BLAKLEY, G.R. and BOROSH, I., Knuth'r iterated powers, Adv. in Math. 34 (l979), 109138. BLUM, L. and BLUM, M.,Toward a mathematical theory of inductive inference, Inform. and Control 28 (l975), 126-155. BLUM, M.,Recurrive function theory and r p d of computation, Canad. Math. Bull. 9 (1966), 746760. BLUM, M.,A machineindependent theory of the complexity of recurrive functionr, J. a. Comput. Mach. 14 (1967a), 322-336. BLUM, M.,On the rise of machines, Inform. and Control 11 (1967b), 267-266. Journal titler are abbreviated according to Mathematical Review.
454
Cdude
BLUM, M.,On effective procedurer for rpeeding up algorithmr, in: ACM Sympoaium on Theory of Computing, 1969, 43-53. BOOK, R.V.,Brief bibliography on computational complexity, Aiken Computation Laboratory, H a r r u d Univerrity, 1969. BOREL, E., Le calcul dcr ink’graler definer, Journal de Mathdmatiquer 8 (1912), 159-210. BOREL, E., Lea paradoxeo de I’infini (Gallimud, 1946).
BORODIN,A.B., Complexity clmaes of recurrive functiono and the exirtence of complexity gaps, in: ACM Symposium on Theory of Computing, 1969, 67-78.
BORODIN, A.B. and MUNRO, J.I., The Computational Complexity of Algebraic and Numeric Problem8 (American Ehevier, New York, 1975). BRAINERD, W.S. and LANDWEBER, L.H., Theory of Computation (John Wiley and Sonr, New York, 1974). BUZETEANU, S. and DIMA, N.,Arithmetiiation of the computation of Sudan and Knuth functiono, in: INFO-IASI’83, Proc. 4th National Colloquium on Computer Science, h i , 1983, 103-110 (Romanian). CALUDE, C., Darboux property and primitive recurrive functionr, Rev. Roumaine Math. Pureo Appl. 26 (1981), 1187-1192. CALUDE, C., Topological lire of retr of partial recuroive hnctionr, Z. Math. Logik Grundlag. Math. 28 (1982a), 456462. CALUDE, C., Computational Complexity. Qualitative Aspeeti (Ed. S t i t i h a ri Enciclopedica, Bucurcrti, 1982b (Romanian)). CALUDE, C., On a c l v r of independent problemr related to Rice theorem, ACM SIGACT New0 15 (1983a), 53-57. CALUDE, C.,A simple non-uniform operation, Bulletin of EATCS 20 (1983b), 40-46. CALUDE, C. and CHITESCU, I., Random atringn according to A.N. Kolmogorov and P. Mutin-Lif. C l w i c d approach, Found. Control Engrg. 7 (1982a), 73-86. CALUDE, C. and CHITESCU, I., Strong noncomputabiiity of random otringr, Internat. J. Comput. Math. 11 (1982b), 43-45. CALUDE, C. and CHITESCU, I., On repreoentabiiity of (1983a), 42-47.
P. Martin-Liif terto, Kybernetika 19
CALUDE, C. and CHITESCU, I., On a (too) general theory of raodom sequencer, in:
Bibliography
456
DEMETRESCU, M.C. .ad IOSIFESCU, M. (eds.), Studia in Probability and R e h k d Topiu, Paprrs in Honour of Octav O n i c a u on Hi 90th Birthday ( N y u d Publirhrr, 1QWb,6669). CALUDE, C. and CHITESCU, I., Reprewntability of recursive P. Muti-Liif teab, Kybernetika 19 (198k), 62G536. CALUDE, C. and FANTANEMU, B., On recursive, non-primitive recursive functionr, Bull. Math. Soc. Sci. Math. R.S. Roumanie (N.S.)22 (1978), 366-366. CALUDE, C., MARCUS, 5. and T E W , I., The first example of a recursive function which ir not primitive recursive, Hitoria Math. 6 (1979), 380.384. CALUDE, C., MARCUS, S. and TEW, I., Recursive properties of Sudan’s function, Rev. Roumaine Math. Purer Appl. 26 (1980), 503607. CALUDE, C. and PAUN, Gh., Independent instancu for wme undecidable problems, RAIRO Inform. Thebr. 17 (1983), 49-64. CALUDE, C. and TATARAM, M.,Univerrd sequencer of primitive recursive functions, Rev. Roumline Math. Purer Appl. 28 (1983), 381-389. CALUDE, C. and VIERU, V., An iterative normal form for p u t i d recurrive functionn, Found. Control Engrg. 3 (1981a), 133144. CALUDE, C. and VIERU, V.,A note on Knuth i k r a k d powers, An. S t i t . Univ. “A.1. C u d ’ Inri Sect. I Mat. (N.9.) 27 (1981b), 263-266. CALUDE, C. and ZIMAND, M.,A relation between correctneu and randomneu in the computation of probabilirtic dgorithmr, Internat. J. Comput. Math. 16 (l984), 47-53. CEITIN, G.S., Mem-vduc theorems in conrtructive analysu, Trudy Mat. Inst. Steklov 67 (l962), 362-384. (Russian) CHAITIN, G.J., On the length of programs for computing fiite binuy sequencer, J. Auoe. Comput. Mach. 13 (l966), 647-569. CHAITIN, G.J., Information-theoretic limitations of formal system, J. hm. Comput.
Mach. 21 (1974), 403-424.
C U T I N , G.J., A theory of program sire formally identical to information theory, J. Awe. Comput. Mach. 22 (1976), 329-340. CHAITIN, G.J.,Algorithmic information theory, IBM J. R ~ I Develop. . 21 (1977), 360-369. CHAITIN, G.J. and SCHWARTZ, J.T., A note on Monte C u l o primdity teati and rithmic information theory, Comm. Pure Appl. Math. 31 (l978), 621427.
ao-
456
Calude
CHURCH, A., A m t of portulater for the foundation of logic, Ann. of Math. 33 (1932),346366. CHURCH, A,, A m t of pwtulater for the foundation of logic (wcond paper), Ann. of Math. 34 (1933),839-864. CHURCH, A., An unsolvable problem of elementary number theory, Amer. J. Math. 58 (1936),345363.(Ako in DAVIS [l966],89-107) CLEAVE, J.P., A hierarchy of primitive recurnive functionr, Math. 9 (19633,331-345.
Z. Math. Lo& G r u n d l y .
COBHAM, A,, The intrinric computational difliculty of functionr, in: BAR-HILLEL, Y. (ed.), Proctedinp of the Congrew on Logic, Methodology and Philoaophy of Science, Haifa, brael (North-Holland, h a t e r d a m , 1964, 2430). CONSTABLE, R.L., Subrecurrivtprogramminng lurguyer III. The multiple-recurnive functionr R”,in: Symporium on Computein m d Automata, Polytechnic Inntitute of Brooklyn, 1971,393-410. CONSTABLE, R.L., The operator gap, J. Auoc. Comput. Mach. 19 (1972),176-183. CONSTABLE, R.L. and BORODIN, A.B., Subrecurrive programming languages, Part I: Efficiency and program ntructure, J. h o c . Comput. Mach. 19 (1972),526-668.
COOK,S.A.,An overview of computational complexity, Comm. ACM 26 (1983),401-408. DALEY, R.P.,Quantitative and qualitative information in computation, Inform. and Control 45 (l980),236-244. DAVIS, M.,Computability and Unnolvability (McCraw-Hill, New York, Toronto, London, 1968). DAVIS, M.,The Undecidable (Raven Prenr, Hewlett, New York, 1966). DAVIS, M.,Hilbert’r tenth problem u unrolvable, Amer. Math. Monthly 80 (1973),233-269. DAVIS, M.,What L a computation? in: STEEN, LA. (ed.), Mathematicr Today, Twelve Informal Earayi (Springer-Verlag, New York, Heidelberg, Berlin, 1978,241-267). DAVIS,
M.,Why
W e 1 didn’t have Church’i therir, Inform.and Control 64 (l982),3-24.
DEDEKWD, R.,Was rind und w i u iollen die Zahlen? (Braunrchweig, 1888). (Cited following
KLEENE IlQEl])
DEKKER, J.C.E., Two noter on recurrively enumerable retr, Proc. Amrr. Math. Soc. 4 (1953),496501.
Bibliography
457
DE LEEUW, K.,MOORE, E.F., SHANNON, C.E. and SHAPIRO, N., Computability by probabiliatic machinea, in: SHANNON, C.E. m d McCARTHY, J. (edi.), Automata Studies (Princeton Univ. Prcrs, Princeton, N. J., 1966, 183-212). DIMA, N., Sudan’s function u universal for the c h i of primitive rccuriive functions, Stud. Cerc. Mat. 33 (leal), 69-67. (Romanian) EILENBERG, S. and ELGOT, C.C., Recurriveneir (Academic P r u r , New York, London, 1970).
ENDERTON, H.B., Elementr of recursion theory, in: BARWISE, J. (cd.), Hmdbook of Mathematical Logic (North-Holland, Amsterdam, 1977, 527-666). ERDOS, P. and MILLS, G., Some boundr for the Ramrcy-PariEHurin&on numbers, J. Combin. Theory Ser. A, 30 (1981), 53-70. FACHINI, E. and MAGGIOLO-SCHETTINI, A., A hierarchy of primitive recurrive iequence functiona, RAJRO Inform. Thew. 13 (1979), 49-67. FACHINI, E. and MAGGIOLO-SCHETTINI, A., Comparing hieruchier of primitive recursive sequence functions, Z. Math. Logik Grundly. Math. 28 (1982), 431-446.
FINE, T.L., Theoriea of Probability. An Examination of Foundationr (Academic Prers, New York, 1973). FREIVALDS, R., Letter to the author (August 17, 1983). GAREY, M.R. and JOHNSON, D.S.,Computcri and Intractability: A Guide to the Theory of U P - Complebcnesr (W.H. Freeman, San Francirco, 1978). GEORGIEVA, N.V., C l a m r of oneargument recursive functioni, Z. Math. Logik Grundlag. Math. 22 (1976a), 127-130. GEORGIEVA, N.V., Hierarchies of one argument primitive recursive functions, C.R. A c d . Bulgare Sci. 29 (1976b), 919-922. GILL, J., Computational complexity of probobiliatic Turing machioar, SIAM J. Comput. 6 (1976), 675-696.
GILL, J. and BLUM, M.,On almoit everywhere complex recurrive hnctionr, J. h o c . Comput. Mach. 21 (1974), 425-436. GINSBURG, 9. and SPAMER, E., Semigroupr, Prcrburger formulu, and Isngurpr, Pacific J. Math. 16 (1966), 286-296. GLADSTONE, M.D.,Simplification of recuriion rchcme, J. Symbolic Logic 36 (1971) O M 666.
458
Calude
CODEL, K , Uber formal unentacheidbare Sata der Principia Mathematica und verwandter Systeme I, Monatsh. Math Phys 38 (1931),115198. (English translation in DAVIS ;1965], 5-38)
CODEL, K., On Undecidable Propoiitionr of Formal Mathematical Syrtems, Mimeographed Notei by S.C. KLEENE and J.B. ROSSER, Institute for Advanced Study, 1934. (Also in DAVIS (19651, 39-73). GODEL, K , Uber die Lange der Beweise, Ergeb. eines math. Kolloquiume 7 (l936),23-24. (English translation in DAVIS [1965], 82-83). COETZE, 8. and NEHFUICH, W., Loop propamr and claarer of primitive recursive functions, in: Proc. 7th Sympoiium Mathematical Foundationr of Computer Science 1978,Lecture Notcr in Comput. Sci. 64 (1978), 232-237. GOETZE, 8. and NEHRLICH, W.,The structure of loop programs and subrecursive hierarchies, 2. Math. Logik Grundlag. Math. 26 (1980), 256-278. GOETZE, B. and NEHRLICIi, W.,The number of loop8 necersary and sufficient for computing rimple functionr, Elktron. Informationrverarb. Kybernet. 17 (l981),363-376. GRZEGORCZYK, A., Some clansea of recursive functionr, Roiprawy Matematycine 4 (1953),1-46. GUY, R.K.,Unrolved Problems in Number Theory (Springer-Verlag, N e w York, Heidelberg, Berlin, 1981).
HARROW,K., Equivalence of some hierarchies of primitive recursive functionr, 2. Math. Logik Grundlag. Math. 25 (1979), 411-418. HARTMAMS, J., Computational complexity of one-tape Turing machine computations, J. Aaioc. Comput. M x h . 15 (l968),325-339. HARTMAMS, J., On the problem of hiding natural computational complexity measures, Cornell Univeriity, Technical Report 73-175,1973.
HARTMAMS,J. and HOPCROFT, J.E., An overview of the theory of computational complexity, J. h r o c . Comput. Mach. 18 (loll),444475. HARTMANlS, J. and HOPCROFT, J.E., Independent rerultr in computer science, ACM SIGACT N e w i 8 (1976), 13-24. HARTMAMS, J. and STEARNS, R.E., Computational complexity of recurrive sequencer, in: IEEE Proc. FiRh Annual Sympoiium on Switching Circuit Theory and Logical Derign, 1964, 82-90.
HARTMAMS, J. and STEARNS, R.E., On the computational complexity of algorithmr, Trani. Amer. Math. SOC.117 (lees),286306.
Bibliography
459
HELM, J.P., On efktivoly computable operators, Z. Math. Lo& Grundly. Math. 17 (1971), 231-244.
HELM, J.P. and YOUNG, P., On rise
VI.
efficiency for programr admittins speed-up, J.
Symbolic Logic 30 (1971),21-27.
HENKE,F.W., INDERMARK, K., ROSE, G. m d WEIFIRAUCH, K., On primitive recurrive word functionr, Computing 16 (1976),217-234.
HENNIE,F.C., Introduction to Computability (Addiron Wesley, New York, 1977). HENNIE,F.C. and STEARNS, R.E., Two-tape simulation of multitape Turing mrchincr, J. Comput. Mach.13 (1960),633-648.
hloc.
HEFlMES, H., Enumerability, Decidability, Computability (Academic Pram, New York, 1966).
HILBERT, D., Uber d m Unendliche, Math. Ann. 96 (1920), 181-190.(English translation in VAN HEIJENOORT [1907], 367-392) IBARRA, O.H. and LEININGER, B.S.,Chuacterirationr of Presbur~erfunctioni, SUM J. Comput. 10 (lQ8l),22-39. IRLAND, M.I.and FISCHER, P.C., A bibliography on computationd complexity, Rer. Rep. CSRR 2028, University of Waterloo, 1970.
JANKO, W.H., A bibliography on randomired algorithmr, Bulletin of EATCS 18 (1982), 16-20. JOSEPH, D. and YOUNG, P.,A rurvey of rome recent resultr on computational complexity in weak theories of arithmetic, in: Proc. 10th Symposium Mathematical Foundations of Computer Science, 1981,Lecture Noter in Comput. Sci. 118 (1981),46-80. KAMAE, T., On Kolmogorov complexity and information, Oaaka J. Math. 10 (1973),306
307. KATSEFF, H.P., Complexity dips in infinite binary mquenca, Inform. and Control 3.8 (1978), 268-263. KATSEFF, H.P. and SIPSER, M.,Several results in program sire complexity, Theorat. Comput. Sci. 16 (1981),291-309. KETONEN, J. and SOLOVAY, R., Rapidly growing R~MIIOYfunction#, Ann. of Math. 113 (l981),287-314. KFOURY, A.J., MOLL,R.N. and ARBIB, MA., A Programming Approrch to Computability (Springer-Verlag, New York, Heidelberg,&rlin, 1982).
400
Calude
KLEENE, S.C., General recurrive functionr of natural numberr, Math. Ann. 112 (1936), 727-742. ( A h in DAVIS [1966], 236253) KLEENE, S.C., Introduction to Metunathematic8 (North-Holland, Amsterdam, P. Noardhoff, Groningen and D.Van Nostrand, Toronto and New York, 1962).
KLEENE, S.C., Extenrion of an effectively generated clur of functionr by enumeration, Colloq. Math. 6
(lose),67-78.
KLEENE, S.C., The theory of recurrive functionr, approaching itr centennial, Bull. Amcr. Math. SOC. (N.S.) 5 (loel), 43-61. KNUTH, D.E., The Art of Computer Programming, Seminumerical Algorithmr (Vol. 2) (Addiron-Weiley, Reading MA,1989). KNUTH, D.E., Mathematics and compukr rcience: Coping with finitenerr, Science 194 (1976), 123S-1242. KOLMOGOROV, A.N., Three approaches for defming the concept of "information quantity", Problemy Peredaci hformacii 1 (l96S), 3-11. (Rurrian) KOLMOGOROV, A.N., Logical b u b for information theory and probability theory, IEEE Trans. Inform. Theory 14 (l968), 662-1384. KOLMOGOROV, A.N., Combinatorial brrir for information theory and computable probability, Urpekhi Mat. Nauk 38 (1983), 27-36. (Ruirian) KREISEL, G., LACOMBE, D. and SHOENFIELD, J.R., Partial recurrive functionah and effective operationr, in: HEYTING, A. (ed.), Conrtructivity in Mathematicr (North-Holland, Amrterdam, 1959, 195-207). LACHLAN, A.H., Eflective operatori in a general irtting, J. Symbolic Logic 29 (l964), 163178. LANDAU, S., Primer, codel and the National Security Agency, Noticer Amer. Math. SOC. 30 (lass),7-10. LANDWEBER, L.H. and ROBERTSON, R.L., Recuriive propertier of abrtract complexity clmer, J. h i o c . Comput. Mach. 19 (1972), 296308. LEWIS, F.D., The enumerability and invariance of complexity cluier, J. Comput. Syrtem Sci. 5 (1971), 288303. LOFCREN, L., Complexity of dercriptioni of ryitemr: A foundational atudy, Internat. J. Gen. Syitemi 3 (1977), 197-214. LOVELAND, D.W., A variant of the Kolmogorov concept of complexity, Inform. and Control 16 (I989),51&626.
Bibliography
48 1
MACHTEY, M., Augmented loop languagem and clurer of computable functionr, J. Cornput. Syrkrn Sci. 6 (1972),003-624. MACHTEY, M. and YOUNG, P., An Introduction to the General Theory of Algorithmr (North-Hollmd, Amrkrdam, 1978). MALITZ, J., Introduction to Mathematical Logic (Springer-Verlag, New York, Heidelberg, Berlin, 1919).
MA", Y.I., A Courre in Mathematical Logic (Springer-Verlag, New York, Heidelberg, Barb,1977).
MA", Y.I., Expanding conrtructive univeraer, in: ERSOV, A.P. and KNUTH, D.E. (edr.), Algorithms in Modern Mathematics and Computer Science, Lecture Noter in Comput. Sci. 122 (l981),256260.
hu", I., Probabiliitic recurrive functionr, Tranr. h e r . Math. Soc. 177 (1973),447-467. MARCUS, D.A.,An alternative t o Euclid'r algorithm, Amer. Math. Monthly 88 (1981). 280. 283. MARKOV, A.A., Theory of algorithmr, Trudy Math. Inat. Steklov 38 (l95l), 176-189.( R u e rim) MARKOV, A.A., The Theory of Algorithms (National Science Foundation, Wmhington, D.C., 1981). MARTIN-LOF, P., On the orcillation of the complexity of infinite binary requencer, (1986), (Unpubbhed manuscript; cited from MARTIN-LOF [l971])( R u d a n ) MARTIN-LOF, P., Algorithma and Random Sequencer (Erlangen Univerrity, Niirnberg, Erlangen, 1966a). MARTIN-LOF, P.,The definition of random iequencer, Inform. and Control 9 (1968b), 602619. MARTIN-LOF, P., Nokr on Constructive Mathematicr (Almqvirt & W i k ~ l I ,Stockholm, 1970). MARTIN-LOF, P., Complexity orcillationr in infinite binary sequencer, 2. Wahrach. Verw. Gebiete 19 (1971),225230. McCREIGHT, E. and MEYER, A.R., Clolrer of computable functionr d e f i e d by boundr on computation, preliminary report, in: ACM Symporium on Theory of Computing, 1909, 79-88. MEHLHORN, K., On the rise of computable functioni, in: IEEE Annual Symporium on S r i k h i n g and Automata Theory, Univ. Iowa, Calii., 1973,19G198.
482
Calude
MEHLHORN,K.,Polynomial and sbrtract nubrecurrive cl.uc8, J. Comput. Syrtem Sci. 12
(1976),147-178.
MEYER, A.R., Propun rim in rertrickd progrunming Ianguager, Inform. and Control 21 (1972),382-394.
MEYER,A.R. and FISCHER, P.C., Computational epeed-up by effective operatori, J. Symbolic Logic 37 (1972),56-68.
MEYER, A.R. and MOLL, R., Honest boundr for complexity c l v r e r of recursive functionr, in: Proc. 13th Annual Switching and Automata Theory Coot College Park, Md.,1972,
61-66.
MEYER,A.R. and RITCHIE, D.M., Computational complexity and program rtructure, IBM Remarch Report RC 1817,1967a. MEYER,A.R. and RITCHIE, D.M., The complexity
of loop programr, in: Proc. 22 Nit.
ACM Conf. (1967b),465-470. MEYER, A.R. and RITCHIE, D.M., A clsriification of functionr by computational complexity, in: Proc. Hawaii International Conference on SyNtem Science, Hawaii, 1968,17-19.
MEYER, A.R. and RITCHIE, D.M., A clsrrification of recurrive functionr, Z. Math. Lo@ Grundlag. Math. 18 (1972),71-82.
MEYER,A.R. and W " N , K., The fundamental theorem of complexity theory, preliminary vereion, Foundationr of Computer Science IU (Third Advanced Couru, A m r t e r d m , 1978) Part I (Mathematier Ctntrum, Amrterdun, 1979,97-112). MILLER, C.L.,Riemann'i hypotherin and t e r k for primality, J. Comput. Syrtem Sci. 13 (1976),300-317. MINSKY, M.,Probkmc of formulation for artificial intekligence, in: BELLMAN, R.E. fed.), Mathematical Problemr in the Biological Sciencer, Proc. Sympor. Appl. Math. 14 (l962),36.
MINSKY,M., Computation: Finite and Infinite Machine8 (Prentice-Hall, Engkwood Cliffi, N.J., 1967). MORDELL, L.J.,Diophantine Equationr (Academic P r e u , London, New York, 1969). MYHILL, J. and SHEPHERDSON, J.C.,Effective operationr on partial recuriive functionr, 2. Math. Logik Grundlag. Math. 1 (1965),310-317.
NALIMOV, V.V., Facer of Science (IS1 P r e u , Philadelphia, 1981). NOVIKOV, P.S., Elementr of Matbematical Logic (Ed. Stiintifica, Bucurerti, 1966) (Romanian)
Bibliography
463
OSTROWSKI, A.M.,On two problemr in abrtract algebra connected with Horner'r rule, in: Studier Prewnted to R. von MLea (Academic Prerr, New York, 1964,4&48). OXTOB?, J.C., MepIure and Category (Springer-Verlag, Berlin, Heidelberg, New York, 1971). PARIS, J. and HARRINGTON, L., A mathematical incompletenew in Peano arithmetic, in: BARWISE, J. (ed.),Handbook of Mathematical Logic (North-Holland, Amrkrdun, 1977, 1133-1142).
PAZ, A., Introduction to Probabilitic Automata (Academic Prcri, New York, London, 1971). PEANO, G., Arithmcticcr principia, nova methodo expoaita (Turin, Bocca, 1889). PETER, R., Uber den Zurarnmenhrng der verrchiedenen Bepiffe der rekurriven Funktion, Math. Ann. 110 (1934),612-632. PETER, R., Rekurrive Funktionen (Verlag der Ungarirchen Akademie der WiuenechaRen, Budapeit, 1957). PETER, R., Recurrive Function8 in Computer Theory (Akadehiai Kiadd, Budapeat, 1981). POST, E.L., Finite combinatory processer. Formulation I, J. Symbolic Logic 1 (1936) 103105. (Ah0in DAMS (1965],288-291) POST, E.L., Formal reductionr of the general combinatorid decbion problem, Amer. J. Math. 65 (1943),197-215. RABIN, M.O.,Speed of computation of functionr and cladicatioa of recuriive rctr, in: Proc. Third Convention Sci. Soc., Israel, 19W,1-2.
W I N , M.O.,Degree of difficulty of computing a function and a partial ordering of recurrive rctr, Hebrew University, Jeruralem, Technical Report nr. 2, 1980. RABIN, M.O.,Real-time computation, Lrael J. Math. 1 (1963),203-221. RABIN, M.O.,Probibdintic algorithma, in: TRAUB, J.F.(ed.), Algorithm and Complexity, New Directionr and Recent Rerultr (Academic P r e u , New York, 1976,21-39). RABIN, M.O.,Complexity of computations, Comm. ACM 20 (1977),626633, Corrigendum: 21 (i97a),231. RICE, H.G., C ~ U K I of recurrively enumerable w t r and their decuion problemr, Tram h e r . Math. SOC.74 (1963),358-366. RICE, H.G., Recutrive real numbcrr, Proc. Amer. Math. Soc. 5 (1964),784791.
464
Calude
RICE, H.G., On completely recurrively enumerable clrrrer and their key arrayr, J. Symbolic Logic tl(lQS6), 304308. RITCHIE, R.W., Clurer of predictable computable functionr, Tranr. h e r . Math. Soc. 106 (lea) 139-173. , RITCHIE, R.W., Clurer of recurrive functions b u e d on Ackermann’r function, Pacfic J. Math. 16 (l965),1027-1044. M T , R.L., SHAMIR, A. and ADLEMAN, L., A method for obtaining digitd r i p a t u r c r and public-key cryptoryrtema, Comm. ACM 21 (1978),120-126. ROBERTSON, E.L., Complexity clrrrer of partial recurrive functionr, preliminary version, in: Thud Annual ACM Symporium on Theory of Computing, 1971,268-268. ROBINSON, R.M., Primitive recurrive functionr, Bull. h e r . Math. Soc. 53 (1947),925-942. ROGERS, H.,G d e l numberingr and partial recurrive functionr, J. Symbolic Logic 23 (1958),331-341. ROGERS, H.,Theory of Recurrive Function8 and ERective Computability (McGraw-Hill, New York, 1967). SANTOS, E.S., Computability by probabilistic Turing machino, Tranr. Amer. Math. Soc. 159 (1971),165-184. SCHNORR, C.P., Do- the computational apeed-up concern programming! in: NIVAT, M. (ed.), Automata, Languagea and Programming (Norlh-Holland, Amrterdam, 1973,585-591). SCHNORR, C.P.,Rekurrive Funktionen und ihre Komplcxitit (Teubner, Stuttgart, 1974). SCHNORR, C.P., A rurvey of the theory of random requencei, in: BUTTS,R.E.and HINTJJCKA, J. (eds.), B a i c P r o b l e m in Methodology and Linguuiticr (D. Rcidel, Dordrecht, 1977,193-210). SCHNORR, C.P. and STUMPE, G., A characterisation of complexity sequencea, 2. Math. Lo& Grundlag. Math. 21 (1975),47-56. SHEPHERDSON, J.C.and STURGIS, H.E., Computability of recuraive functionr, J. Comput. Mach. 10 (1963),217-256.
~ I O C .
SKOLEM, T., Begrundung der elementaren Arithmetik durch die rekurrierende Denkweire ohne Anwendung rcheinbare.Ver~derlichen mit unendlichem Ausdehnunpbereich, Skrifter utgit av Videnrkapsreiakapet i Krutirnia, I. Matematuik-Naturvidenrkabelig K l w , 1923 (Englih tranrlation in VAN HEIJENOORT [l967],302-333) SMORYNSKI, C., Some rapidly growing functionr, Math. Intelligencer 2 (lOzIO), 149-164.
Bibliography
485
SMORYNSKI, C., “Big” newr from Archimeder to Friedman,Noticar Amer. Math. Soc. 30 (1983),251-266. SMULLYAN, R.M., Theory of Formal Syikmi (Amah of Mathematicr Studier, Princeton, New York, 1961). SOLOMONOFF, R.J., A formal theory of inductive inference, Part I, Inform. and Control 7 (1964), 1-22. SOLOVAY, R. and STRASSEN, V.,A rut Monk-Carlo tent for primality, S U M J. Comput. 6 (1977),8485,Erratum: 7 (1978),118. SPECKER, E.,Nicht konrtruktiv beweirbare S i t s der Andytir, J. Symbolic Logic 14 (l949), 145-168. STAIGER, L., ReprcMntabk Martin-Lot terti (Manulcript, March 1984). STEARNS, R.E., HARTMANIS, J. and LEWIS, II, P.M., Hierarchiei of memory limited computationr, in: IEEE Conf. Rec. on Switching Circuit Theory and Logical Darim, 1965, 179190. STRONG, H.R., Algebraically generalized recutrive function theory, IBM J. Res. Develop. 12 (lOeS),465-475. SUDAN, G., Sur Ie nombre trandiii w “, Bull. Math. Soc. Roumaine dcr Science8 30 (1927), 11-30.
TRAKHTENBROT, B.A., Complexity of Algorithms and Computationm, Courae noter, Novoaibirrk, 1967. (Ruuian) TSICHRITZXS, D., The equivalence problem of rimple loop progrwnr, J. AJIOC. Comput. Mach.17 (1970),729-738. TURING, A.M.,On computable numberr, with an application to the Enticheidungaproblem, Proc. London Math. Soc. 42 (1936),230-266,Correction: 43 (1937), 544546. (Ah in DAVIS Il065],116-161,162-154) USPENSKY, V.A., Lecturei on Computable Function1 (Gorudarrtvennoye Irdat. Fir.-Mat., Lit., Morcow, 1980). (Rusrian) USPENSKY, V.A. and SEMENOV,A.L., What are the gain& of the tbeory of algorithmr: Buic developmenti connected with the concept of a o r i t h m and with its application in mathematicr, in: ERSOV, A.P. and KNUTH, D.E. (edi.), Algorithmr in Modern Mathematicr and Computer Science, Lecture N o k i in Comput. Sci. 122 (1981),100-234.
VAN EMDE BOAS,P.,Ten yeari of ipcsd-up, in: Proc. 4th Symporium Mathematical Foundations of Computer Science 1976,Lecture Notcr in Comput. Sci. 32 (1976),232237.
466
Calude
VAN HEIJENOORT, J., From Frege to M e l . A Source Book in Mathematical Logic, 18791931 ( H u r u d Univ. Pram, Cambridge, Mur. 1967).
VEFtBEEK, R., Primitiv-Rekurriv Grregorcryk-Hieruchien (Univerritit Bonn, Informatik berichte, Bonn, 1978). VON NEUMA", J., The general and logical theory of automata, in: TAUB, A N . (ad.), Collected Workr, vol. 5 (Pergamon Preu, Oxford, London, New York, Pub, 1963,288-328). WAGNER, E.G., Uniformly reflexive rtructurm: On the nature of gadelirationr and relative computability, Tranr. Amer. Math. SOC. 144 (1969),1-41. WEIHRAUCH, K.,Tcilklaurrcn primitiv-rekurriver Wortfunktionen, Berichte der GMD 91 (1974,1-49. WEYL, H., Uber die neue Grundlyenkrue der Mathemrtik, Math. 2. 10 (1921),39-79.
YAMADA, H.,Rcal-time computation and recurrive functionr not real-time computable, IRE Tranr. 6 (l962),753-760. YASUHARA, A., Reeurrivc Function Theory and Logic (Academic Prerr, New York, London, 1971). YOUNG, P., Eary conrtructionr in complexity theory: Gap and rpeed-up theoremr, Proc. Amer. Math. SOC. 37 (1973),556-5133. W-TING, S., A "natural" enumeration of non-negative rational numberr. An informal d b Amer.Math.Monthly 87 (1980),25-29.
currion,
ZIMAND, M.,Complexity of probabilirtic algorithm, Found. Control Engrg. 8 (1983a), 33-49.
ZIMAND, M.,Perronal communication. (October 1983b) ZVONKIN, A. and LEV", L., The complexity of finite objectr and the development of the conceptr of information and randomncrr by m e m i of the theory of dgorithmr, Uprekhi Mat. Nauk 166 (1970),85-127.(Rurrian)
BIBLIOGRAPHY ADDED IN PROOF MIIR, A. m d CHOUEKA,Y., Polynomial computrtionr in non-detarminintic loop-propmu and PL-propma, Internat. J. Comput. Math. 14 (1983), 209.211.
AWR, A. and CHOUEKA,Y., A q n t r e t i c d definition of the Comput. M J h . 17 (lWS), 217-128.
P = 4 P problem,
Inkmat. J.
Bibliography
467
BEESON, M.J., Foundations of Constructive Mathematici (Springer-Yerly, Berlin, Heidelberg, New York, Tokyo, 1986). BORGER, E., HASENJAEGER, G. and RODDING, D. (edr.), Logic and Machiner: Decision Probhmr and Complexity, Proceedings, Lecture Noter in Comput. Sci. 171 (1984). BUZETEANU, S., Some pnaralirrtioni of Kleene's wcond rued-point theorem, Bulletin of EATCS 26 (1986),1419. CALUDE, C. and CHITESCU, I., A c l v r of univerral P. Martin-L6f tertr, Bulletin of EATCS 23 (1984),15-22. CALUDE, C., CHITESCU, I. and STAIGER, L., P. Martin-LBf tarts: Reprewntability and embeddability, Rev. Roumaine Math. Purer Appl. 30 (1986),719-732. CICHON, E.A. and WAINER, S.S., The slow-growing and the Grregorcryk hierarchier, J. Symbolic Logic 48 (1983),399-408.
DAVIS, M. and WEYUKER, E.J., Computability, Complexity and Languager (Academic Preu, Orlando, San Diego, New York, London, Montreal, Sydney, Tokyo, 1983). EBBINGHAUS, H.D.,MULLER, G.H. and SACKS, G.E. (edr.), Recurrion Theory Week, Proceedings, Lecture Nokr in Math. 1141 (1984). ENGLEFRIET, J., The non-computability of computability, Bulletin of EATCS 28 (lC86), 3&39.
GANDY, R.O., Some rclationr between c l w e r of low computational complexity, Bull. London Math. SOC. 16 (1984),127-134. HARTMANIS, J., Generalired Kolmogorov complexity and the rtructure of feuible computationr, Preliminary Report, Cornell Univerrity, 1984. HARTMANIS, J., Independence rcrulk about context-free languages and lower boundi, TR-84-808, Cornell Univerrity, 1984.
HUYNH,D.T., Reiourctbounded Kolmogorov complexity and hard Ianguager, TR-8610, Iowa State Univeriity, 1986. KARP,R.M., Combinatorica, complexity and randomnerr, Comm. ACM 29 (l986),96-109. KRAMOSIL, I., Recurrive clwification of paeudo-random sequencer, Kybernetika 20 (1984), 3-34. LEVIN, LA., Randomneu conservation inequalitier: Information and independence in mathematical theorier, Inform. and Control 61 (1984), 15-37.
468
Cdude
NERODE, A. and SHORE,R.A. (edi.), Recurlion Theory, Proc. Sympoi. Pure Math. 42 (1986).
RICHMAN, F.,Church’i t h e i i without taarr, J. Symbolic Logic 46 (1983), 797-803. RICHTER, M.M.,BORGER, E., OBERSCHELP, W., SCHINZEL, B. and THOMAS, W. (edi.), Computation and Proof Theory, Proceedings, Part 2, Lecture Notei in Math. 1104 (1984). ROSE, H.E., Subrecuriion: Functioni and Hierarchies (Oxford Univeriity P r e u , Oxford, 1984).
SIPSER, M., A complexity theoretic approrch
to
randomneii, in: ACM Sympoaium on
Theory of Computing, 1983, 330-336. SIPSER, M.,Computation by Automata (M.I.T., 1983). STAIGER, L., Repreientabb P. Martin-LBf tcrti, Kybernetika 21 (1986),23S243. S T R E W , I., Explicit computation of a Gijdel independent sentence, Recuriive Function Theory: Nerrletter 33 (1985), 348. WELHRAUCH, K., Type 2 recursion theory, Theoret. Comput. Sci. 38 (1985), 17-33. Z I M A N D , M.,Baire cluiification and partial recuriive functioni, Recursive Function Theory: Nerrletkr 32 (l984),346.
ZIMAND,M.,On the topological iixe of reti of random ntringn, 2. Math. Logik Grundlag. Math. 32 (l986),81-88.
469
INDEX OF NOTATIONS
Nl1
El 1
R,1 =,#,I €1&1
{... I...}, 1
C nI1 1 u11
nl 1 -1
1
x11
A', 1 f :A + B , 1
470
Cdudc
PSQ, 18 A(Z), 20
Ck),22
e’, 23
z
+ y, 23
Z Y , 23
z v , 23
Pd, 23
I 2-9 1,
24
8qrf(z)=
25
18,
. .I,
pr[ 1
[ x ” ~ ] 24 ,
28
quo, 30
PRIME, 30
n!, 30 1
V,31
i-0
Index of Notations I
A , 31
i4
u p , 34
d n ) , 34, 35
J y 35 I?), 35
R("),37,' 38
MP), 38 exp, 40, 41 long, 41
< xo,...,x, >, 42 od, 79, 80
esr 80 sn, 52
max, 57
gcd, 81
ACK, 82 rev, 83
ma=(...),57 I
D ,84
47 1
472
Cdude
p,r., 91
nj,
last , 96
Zj, 122
time , 98
wj,
Ff"),99 0,1, ...,n ,...) loo I1
123
j'", 123 cdk;'), 123 w
--
(h/t*P
122
100
trans , 124
S R B R , loo
eomp, 126
=, loo
P1127
102
T,127
t-1
!In1116
f!"), 129
ual , 116
select , 129
Vat, 116 Num , 116 Term , 116
Eq, 117
GN,117
,:a
129, 130
T,,135 &'I,
138
n
K,151
termeub, 118
Sub, 118 Rep, 118
diag, 145
r.e., 146 n
grsymb , 120
T,152
DSj, 121
Wi, 154
Detjl 121
im, 154
Index of Notations
preim , 154 154
+n,
meet, 154
D,, 158
T,167 A!, 173 Sh(h :N+ {O,l}), 173
E,
E.9
179
F,, 182 P, 182 P R , 182 R , 182 Spv,
182
x,l82 ROJ, 189 ?=,
191
r:, 191 finite,, 191, 192
fund,, 193 funcomp,
9,211 -
apz, 211
204
473
474
Cdude
H ( t , m ) , 315
b t * p , 400
H(z,m ), 315
UL,402
U , 320,321
TZME(h),414
my, 323
A.(f 417
mu, m , 323,324
Lf, 417 -
K,334
L f , 417
< F,s >, 337
Sp, 419
?h(F,S), 337
4r
xmVr , 362
+,dl
D(4,2), 378
sum, , 439
K , ( z ; m ) , 378
I
k1385
%W,b
L , 386
kr, 392 L,, 392
k,,393 Timep, 394
Lk
397,398
L i , 398 A Z3,
398
A('), 398 < A >, 398
11
11
I1
%Jl
426 429
440 443 446
.
.
.
.
k Jr'-"am ,448 1 Jr'-4n , 448
475
SUBJECT INDEX
acceptable gbdelization, 138 acceptable programming system, 138 ACKERMANN-PETER’s function, 11 ACKERW-PETER’s hierarchy, 7,20 algorithm, 87, 88 atgorithmically computable function, 88 almost everywhere (ax.), 220 ax. h-computable function, 296 a.c. h-hard function, 268 ARCHIMEDES’ number, 6 arithmetical instruction, 38ij arithmetiration of finite sets of formal equations, 116 arithmetization of formal equations, 115 arithmetiration of tcrm, 114, 116 arithmetization of vsuiables, 114 asymptotic random string (KOLMOGOROV), 312 augmented loop computable function, 417 augmented LOOP language, 417 augmented LOOP program, 417 BAIRE’s Category Theorem, 287 BERRY’S paradox, 2 BLUM axioms, 211 BLUM space, 211 canonical index (for finite sets), 168 canonical size measure, 442 CANTOR numbering, 33 CANTOR’Sfunction, 32 CANTOR’s number, 33 ebaracteristic index, 173 characteriatic function, 2 CHURCH’S thesis, 92 class determining set, 241 cofinite set, 1 COLLATZ’s sequence, 5 complexity class, 226 complexity sequence, 273 composition, 9, 10 Compression Theorem, 239 computation-time closed class, 414 computational complexity measure, 211 concatenation, 71 convergence function, 106 course-of-values recursion, 43 critical level, 357, 368 critical level induced by a M-L test, 323
470
Cdude
decidable, 146 depth of nesting, 392 derivation, 101, 102 double courstof-values recursion, 81 dovetailing, 128 effective operator, 190 elementuy-honest e l m , 426 enumerating function, 188 enumeration operator, 179 Enumeration Theorem, 123 equationally computable partial function, 103 equivalence problem, 427 EULER-FERMAT's Theorem, 302 J3ULER'e phi-function, 302 execution time function, 394 &tended R E M A " Hypothesis (ERH),300 extensional recursive function, 187 factoring problem, 300 FERMAT's greatest problem, 203 FIBONACCI's sequence, 8 fixed-point, 132 Fixed-Point Theorem, 132 f o r m d equation, 100 formd system (CHAITIN), 337 free monoid, 2 full M-L test, 360 function computed by a general program, 403 function index set, 161 functional composition, 22, 91 functional operator, 182 G s p Theorem, 229, 230 general program, 402,403 general recursive function, 91 general size memure, 440 geperdiaed RITCHIE's sequence, 73 GODEL (formal) theory, 167 GODEL numbering, 41 GODEL's Incompleteneas Theorem, 166, 339 GODEL's number, 41 GOLDBACH's conjecture, 203 Graph Theorem, 165, 156 GRZEGORCZYK's function, 83 GRZEGORCZYK's hierarchy, 62 H d t i n g Problem, 159 honest clam, 418 honest function, 240 Honesty Theorem, 241, 242 immune ret, 206, 333,334
Subject Index independent statement, 167 index (relative to an acceptable g&ielization), infinite sequence, 2 infinitely often (i.o.), 220 i.0. h-computable function, 268 L o h-hard function, 296 iteration, 5
99
JACOBI's symbol, 301
KALMAR elementary functions, 82 KLEENE's Normal-Form Theorem, 127 KLEENE's predicate, 127 KNASTER-TARSW'a Theorem, 186 KNUTH's notation, 7 KOLMOGOROV's complexity, 304 KREISEL-LACOMBESHOENFEL.D'sTheorem, 191, 192 lattice, 216 LEBESGUE's probability, 381 length (of a string), 72 lexicographical order, 2 limited existential quantification, 31 limited iteration, 13 limited maximum, 57 limited minimization, 28 limited minimization operator, 28 limited primitive recursion, 52 limited product, 27 limited pure iteration, 13 limited summation, 26 limited universal quantification, 31 limited X-primitive recursion, 72 loop-computable function, 386 loop-concatenation number, 397, 398 loop-concatenation hierarchy, 402 loop hierarchy, 397 LOOP language, 384,385 loop program, 385 loop variable, 385 m-argument associate function, 53 MARTIN-LOF's test (M-L teat), 314 measure of computation, 211 measured set, 238 memory-complexity, 212 MILLER and W I N probabilistic algorithm, 300,301 minimization, 91 minimization over {a$, 206 MOIVRE and LAPLACEs Theorem, 378,379 m-random string (KOLMOGOROV), 311,312 name (of a complexity class), 226
477
478
Cdude
normal derivation, 106 null string, 2 number-theoretic partial function, 1 numeral, 100 onoargument primitive recursive function, 9 operator, 190 Operator Gap Theorem, 234 Operator Speed-Up Theorem, 259 padding function, 140 pairing function, 32 P A R I S - W I N G T O N ’ S Theorem, 6 partial function, 1 partial function symbol, 99 p u t i d recursive (p.r.) function, 91 partial recursive (p.r.) operator, 183 p a r t i d recursive (p.r.) string-function, 206 partially decidable, 146 P W O arithmetic, 6 PEANO axioms, 3 PELL’s equation, 9 P-loop simulator, 418 predicate, 15 PFUSBURGER formulas, 449, 450 PRESSURGER functions, 449, 450 primitive recursion, 4, 90 primitive recursive function, 23 primitive recursive function in, 417 primitive recursive real number, 206 primitive recursive set, 25 primitive recursive string-function, 72 primitive recursively-honest function, 418 principal partial function symbol, 103 priority method, 283 probabilistic algorithm, 369 probabilistic TURING machine, 156 projection, 157 Projection Theorems, 157 pure iteration, 5 pure primitive recursion, 4 RAMSEY-PARIS-HARRINGTON numbers, 6 RhMSEY’e Theorem, 6 random etring (KOLMOGOROV), 311 real-time computable function, 209 Recursion Theorem, 132 recursive function, 91 recursive operator, 183 recursive real number, 185 recursive set, 144, 155 recursively convergent, 195 recursively enumerable (r.e.) in increasing order, 147
Subject Index recursively enumerable (r.e.) index, 172 recursively enumerrble (rx.) set, 146, 166 recursively enumerable (r.e.) set of p.r. functions, 188 recursively meegre set, 282 recursively nowhere dense set, 280, 281 recursively separable sets, 1 W Replacement Rule (RR), 100, 101 representable M-L test, 340 Revisited Gap Theorem, 231 RICE’S Theorem, 162, 164 RITCHIE cleases, 62 RITCHIE’s function, 62 ROBINSON functions, 37,s ROGERS’ Isomorphism Theorem, 141, 142 RUSSELL’S paradox, 152 scope (of a loop), 386 semi-churcterirtic function, 146 set of the recursively first BAIW category, 282 set of the recurrively second BARE crtegory, 282 simple function, 429 simultaneous recursion, 35 singlovalued set, 180 8-m-n function, 129, 130 8-m-n Theorem, 130 SOLOVAY and STRASSEN probabilietic algorithm, 301 Speed-Up Theorem, 261 step-counting functions, 211 string, 2 string-iunction, 72 Substitution Rule (SR), 100 SUDAN’Sfunction, 46 SUDAN’S hieruchy, 46, 67 support, 279 term, 99, 100 time-complexity, 127 total effective operation, 193 total effective operator, 190 Totality Problem, 168 TURING machine, 144 UL-computable partial function, 403, 404 ultimately zero function, 269 uniform complexity, 378 uniform M-L test, 379 Uniform Recursion Theorem 135 Uniformization Theorem, 180 uniformly recursive sequence, 268 Union Theorem, 264 universal function, 82 universal KOLMOGOROV algorithm, 308 universal language, 402, 403
479
480 universd M-L teat, 321 universd p.r. function, 123, 139 variable, 99
WAGNER-STRONG uci011~,129,130 X-primitive recursion, 72
Cdude
48 1
AUTHOR INDEX
ACKERMANN, w., xi, 7 , n , 13, i s , 20, 25,45,62, 63, 71,77,78,81,82, w, Q0,98,98,204,227,205,448,463,464,475
AIILEMAN, L., 30G302,463,464 ADRIANOPOLI, F., ix, 216,225, 293,463 AHO, A.V., vii, 453 AL-KHOREZMI, 201 AMIR, A., 439,463,466 ARBIB, M.A., 144, 292,294,453,459 ARCHIMEDES, 6 , 7 , 465, 475 ASSER, G., ix, 78,453 AZRA, J.P., 202,294,296,453 BAIRE, R., 278,282,287,288,468, 476,479 BAR-HILLEL, Y., 456 BARWISE, J., 457, 463 BEESON, M.J.,467 BELLMAN, RE., 462 BERNSTEIN, F., 141 BERRY, G.G., 297,475 BLAKLEY, G.R., 7,453 BLUM,L., 377,463 BLUM, M.,viii, ix, xi, 202, 207,208, 211-224, 226, 232, 238, 238, 241, 243, 248, 249, 250, 251, 256, 257, 259, 263, 286268, 270, 273, 278, 292-295, 376,377,384,394,407, 414, 418, 428, 4(0-443, 445448, 460, 451, 453, 454,457,475 BOOK,R.V., ix, 294,464 BOREL, E., vii, 201, 202, 297, 454 BORGER, E., 467, 468 BORODIN, AB., vii, 229, 293,446, 447,464,468 BOROSH, I., 7,453 BRAINWD, W.S., vii, 78, 144, 202, 293, 294, 447, 464 BUTTERFIELD, J., ix BUTTS, R.E., 464 BUZETEANU, S., ix, 202,408,454, 467
CALUDE, C., ix, 21, 67, 59, 63, 66,68,71, 77, 79,82, 167, 169, 170, 173, 202, 280, 284,288, 293, 294,296,314,317, 318, 322,324, 328, 334,340, 342, 352, 374,377, 380,381, 447, 454,465, 467
CANTOR, G., vii, 32,33,3&37,42,123, 124, 141,201, 221,475 CAUCHY, A., 196 CAZANESCU, V.E., ix CEITIN, G.S., 200,465 CHAITIN, G.J., 166,298,303,336338,376,377,455,476 CHITESCU, I., ix, 314,317, 318,322,324,328,334, 340,342,352,377,380, 381,454, 455,467
482
Cdudt
CHOUEMA,Y., 439,453,466 CHURCH, A., vii, 92, 146, 202, 456,468, 475 CICHON, E A . , 467 CLEAVE, J.P., 383,446,466 COBHAM, A., 292, 446, 456 COLLATZ, L., 5,8,79,475 CONSTABLE, RL.,234,293, 295, 446, 447, 456 COOK, S.A.,vu, 294, 377, 466 DALEY, R.P., 377,456 DARBOUX, G., 454 DAVIS, M., 9,78, 92, 144, 202, 212, 298,312,340, 156,468, 460, 463, 467 DEDEKlND, R., vii, 77, 201, 456 DEKKEFt, J.C.E., 205, 456 DE LEEUW, K., 372, 467 DE LUCA, A., 216, 203,453 DEMETFtESCU, M.C.,455 DIMA,N., 49,W, 52,57,78,202,454,457 EBBLNGHAUS, H.D.,467 ELENBERG, s., 78,202,467 ELGOT, C.C., 78, 202, 467 ENDERTON, HB., 202,467 ENGELFRIET, J., 467 ERATOSTENE, 88 W O S , P., 6, 457 ERSOV, A.P., 461, If35 IXJCLID, 87,201,302,461 EULER,L., 302,476 FACHINI, E., 447, 457 F A N T A " U , B., 82, 455 FERMAT, P., 203,302,476 FIBONACCI, L., 8,42, 476 FINE, T.L., 377, 457 FISCHER, P.C., 259, 273, 276,277, 293-298, 459, 462 FRECE, G., 466 FREIVALDS, R., ix, 178, 457 FRIEDMAN, H., 465 GANDY, R.O., 467 GAREY, M.R.,vii, 457 GEORGIEVA, N.V., ix, 13, 16, 20,78, 79, 457 GILL, J., ix, 268, 270, 293, 369, 467 GINSBURG, S., 449,457 GLADSTONE, M.D.,18, 467 GODEL,K., vii, xi,31, 41-43, 77, 92, 94-96, 114-122, 126, 126, 129, 162, 186171, 201, 202, 247, 261, 269, 270, 272, 292, 339, 340, 456, 458, 464, 466, 468, 476
Author Index
GOETZE, B., ix, 397,401,439,447,448,460,4MJ GOLDBACH, C., XS,476 GRZEGORCZYK,A., riii, 62,62,78,82,83,291,383,446,46%, 466,467,476 GUY, R.K.,6,468
HAMMEFt, PL., viii HARRWGTON,L., 6,6,21,467,463,478 HARROW, K.,78,468 HARTMANIS, J., vii, ix, 168,202, 222, 226,249,291-294,447,468, 466,467 HASENJAEGER, G., 467 HELM,JP., 202, 278,296,469 HENKE, F.W., 78,469 HENNIE,F.c., 78,144,202,292,4~~ HERBRAND, J., 201 HERMES, H., 202, 469 HEYTWG, A., 460 HILBERT, D.,77, 468,469 HINTlKKA, J., 464 HOPCROFT, J.E., rii, 168,202,222,294,447,46& 468 HORNER,W.G., 463 HUYNH,D.T., 467
m m ,OH.,447, 449, 469 IOSIFESCU, M., 466 INDERMARK, K., 78,469 lRLAND, M.I.,204, 469 ISTRAIL, S., ix
JACOBI, K.G.J., 301, 477
JANKO,W.H., 300,469
JAULIN, B., 202,294,453 JONHSON, D.S.,vii, 467 JOSEPH, D., 202,469 JURGENSEN, H., ix
KALMAR, L., 82,291,477 KAMAE, T., 377,469 KARP, R.M., 467 KATSEFF, H.P.,ix, 362,367,377,469 KETONEN, J., 6, 469 KFOURY, A.J., 144,469 KLEENE, S.C., vii, 3,77,78,87,92, 127, 130, 132,144, 160, 186, 192, 202, 2(u, 216,
226, 246,108,426, 427,466, 458,460,467,477
KNASTER, M.B., 186,477 KNUTH, D.E., 7,377, 466, 460,461,466,477 KOLMOGOROV, AN., vii, riii, xii, 287, 303,304, 308313, 320, 324,328-334, 336,337,340,341, 346,347, 349, 361,368,367, 374,375378, 381, 464,469,460,467,476,477-479
KRAMOSIL, I., 467
483
484
Cdude
KREISEL, G., 191, 192, #)2,4Bo, 477 KRONECKW, L., 3 LACHLAN, AH., 191,202,460 LACOMBE, D., 191, 192, 202,460, 477 LANDAU, S., 3WJ, 302,460 LANDWEBEFt, L.H., vii, 78, 144, 202, 246, 293, 294, 296, 447, 454, 460 LAPLACE, S., 378,477 LAW, BE.,ix LEBESGUE, H., 381,477 LEININCEFt, B.S.,447, 449, 459 LEVIN, LA., 334, 377, 380,466, 467 LEWIS, F.D., 246, 293, 460 LEWIS, P.M.!I, 292,465 LOFGREN, L., ix, 304,460 LOVELAND, D.W., 377-379, 460
MACHTEY,M., vii-ix, 78, 130, 138, 141, 144, 202, 204,293, 294, 298, 402, 404, 417,418,420, 423,425,440, 441,443,444,447,449,450,461
MAGGIOLO-SCHETTINI, A., 447,457 MALITZ, J., 141, 202, 481 MA",Y.I., 166, 202, 203,377, 461 MA",I., 369, 372 MARCUS, D.A., 302, 461 MARCUS, S., viii, 5'477,455
MARKOV.A.A., 144,202,461
MARTIN-LOF, P., vii-ix, xii, 202,297,303,305,313, 314, 317,320,323, 324, 334, 346,347,352,367,377,378,381,454, 455, 461, 465, 467, 468,477
McCAFtTHY, J., 457 McCREIGHT, E., 226, 241, 264, 295295,461 MGHLHORN, K., ix, 293,447,461,462 MEYER,A.R., viii, ix, 226, 240, 241, 259, 264, 273, 276, 277, 293-296, 383, 384,388,392,396,407,414,428,446,447, 461,462
MILLER, G.L., 300,301, 369,376, 462, 477 MILLS, G., 6, 457 MINSKY, M., 202,376,462 M O W , A., 378,477 MOLL, R.N., 144, 293, 459, 462 MOORE,E.F., 372, 457 MORDELL, L. J., 9, 462 MULLER, G.H., 467 MUNRO, J.I., vii, 454 MYKILL, J., 202, 462 NALIMOV, V.V., 377,462 NEHRLICH, W., 397, 401, 439,447, 448, 450, 458 NERODE, A., 468 NIVAT, M.,464 NOVMOV, P.S.,88, 462
Author Index
OBERScHeLP,w.,468
ONICESCU, 0.. 465 OSTROWSKI, A.M.,438,463 OXTOBY. J.C.,281,463
PARIS,J., 6, 6, 21, 467, 463, 478 PAZ,A., 300,463 PAW, GH., ix, 167,16Q,202,455 PEANO, G., vii, 3,4, 6, 77, 167, 201, 463, 478 PELL, J., 9,35,478 PETEbl, R., xi, 7, 11, 13, 15, 20, 26, 46, 62, 63, 71, 77,78, 81, 82, 86, QO,98,
w, 202, m,m,2 9 5 , 4 ~ , 4 4 a ,463
POMERANCE, c., 300,453 POST, EL., 202,463 PRESBURGER, M.,447, 449, 460, 457, 469, 478 W I N , M.O.,vii, 222, 292, 295, Sol, 369,376, 463, 477 RAMSEY,F.T., 6 , 6 , 467,469, 478 RICE, H.G., 161, 162, 164, 170, 19C198,202,270,4M, 463,479 RICHMAN, F.,468
RICHTER,M.M.,468
RIEMA", B., 300,462,476 RITCHIE, D.M., viii, 240, 293, 383,384,388,392,396, 407, 414, 426, 446, 447, 462, 476
RITCHIE, R.W., 38, 53,62, 63, 69,71,73,78,83,99,204, 414, 446,447, 464,479
RTVEST, RL., 301,302,464 ROBERTSON, E.L., 246,293,296,460,464 ROBINSON, R.M.,19,37,38, M , 7 8 , 416, 464,479 RODDING, D., 467 ROGmS, H., ix, 88, 138, 141, 142, 166, 167,162, 164, 172, 191-193, 202-206, 212, 216,220,226,464,479
ROSE, G., 78, 459 ROSE, H.E., 468 ROSSER, J.B., 458 RUDEANU, S., viii RUMELY, R., 300,453 RUSSELL, B., 152,479 RUSU, D., ix
SACKS,G.E., 467 SANTOS,E.S., 369,464
SCHAFER,G., 296 SCHINZEL,B., 468
SCHNORR, C.P., ix, 202,259, 298295, 377, 447, 464 SCHWARTZ, J.T., 376, 455 SEMENOV, A.L., 202,294,377,4~5 SEVENSTER, A., ix SHCLMIR, A., 301,302,404 SHANNON, CE., 372,457
485
486
Cdudc
SHAPIRO, N., 467
SHEPHERDSON,J.C., 144, 202,462,
464
SHOENFIELD, J.R., 191, 192, 202,460,477 SHORE,R.A., 468 SIPSER, M.,377,469,468 SKOLEM, T., 77,464 SMORYNSKI, C., 7,464,466 SMULLYAN, R.M., 199,202,466 SOLOMONOFF, R.J., 303,376,466 SOLOVAY, R., 6, 301, 369,376, 469, 466, 479 SPANIER, E.,449, 467
SPECKER,E.,1Q6,466
STAIGER, L.. ix, 349,3M),380,486,467,468 STEARNS, R.E., 226, 291-293, 438, 469, 465 STEEN, LA.,466 STRASSEN, V., 301, 369,370, 466, 479 STREINU, I., 488 STRONG, HR., ix, 129,130,138,202,466,480
STUMPE,G., 2Q3,464
SUDAN, Q., xi, 37, 46, 57, so, 61, M, 77,78, 82,m, ~ 9 2w, , w,202, m, 407,414,416,44a, 466,457, 466, 479
STURGIS, HE., 144,202, 464 TARSKI, A., 186, 477 TATARAM, M., 63,66,68,466 TAUB, A.N., 486
THOMAS,w., 468
TRAKHTENBROT, B.A., 229,293,466 TRAUB,JE., 463 TSICHRITZIS,D.,384,421-429, 434, 437, 447, 449, 405 TURLNG,A.M.,vii, 144,202, 212,291,389, 467-469, 464,466, 478, 479 TEW, I., 6Q,77,466 ULLMAN, JD., vii, 463 USPENSKY, VA., 78,202,294,377,486 VAIDA, D., ix VAN EMDE BOAS,P., 250,293,485 VAN HEIJENOORT, J., 297,469, 464,466 VERB=, R., ix, 78,466
V W U , V.,21,71,465 VON MISES, R., 463 VON "W, J., 133,446
WAGNER, E.G., k, 129,130,138,202,466,480 WAINER, S.S.,467 WEIHRAUCH, K.,ix, 74-78,84,469, 466,468 WEYL, H.,vii, !U31, 466 -, E.J.,467
Author Index
WINKLMANN, K., 293,462 YAMADA, H., 308, 292,466 YASUHARA, A., 78,166, 202, 466 YOUNG, P., vi-ix, 7 8 , 1 3 o , i a , 141,144,202, 2 0 4 , ~ i , m 251,288295, , 298,440,441,443,444,447,450, 459,461,466 W-TING, S., 195, 466
ZIMAND, M., ix, 290, 389,374, 455, 466,168 ZVONKIN, A., 334,377,380, 466
487