ecologic

9

Upload: others

Post on 24-Oct-2021

0 views

Category:

Documents


0 download

TRANSCRIPT

\E ologi " Computations

B. Durand, N. K. Veresh hagin, M. A. Ushakov

September 8, 2002

1 Introdu tion

Most of us are familiar with the situation when there is no spa e on hard disk to save a �le. We then lean

up the spa e with the risk of deleting some data that ould be important in the future. Today's fast growth

of disk sizes solves this problem to some extent, but look at the problem in a wider s ale: to produ e a new

disk at the fa tory we need to destroy information that ould be needed in the future. Indeed, the fa tory

produ ing hard disks spoils irreversibly the environment. Assume that the entire environment (in luding all

the world's hard disks) is the input data to the omputation and that we do not have other spa e to perform

the omputation. We all su h omputations e ologi al.

In this paper, we study the power of su h omputations in multi-tape Turing ma hines omputational

model. In other words, the input data are the initial ontents of all tapes of the ma hine. For simpli ity, we

onsider only de ision problems, i.e. fun tions with values 0,1.

Let B denote f0; 1g, B

n

the set of all binary strings of length n, B

the set of all �nite binary strings,

the set of all in�nite binary sequen es, = B

Z

the set of all bi-in�nite binary sequen es.

We will onsider total and partial fun tions

f : (B

)

r

s

t

! B ; (1)

where r = 0; 1 and s + t > 0, that is, fun tions that have at least one in�nite argument and at most one

�nite one. The usual notion of omputability of su h fun tions is de�ned in terms of ora le Turing ma hines.

An ora le Turing ma hines has one work tape that initially ontains the input string if r = 1 or is empty

if r = 0. Besides, the ma hine has an extra ora le tape where it an write a question to the ora le, that is,

the number i � s+ t of the in�nite argument and the number of its hara ter whi h the ma hine wants to

know. The spe i�ed hara ter is then immediately available on the ora le tape.

The same notion of omputability may be de�ned using Turing ma hines without ora le as follows (we

will need in the sequel this model).

De�nition 1. Consider ma hines having r + s + t read only tapes that initially ontain the input data

(for writing bi-in�nite inputs we will use bi-in�nite tapes). The ma hine has one extra working tape. The

ma hine has two �nal states, s

0

and s

1

. If the ma hine gets into the s

0

(s

1

) state, it halts with the result 0

(1).

We say that a partial fun tion (1) is omputable by a ma hine if for all inputs x from the domain of f

the output of the ma hine is equal to f(x).

Let us de�ne now several notions of \e ologi al" omputability of fun tions of the type (1).

De�nition 2. An e ologi al Turing ma hine is a Turing ma hine with r + s+ t tapes that initially ontain

the input data. The ma hine does not have any extra work tape. Ea h tape has a read/write two way head.

The work alphabet of all tapes is equal to the input alphabet B . The input string (if r = 1) is delimited by

two markers at the start and at the end of the string. The tape for this string has exa tly that many ells

that is needed to write the input string and the markers. The ma hine an read the markers but annot

write them. Also it annot write anything to the ells ontaining the markers. We will onsider two types

of semi-in�nite tapes (to write inputs from ):

1

� A semi-in�nite tape with a marker at the beginning. Thus the head on the tape knows whether it is

at the beginning. We all su h tape bounded.

� A semi-in�nite tape without any marker. The head on the tape does not know whether it is at the

beginning of the tape. If this is the ase and the head re eives the ommand to move o� the tape, the

omputation halts without any results (su h moves are thus forbidden). We will all su h tape abrupt.

As usually, the ma hine has a �nite state unit ontrolling the heads. At the beginning of the omputation

all the heads are positioned at the �rst ells of the orresponding tapes (or in the ell number 0 for bi-in�nite

tapes) and the ontrol unit is in the spe ial starting state.

The main feature of e ologi al ma hines is that its work alphabet is equal to the input one. This prevents

an e ologi al ma hine to simulate an extra work tape: su h a simulation would orrupt the input. This

explains also why we distinguish between two types of semi-in�nite tapes. Indeed, e ologi al ma hines have

no means to mark the beginning of the tape.

The power of e ologi al ma hines seems to be very restri ted: to perform a omputation, the ma hine

should write something on its tapes, thus orrupting the input data. Therefore, it seems quite plausible that

the e ologi al omputational model is weaker than the usual one. That is, there is a (partial) fun tion that

is omputable by a usual Turing ma hine of De�nition 1 but is not omputable by any e ologi al Turing

ma hine of De�nition 2. However, it turns out that for some r; s; t it is quite diÆ ult to �nd out whether this

is true or not. For example, we do not know whether e ologi al ma hines with exa tly two bounded in�nite

tapes (thus s � 2, and r; t are arbitrary) are equivalent to usual ones. Moreover, in some ases the above

hypothesis is false: we have proved that e ologi al ma hines with at least three bounded in�nite tapes are as

powerful as usual Turing ma hines (Theorem 6). On the other hand, we have proved that in the following

ases e ologi al ma hines are weaker than usual ones:

� s = 1, t = 0, r = 0; 1 and the in�nite tape is bounded (Theorem 4),

� s, t, r are arbitrary, but the ma hine does not have any bounded tapes (Theorem 5).

2 Total Fun tions

For total fun tions f : ! B the e ologi al model is equivalent to the usual one. Ma hines able to ompute

su h fun tions have one semi-in�nite tape, either abrupt or bounded. We will show that every total fun tion

of an in�nite sequen e a tually depends only on a �nite number of positions in this sequen e.

Theorem 1. Let f : ! B be a total fun tion omputable by a usual Turing ma hine (of De�nition 1).

Then f an be omputed on an e ologi al Turing ma hine with one bounded or abrupt tape.

Proof. Consider a usual Turing ma hine that omputes f . Call a (�nite) string x bad if that ma hine, in

the run on input x000 : : : , will eventually move its head on the input tape beyond the string. Assume that

there are in�nitely many bad strings. Due to ompa tness of , there is an in�nite binary sequen e having

in�nitely many bad pre�xes. If we run the ma hine on this sequen e, it will never halt, as it goes beyond

every ell of the tape.

This ontradi tion shows that there is only a �nite number of bad strings. So, the ma hine never moves its

head on the input tape beyond some tape ell. Consequently, the fun tion f depends only on a �nite number

of input ells. The ontents of those ells form �nitely many ombinations. This allows to build an e ologi al

ma hine omputing f . We just plug into the program of the ma hine the table of these ombinations and

the value of f for ea h ombination.

Obviously, the theorem generalizes to total fun tions f :

s

t

! B for every s; t. Every su h fun tion

depends only on a �nite part of its input sequen es, so it an be omputed by an e ologi al Turing ma hine

with abrupt or bounded tapes.

Consider now total fun tions f : B

s

t

! B . Su h fun tions an be omputed by e ologi al Turing

ma hines with s semi-in�nite tapes and t bi-in�nite ones. Re all that we assume that s + t > 0. If all the

semi-in�nite tapes are abrupt then the e ologi al model is weaker than the usual one.

2

Theorem 2. For every s; t (where s + t > 0) there exists a total fun tion f : B

s

t

! B that is

omputable in the usual sense, but is not omputable by any e ologi al Turing ma hine whose semi-in�nite

tapes are abrupt.

Proof. First, we prove the statement for s = 1, t = 0. Consider the following fun tion f(x; �). Let k stand

for the length of x. Let y denote the string onsisting of the �rst k

2

hara ters of �. Let n stand for the

natural number whose binary notation is written in dlog

2

(k

2

+k)e bits of � starting after position k

2

. Then,

de�ne f(x; �) as the nth hara ter of the string xy (where xy is the on atenation of x and y). This fun tion

is obviously omputable in the usual model. We will prove that it is not omputable in the e ologi al model.

Informally, e ologi al ma hines annot ompute f be ause while the head moves from the beginning of the

tape to the pla e where n is written, the ma hine should store somewhere the distan e between the urrent

position of the head and the beginning of n. Thus it has to orrupt some part of xy. To formalize this idea

we will use the notion of Kolmogorov omplexity, whi h formalizes the notion of quantity of information.

The Kolmogorov omplexity K(w) of a string w is the length of the shortest program that prints w. The

programming language (and the orresponding omplexity K

0

) an be hosen optimally. This means that

for any other programming language (and orresponding omplexity K

1

) there exists a onstant su h that

K

0

(w) � K

1

(w) + for all w. In the similar way, we de�ne Kolmogorov omplexity of natural numbers,

pairs of strings, pairs of natural numbers, et . By ombinatorial arguments, in every �nite set A there exists

an element w su h that K(w) � log

2

jAj. Su h elements of A are alled random elements of A. For more

details see [4℄.

Assume that there is an e ologi al Turing ma hine omputing f . Take suÆ iently large k and a random

triple hx; y; P i, where x is a string of length k, y is a string of length k

2

, and P is an integer in the

range 1; : : : ; k

2

. Run the ma hine on the string x as its �nite input, and on the sequen e � onsisting of y

appended by zeroes, as its in�nite input. Consider the �rst moment when the head on the in�nite tape goes

beyond the ell number P . If the ma hine never goes beyond P then it errs. Indeed, in this ase the result

of the ma hine does not depend on n; the string xy however has both 0s and 1s.

Let q be the internal state of the ma hine, l the position of the head on the �nite tape, and w its ontent,

at that moment. Let a stand for the ontent of the in�nite tape from the beginning up to position P and b

from the position P up to position k

2

. Let ba denote the on atenation of b and a. We will prove that, given

the tuple T = hba; q; l; wi, we an �nd xy and P . Sin e the triple hx; y; P i is random, its omplexity is not

less than k + k

2

+ 2 log

2

k. But the omplexity of T is at most k + k

2

+ log

2

k + onst. This annot happen

(for large enough k), so the theorem will be proven when we show that xy and P an a tually be found.

We need to know the boundary between b and a in the string ba: If we know that boundary, we an

simulate the omputation of the ma hine starting from that moment for all n = 1; : : : ; k

2

+ k appended to

y to �nd all bits of xy.

Guess some division of ba into b

0

and a

0

. Then simulate the run of the ma hine writing to the left of the

head the string ba, to the right the string b

0

, and then n, for all n = 1; : : : ; k

2

+ k. As a result, we obtain a

string x

0

y

0

from the ma hine's answers.

Suppose that b

0

is longer than b, that is, b

0

= ba

2

, a = a

2

a

1

for some a

1

; a

2

. Then the orresponden e

between the orre t tape and the guessed tape looks like this:

Corre t tape

a b n

Guessed tape

b a b a

2

n

The head is between a and b on the orre t tape, and between ba and b on the guessed one. Note that the

ma hine have not yet seen any ells to the right of its urrent position. Also, it will never try to go o� the

left end of a, as the tape is abrupt. Consequently, its behavior is the same as its behavior on the tape aba

2

n.

Sin e the ma hine omputes f , it regards the pre�x of length l = dlog

2

(k + k

2

)e of the string a

2

n as (the

binary notation of) a natural number n

0

and outputs n

0

th bit of the string xy. As a

2

is non-empty, the result

of the ma hine does not depend of several (maybe even all) least signi� ant bits of n. That is, the string x

0

y

0

onsists of blo ks of 0's and of blo ks of 1's (of length minf2

ja

2

j

; k

2

+ kg). This an be easily he ked.

If this is the ase, the division is wrong. Indeed, we assumed that the triple hx; y; P i is random. Every

3

string xy onsisting of blo ks 00 and 11 an be des ribed in jxyj=2+O(1) bits, and the whole triple hx; y; P i

in (k + k

2

)=2 + l + O(1) � k + k

2

+ l bits. Hen e hx; y; P i is non-random in this ase. The same holds

when xy onsists of longer blo ks.

Thus we an de ide whether b

0

is too long provided jb

0

j � jbj. Take the longest possible b

0

, that is b

0

= ba,

then one bit shorter and so on until we �nd out that jb

0

j = jbj.

Now we have found the orre t division of ba into b and a and hen e the value of P (as the length of a)

and xy. Therefore, given the tuple hba; q; l; wi, whi h an be spe i�ed in k+ k

2

+ log

2

k bits, we an �nd the

triple hx; y; P i of omplexity at least k+ k

2

+2 log

2

k, a ontradi tion. Hen e, there is no e ologi al ma hine

with abrupt tape omputing f .

Let us pro eed to total fun tions f : B

�! B . These fun tions an be omputed on e ologi al ma hines

with one �nite tape and one bi-in�nite tape. The ounter example is similar to the previous ase. More

spe i� ally, let k be the length of the input string x. Let y be the segment of � onsisting of bits with numbers

from �k

2

to k

2

(re all that � is bi-in�nite). The number n will now be in the segment [1; k + 2k

2

+ 1℄, and

again its binary notation will be written after y. The proof is modi�ed as follows. The number P is again

from 1 to k

2

, but now we onsider the �rst moment when the head moves out of the segment [�P; P ℄ on the

in�nite tape (in either dire tion). The rest of the proof is ompletely similar.

Now let us onsider the general ase. For the given s; t (where s + t > 0) we need to de�ne a total

omputable fun tion f : B

s

t

! B that annot be omputed by any e ologi al ma hine having no

bounded tapes. Let f(x; �

1

; : : : ; �

s+t

) be equal to nth bit of the word z = xy

1

: : : y

s+t

. Here, the strings

y

1

; : : : ; y

s+t

and the number n are de�ned as follows. Let k = jxj and y

i

the pre�x of length k

2

of �

i

, if i � s,

and the segment of �

i

onsisting of hara ters with indi es from �k

2

to k

2

, if i > s. Let n

i

be the number

written on tape number i in positions from k

2

+ 1 to k

2

+ dlog

2

jzje. The number n is equal to the sum of

all n

i

modulo jzj.

The above proof is modi�ed as follows. We take a random tuple hx; y

1

; : : : ; y

s+t

; P i, where P is a number

in the range 1; : : : ; k

2

, and onsider the �rst moment when some head on an in�nite tape moves beyond

position P (or �P on a bi-in�nite tape). The strings a

i

and b

i

are de�ned in the same way as above: a

i

is

the ontent of ith tape from the beginning to position of the head (from position �k

2

for bi-in�nite tapes),

and b

i

is the ontent of the ith tape from the position of the head up to position k

2

. We de�ne q; l; w just

as before.

To derive a ontradi tion we need to prove that z and P an be onstru ted given hq; l; w; b

1

a

1

; : : : ; b

s+t

a

s+t

i.

To do this, we �nd a

i

and b

i

for all i in su ession as follows. Try all possible divisions of b

i

a

i

into a

0

i

and b

0

i

starting from the longest b

0

i

. For ea h division run the ma hine, writing on all tapes ex ept ith one the

strings b

1

a

1

; : : : ; b

s+t

a

s+t

both before the heads and after them. On ith tape write b

i

a

i

before the head,

and b

0

i

n after it (for all n � jzj). If b

0

i

is longer than b

i

, the resulting string z

0

will onsist of blo ks of 0's

and 1's. Thus we will know that the division is in orre t, as, for the orre t division, the string z

0

is a y li

shift of z, so it annot onsist of su h blo ks.

We an prove also that it is possible to �x the arguments �

1

; : : : ; �

s+t

so that the fun tion f(x; �

1

; : : : ; �

s+t

)

de�ned in the proof of Theorem 2 is not omputable (as the fun tion of x) in the same e ologi al model.

Theorem 3. There are sequen es �

1

; : : : ; �

s+t

su h that the fun tion f(x; �

1

; : : : ; �

s+t

) is not omputable

by any e ologi al Turing ma hine with abrupt tapes, whose tapes initially ontain �

1

; : : : ; �

s+t

.

Proof. We will prove the theorem in the ase s = 1, t = 0 (one semi-in�nite sequen e). In other ases the

proof is ompletely similar.

We will use the diagonalization argument. Fix an enumeration of all the e ologi al ma hines:M

1

;M

2

; : : : .

Lemma 1. There exist x; z su h that for any � that has z as its pre�x either the ma hine M

1

does not halt

on input hx; �i, or it halts with a wrong answer.

Proof. Choose k; x; y; P as in the proof of the previous theorem, and onsider two ases.

First ase: there is n su h that for any sequen e � the ma hine, in the run on input x; yn�, does not halt

or tries to move the head o� the tape. In this ase let z = yn.

Se ond ase: for every n there is � su h that the ma hine, in the run on input x; yn�, does not try to

move the head o� the tape and halts. We laim that in this ase there are n and � su h that the ma hine, in

4

the run on input x; yn�, either tries to move the head o� the tape or halts with a wrong result. Obviously,

in this ase the ma hine reads only a �nite part v of the sequen e �, thus we an let z = ynv.

Proof of the laim. Assume the ontrary: for all n; �, the ma hine does not try to move the head o�

the tape and if it halts then it outputs the orre t result. Then we an show that given hba; q; l; wi we an

onstru t xy as follows. Try all divisions of ba into b

0

and a

0

, starting with empty a

0

. For ea h division try

all n, and for ea h n look for � su h that if we write on the tape a

0

(not ba as before!), then b

0

n�, and pla e

the head between a

0

and b

0

then the ma hine will halt (either trying to move its head o� the tape or not).

Call a division valid if for ea h n su h � exists. Obviously, the orre t division is valid and, moreover, the

ma hine outputs the orre t result for every �. The assumption implies that every division with ja

0

j < jaj

is valid too. Just as in the proof of Theorem 2 the divisions with ja

0

j < jaj an be �ltered out by the same

he king pro edure: either for some n the ma hine tries to move the head beyond the tape or the resulting

string x

0

y

0

onsists of blo ks of 0's or 1's. Thus, starting with empty a

0

, we try to prove that the division

is valid, and then that the division is not �ltered out by the he king pro edure. The �rst division that is

valid and is not �ltered out is orre t.

Obviously, the statement of the lemma is valid for every e ologi al ma hine, not only for M

1

. Moreover,

the string z, whose existen e is stated, an be hosen as an extension of any string z

0

. Indeed, we need only

that the omplexity of the triple hx; y; P i is more than k+k

2

+log

2

k+ onst. If we are restri ted to y's that

ontinue some string z

0

, the logarithm of the number of possible triples hx; y; P i will de rease only by jz

0

j.

Thus, the omplexity of a random triple will be equal to k + k

2

+ 2 log

2

k � jz

0

j, that is again larger than

k + k

2

+ log

2

k + onst when k is suÆ iently large.

Now we pro eed as follows: we �nd x

1

; z

1

su h that the �rst ma hineM

1

fails for them, then we �nd x

2

; z

2

su h that the se ond ma hine M

2

fails for them, and su h that z

1

is the pre�x of z

2

, et . Then, we let � be

the sequen e that has all z

i

as its pre�xes.

Using a more ompli ated ounterexample we an prove that e ologi al ma hines with only one bounded

tape are weaker than the usual ones.

Theorem 4. There is a total omputable fun tion f : B

� ! B that is not omputable by e ologi al

Turing ma hines with bounded semi-in�nite tape.

Proof. The fun tion f is de�ned in almost the same way as in the proof of Theorem 2. The only di�eren e

is that in pla e of k

2

we take some fun tion g(k) that grows suÆ iently fast. We will see further how mu h

is this \suÆ iently".

Suppose that the fun tion f de�ned in this way is omputable by some e ologi al ma hine with a bounded

semi-in�nite tape. Fix a large k and strings x; y of lengths k; g(k), respe tively. Assume that the string xy

ontains both ones and zeroes. Run the ma hine on the input x; y. At some moment t the head on the

semi-in�nite tape rea hes the ell number g(k) + 1. We laim that t is mu h larger than g(k).

Let us regard our ma hine M as a one-tape ma hine M

0

having onst � k � 2

k

states (a state of M

0

is a

tuple onsisting of M 's state, the ontent of M 's �nite tape, and the position of the head on that tape).

Lemma 2. If a Turing ma hine has Q states, halts on all initial ontents of the tape, and on some initial

ontent rea hes mth ell for the �rst time at the moment t, then

t �

m(log

2

m� 1)

2

log

2

Q

Proof. Fix an initial ontent I of the tape su h that the head rea hes mth ell for the �rst time at the

moment t. Let i < m be a boundary between two onse utive tape ells. Consider the sequen e of states of

the ma hine at all the moments when the head rosses the boundary i (we onsider the run up to the moment t

only). This sequen e is alled the tra e at boundary

1

i. We will prove that the tra es at di�erent boundaries

are di�erent (as sequen es). Consequently, the average tra e should have length of the order log

2

m= log

2

Q,

and sin e t is equal to the sum of lengths of all tra es, t annot be smaller than m log

2

m= log

2

Q.

1

The notion of tra e was used in [2, 3℄ to prove that one-tape Turing ma hines annot re ognize the symmetry of input x

in o(jxj

2

) steps.

5

Assume, for the ontrary, that the tra es at boundaries i and i+ j, where j > 0, are equal to the same

sequen e q

1

; : : : ; q

l

. Let u be the part of initial tape ontent from the start of the tape up to position i, and v

the part between positions i and i + j. We laim that the ma hine will never halt if the initial ontent of

the tape is I

0

= uvvv : : : Let C denote the initial omputation, and let t

1

; : : : ; t

l

be the moments when the

head rosses the boundary i, and s

1

; : : : ; s

l

the moments when the head rosses the boundary i + j, in C.

Let C[a; b℄ denote the part of the omputation C from moment a to moment b, that is, the sequen e of head

moves, internal states and written symbols. Then the omputation C

0

on I

0

= uvvv : : : may be glued from

parts of the omputation C as follows:

C

0

=C[1; t

k

℄C[t

k

; s

1

C[t

1

; t

2

℄C[s

2

; s

3

℄C[t

3

; t

4

℄ : : : C[t

k�2

; t

k�1

℄C[s

k�1

; s

k

℄C[t

k

; s

1

C[t

1

; t

2

℄C[s

2

; s

3

℄C[t

3

; t

4

℄ : : : C[t

k�2

; t

k�1

℄C[s

k�1

; s

k

℄C[t

k

; s

1

: : : ;

where k is the largest number k � l su h that t

k

< s

1

.

Let us verify this. Up to the moment t

k

the omputation C

0

is identi al to C: C

0

[1; t

k

℄ = C[1; t

k

℄, sin e

up to the moment t

k

the head never rosses the boundary i+j. Moreover, C

0

[t

k

; s

1

℄ is also equal to C[t

k

; s

1

℄.

Consequently, the ontent of the tape in the segment [1; i + j℄ are equal in both omputations (up to the

moment s

1

). From that moment on, omputations C

0

and C an di�er.

Further, in omputation C

0

, the head omes beyond the boundary i+j for the �rst time when the ma hine

is in the state q

1

. Sin e the initial ontent I

0

of the tape between i+ j and i+ 2j is equal to v, the further

behavior of the ma hine is identi al to that in omputation C from the moment t

1

up to the moment t

2

,

when the head rosses the boundary i+ j again, but now in the dire tion from right to left. The head sees

in the segment [i; i+ j℄ what was written there during the omputation C[t

k

; s

1

℄ and enters this zone in the

same state q

2

that it had in C at the moment s

2

(here we use for the �rst time the equality of the tra es).

Hen e the omputation C

0

further will be equal to C[s

2

; s

3

℄ and the head will ross the boundary i+ j when

ma hine is in state q

3

. In zone [i+ j; i+ 2j℄ it sees the same symbols that were written in zone [i; i+ j℄ in

the omputation C[t

1

; t

2

℄ and thus C

0

ontinues as C[t

3

; t

4

℄, and so on.

After the moment t

k

in C

0

the head will be in zone [i; i+2j℄, rossing the i+ j boundary exa tly k times

in states q

1

; q

2

; : : : ; q

k

. After that it will ross the boundary i+ 2j for the �rst time when the ma hine is in

the state s

1

. Here is the omputation C

0

up to this moment (between parts of the omputation we showed

the boundary whi h is rossed by the head at that moment, the state of the ma hine and the dire tion of

head movement):

C

0

=C[1; t

k

��!

i

q

n

C[t

k

; s

1

��!

i+j

q

1

C[t

1

; t

2

��

i+j

q

2

C[s

2

; s

3

��!

i+j

q

3

C[t

3

; t

4

��

i+j

q

4

: : : C[t

k�2

; t

k�1

���

i+j

q

k�1

C[s

k�1

; s

k

��!

i+j

q

k

C[t

k

; s

1

���!

i+2j

q

1

: : :

(2)

Another way to show that this is the ase is to split the right hand side of (2) into two sequen es: C[1; t

k

℄,

C[t

k

; s

1

℄, C[s

2

; s

3

℄, : : : , C[s

k�1

; s

k

℄ and C[t

1

; t

2

℄, C[t

3

; t

4

℄, : : : , C[t

k�2

; t

k�1

℄, C[t

k

; s

1

℄. The terms of the �rst

sequen e are just all the parts of C that happen in zone [1; i+ j℄. The terms of se ond sequen e are just all

the parts of C[1; s

1

℄ that happen in zone [i; i+ j℄.

Consequently, when the head in C

0

rosses the boundary i+2j, the ontent of zone [i+ j; i+2j℄ will be

equal to the ontent of zone [i; i+ j℄ at the moment s

1

in C. Therefore, the y le then repeats:

���!

i+2j

q

1

C[t

1

; t

2

���

i+2j

q

2

C[s

2

; s

3

���!

i+2j

q

3

C[t

3

; t

4

���

i+2j

q

4

: : : C[t

k�2

; t

k�1

���

i+2j

q

k�1

C[s

k�1

; s

k

���!

i+2j

q

k

C[t

k

; s

1

���!

i+3j

q

1

;

ad in�nitum.

The number of di�erent tra es of length less than l is less than than Q

l

. Hen e for at least half the

boundaries the tra e is longer than

log

2

m�1

log

2

Q

.

We have proved that for all x, y ex ept for y that onsist of 0s only or of 1s only the ma hine M

rea hes boundary g(k) not faster than in

g(k)(log

2

g(k)�1)

2(k+log

2

k+ onst)

steps. All the on�gurations of the ma hine up

6

to this moment are di�erent (a on�guration in ludes the state, the ontent of the �nite tape and of the

�rst g(k) ells of the in�nite tape, and positions of heads of both tapes). The sets of on�gurations for

di�erent pairs (x; y) pairs are disjoint too, be ause if we start the ma hine in ea h on�guration and try all

possible n, we an �nd both x and y.

Hen e, the total number of on�gurations for all x; y is not less than

(2

k+g(k)

� 2)g(k)(log

2

g(k)� 1)

2(k + log

2

k + onst)

:

On the other hand, the total number of all possible on�gurations is

onst � 2

k+g(k)

kg(k):

We see that for g(k) = 2

k

3

we get a ontradi tion if k is suÆ iently large.

3 Partial fun tions

For partial fun tions we an prove that the e ologi al model is weaker that the usual one even for r = 0

(without the �nite input), if either there are no bounded tapes, or there is exa tly one bounded semi-in�nite

tape, and no other in�nite tapes.

Theorem 5. For all s; t there is a partial fun tion g :

s

t

! B that is omputable in the usual model, but

is not e ologi ally omputable by ma hines with abrupt tapes. Also, there exists a partial fun tion g : ! B

that is omputable in the usual model, but is not omputable by e ologi al ma hines with semi-in�nite bounded

tape.

Proof. For a given string x let �x denote the string 00 : : : 01x, where the number of leading zeroes is equal to the

length of x. The fun tion g is de�ned for all sequen es su h that �

1

(i) = 1 for at least one i � 1. For any su h

sequen e there exist the unique x and i su h that �

1

(1)�

1

(2) : : : �

1

(i) = �x. Cut the segment [1; i℄ from �

1

,

and denote the rest of �

1

by �. The fun tion g is now de�ned as g(�

1

; : : : ; �

s+t

) = f(x; �; �

2

; : : : ; �

s+t

),

where f is the fun tion de�ned in the proof of Theorem 2, where one should take 2

2k

instead of k

2

(the

des ription of x takes now 2k ells instead of k ells, and the logarithmi gap is not suÆ ient). The proof

then goes as before.

The se ond statement is proved in a similar way.

4 When the e ologi al ma hines are as strong as usual ones

(The idea belongs to An. A. Mu hnik.) In this se tion, we study e ologi al ma hines with at least three

bounded tapes. In this model, any omputable fun tion an be omputed.

Theorem 6. Any partial omputable fun tion f : (B

)

r

s

t

! B for s � 3 is e ologi ally omputable

by a ma hine with three bounded, s� 3 abrupt semi-in�nite in�nite tapes, and t bi-in�nite tapes.

Proof. We will assume that r = 0. For r = 1 the proof is similar.

First we de�ne another omputational model|a version of ounter ma hines. The ma hine has a �nite

state ontrol unit and n ounters, ea h ontaining a natural number, initially zero. Besides, the ma hine

has s semi-in�nite abrupt tapes, and t bi-in�nite tapes, all of them read-only. The ontrol unit an in rement

and de rement ounters (de rementing a ounter whose value is zero does not hange its value), and ask

whether the value of a ounter is zero. It an also move the heads on tapes in both dire tions and read tape

symbols. The input to su h a ma hine is s semi-in�nite and t bi-in�nite sequen es, initially written on the

tapes. We will these ma hines n ounter ma hines, or ma hines with n ounters.

Lemma 3. For some onstant n every partial omputable fun tion f :

s

t

! B is omputable by a

ma hine with n ounters.

7

Proof. If we have a suÆ ient number of ounters, we an add, subtra t, multiply, and divide numbers in two

given ounters. For example, to add numbers in ounters A and B we need to de rease B simultaneously

in reasing A until B be omes zero. In a similar way we an implement subtra tion; multipli ation and divi-

sion are implemented via addition and subtra tion. So, we an he k primality, and �nd primes sequentially

in in reasing order.

It suÆ es to simulate by a ounter ma hine every ma hine des ribed in De�nition 1. To this end we

need to keep the ontent of the work tape in one of the ounters. We an do this by en oding ea h tape

symbol as a number, and storing in a ounter the number 2

t

1

3

t

2

5

t

3

: : : p

t

N

N

, where 2, 3, . . . , p

N

are onse utive

primes, and t

1

, t

2

, . . . , t

N

are odes of symbols of the tape of simulated ma hines. Another ounter keeps

the position of the head of the work tape of simulated ma hine.

Obviously, we an assume that the simulating ounter ma hine has the following property: at any moment

in the omputation every head ex ept one is in the beginning of the tape (in ell number 1). Indeed, we

an keep in ounters the urrent positions of heads and hold the heads at the beginnings of tapes; when the

ounter ma hine needs to read a symbol of the tape, the orresponding head moves to the position stored in

the ounter, and then returns to the beginning of the tape. We will all su h ounter ma hines orre t, and

all the head that is not at the tape start a tive. If all heads are at the start, we all a tive the head that

was last not at the start.

Lemma 4. Every omputable fun tion f : (B

)

r

s

t

! B is omputable by a orre t ma hine with 2

ounters.

Proof. By Lemma lem-C- ounters, for some n there is a orre t ma hine with n ounters that omputes f .

En ode values of ounters into one number S = 2

1

3

2

: : : p

n

n

, where, as before, p

i

is ith prime number and

i

is the value of ith ounter. We store the number S in the �rst of the two ounters. The se ond one will

be used for intermediate omputations.

Now we have to show how to simulate operations with ounters. In rementing and de rementing ith

ounter orrespond to multiplying and dividing S by p

i

. Multiplying is done like this: while the �rst ounter

is not zero, de rement it and then p

i

times in rement the other ounter. Division is done in a similar way.

Thus, given a orre t ma hineM

1

with two ounters that omputes f , we have to onstru t an e ologi al

ma hine M

2

omputing f . The simulation goes as follows. We will assume that s = 3 and for s > 3

the simulation is entirely similar. Fix a one-to-one orresponden e between tapes of M

1

and M

2

. The

ma hine M

2

will not write anything on its tapes, but will only move the heads. The position of the a tive

head of M

1

will be equal to the position of the orresponding head of M

2

. Positions of two other heads

of M

2

will be equal to the values of ounters

1

and

2

of M

1

. During the simulation, M

2

remembers whi h

tape orresponds to whi h ounter. For every ounter the ma hine knows whether its value is zero, as all

tapes are bounded and thus the knows whether the head is at the start.

The simulation now is as follows:

1 When M

1

in rements or de rements the value of a ounter, M

2

moves the orresponding head.

2 When M

1

moves the a tive head, M

2

does the same.

3 The remaining ase is when all the heads of M

1

are at the start, and M

1

moves a non-a tive head.

Let that be the �rst head and let the position of the �rst head of M

2

store the value of the ounter

1

.

At that moment, either the se ond or the third head of M

2

is not used to store the value of

2

. Let

that be the se ond head. Then, M

2

assigns the se ond tape to hold the value of

2

, and \ opies" it

from the �rst tape to the se ond one by moving the �rst head toward the start while simultaneously

moving the se ond head from the start (here we again need that the tapes of M

2

are bounded). Then,

M

2

does the same that M

1

has done, i.e. moves the �rst head.

8

5 Open questions

Many questions about the relative power of usual and e ologi al omputational models remain open. We

will list some of them.

1. What is the power of e ologi al ma hines with two bounded tapes?

2. What about e ologi al ma hines with at least two in�nite tapes, of whi h exa tly one is a semi-in�nite

bounded tape? Are they weaker than usual ma hines?

3. Consider the ma hines with a �nite input (r = 1), whose working time is limited by a polynomial in

the length of �nite input. Is it true that su h ma hines are equivalent in omputational power to the usual

ma hines with the same time restri tion? Theorems 2 and 3 give a partial answer to this question. But

Theorem 6 used simulation with exponential overhead.

4. What an be said of the power of e ologi al RAM (Random a ess ma hines)? The input data to su h

a ma hine is an in�nite sequen e of natural numbers stored in its registers.

Referen es

[1℄ V.N. Agafonov. Complexity of algorithms and omputations: A ourse for students of University of

Novosibirsk, part 1. Publishing house of University of Novosibirsk, 1975. (Russian)

[2℄ Ya.M. Barzdin. Complexity of symmetry re ognition on Turing ma hines, Problemy kibernetiki, v. 15

(1965), 245{248. (Russian)

[3℄ F.C. Hennie. One tape o�-line Turing ma hine omputations. Information and Control, 8:6 (1965) 553{

578.

[4℄ M. Li, P. Vitanyi. Introdu tion to Kolmogorov omplexity and its appli ations. Springer Verlag, 1997.

9