• Keine Ergebnisse gefunden

Computational complexity of real functions and real numbers

N/A
N/A
Protected

Academic year: 2022

Aktie "Computational complexity of real functions and real numbers"

Copied!
55
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

deposit_hagen

Publikationsserver der

Mathematik und

Informatik

Informatik-Berichte 59 – 06/1986

Norbert Theodor Müller

Computational complexity of real

functions and real numbers

(2)

Computational complexity

of real functions and real numbers

Norbert Th. Müller

LG Theoretische Informatik Fern G niversität Hagen

Postfach 940 D-5800 Hagen

(3)

' \ '

',.

' /

{

/

Computability and complexity of real functions and real numbers are studied in a model where methods of recursive function theory as well as methods of numerical analysis can be used at a very low level of cornplexity. Topological properties turn out to be important for computational questions as well as for questions of existence of complexity bounds. As an example of application the computational complexity of the roots of real functions is studied with respect to the analytic properties of the functions.

(4)

1 Introduction

Computability and complexity of real functions are usually studied from two dif- ferent starting points: Numerical analysis and type 2 recursion theory.

Numerical analysis deals with a great number of algorithms for real functions and for operators on real functions: elementary functions like e, log, sin, etc., determination of roots, differentiation, and integration, to name only a few. Com- mon to all the algorithms is the idea of approximation processes, so classically they were studied in terms of convergence. Implementation on computers intro- duced the problem of representing the real numbers in the computer. This was ( and usually is still) done using floating point representations with fixed precision.

The complexity of the algorithms was then measured by counting the elementary arithmetic operations necessary to achieve the desired precision of the result.

Rounding errors in floating point arithmetic with fixed precision may accumu- late enormously, so arithmetic software allowing dynamic changes in the precision of the number representation is of growing interest. Here measuring complexity has to pay respect to the precision used at every point of a computation. Doing this Brent [2,3] could show that the concept of variable precision may even help to save a large amount of computational work.

However, all the models used in the approaches from numerical analysis are intended to reflect properties of arithmetic software ( existing or yet to be ~evel- oped) with finite precision. Hence recursion theoretical techniques like the powerful method of diagonalization can hardly be used.

The approaches starting from type 2 recursion theory, i.e. the theory of com- putability on sets with cardinality not greater than that of the continuum, are essentially different. An important result of these ·appraoaches is that continu- ity with respect to certain 'natural' topologies is a prerequisite to computability.

Very instructive applications to constructive analysis have been found by Kreitz and Weihrauch [8,10]. Ko and Friedman

[7'

have done excellent work in research on type 2 complexity in showing closure properties with analytic background of the set of real functions computable in polynomial time and pointing out certain connections to the 'P,;;,,NP' and 'P~PSPACE' questions.

In this paper we present a definition of computability and complexity where methods of numerical analysis as weil as methods of recursive function theory can be successfully used to yield finer distinctions in questions of complexity than Ko and Friedman did find. We are able to do this on a level of complexity fitting to the results of the numerical approaches. Especially our negative results on roots in section 6 point out interesting limits to the possibilities of numerical computation that hardly could have been found without recursion theoretical methods.

Our definition of computable real functions in section 2 follows Kreitz and Weihrauch: They explicitly defined computability for the set of sequences of nat- ural numbers and used representations to transfer their concept to other sets. We use infinite words over a certain alphabet instead of sequences of natural numbers

(5)

to ease our later definitions and proofs on complexity. The representation

e

of the real numbers we use is closely related to representations e.g. in [12,13,17).

Motivated by the work of Kreitz and Weihrauch we analyse the basic topological properties of

e-

Furthermore we present a method to transform classical numerical algorithms into our model.

In section 3 we give the basic: definitions of complexity of real functions. They are based on the idea that complexity should be measured by the amount of time necessary to determine the output of a computation up to the desired precision.

Topological properties turn out to be important in the question of the existence of complexity bounds. We show that for any compact subset of the domain of a computable real function there is a bound for the complexity that is valid for every element of the compact set. Since the domains of the elementary functions are, in fact, not compact, we generalize our definition in a way that the bound only must be valid 'locally', i.e. for any point under consideration the bound must hold almost everywhere in a neighborhood of this point. We are able to show the existence of such bounds on every locally compact set. Since e.g. any open or closed subset of the real numbers is locally compact, this is sufficient for the existence of complexity bounds for almost every real function of practical interest.

Constable [4] has developed a theory of abstract type 2 computational com- plexity where he enriched Blum's two axioms by a third one concerning the input information an algorithm uses to produce a certain amount of output. We show that paying respect to these connections between input and output can be very successful in the study of the substitution of computable real functions.

In section 4 we define and investigate the notion of regular functions t: IN-+- IN having certain regularities in their growth. Similar conditions are used in a variety of papers (see e.g. [ 1,2,3,6,15]). The conditions ·we use imply that the growth of functions has to be very similar to that of polynomials. Especially functions of exponential growth are not regular according to our definition. On the other hand, a lot of functions that are bounded by some polynomial are regular. So our conditions are fulfilled by almost all complexity bounds of practical interest.

The corresponding complexity classes turn out to have very interesting closure properties with respect to substitution and differentiation. Furthermore we prove a hierarchy theorem for real numbers.

In

section 5 we apply our definition to some elementary functions in order to show that our approach is realistic. Furthermore the results of this section are needed in section 6 where we deal with the complexity of the real roots of func- tions f with respect to the analytic properties of f: Whenever Newton 's iteration method can be used to determine a simple root ~ of

f,

~ turns out to have es- sentially the same ( or lower) complexity as

f.

A similar result had already been shown by Brent [2], but we furthermore show that the result even holds for any root of higher (but finite) order of an analytic function, where Newton's method is not directly applicable. As an immediate consequence we obtain that regular complexity classes of real numbers usually are a real closed field. The hierarchy

(6)

theorem of section 4 shows that there is even an infinite hierarchy of these closed fields. This is an improvement of a result from

[7],

where Ko and Friedman showed that the real numbers computable in polynomial time form a real closed field.

In the rest of the paper we improve a negative result on the complexity of roots from

[7]:

There are strictly increasing functions easily computable with roots of arbitrary complexity. These functions can be constructed such that they have con- tinuous higher derivatives or are even infinitely differentiable. So in general there is no direct connection between the complexity of a function and the complexity of its roots.

The following notations will be used throughout this paper. By IN we denote the set of natural numbers {0, 1, 2, ... }, 7l is the set of integers, <Q is the set of rational numbers and IR is the set of real numbers.

f:

A-+- B denotes a total function and

f:

A - -~ B ( with dashed arrow) a partial function

f

from

A

to

B . dom(f)

is the domain of the function

f. f

o

f'

or simply

ff'

denotes the composition of the (partial) functions

f

and

f'.

A representation is a surjective function from some given standard set onto a set with cardinality not greater than that of the continuum.

For sets X1 , . . . , Xn !et X1 x · · · x Xn be the the cartesian product of these sets.

xn

is the cartesian product of X with itself n times, especially X0

= { ()}

is the set containing only the empty tuple. The empty set is denoted by 0. By pri we denote the projecting function yielding the i-th component of a tuple .

. By fl we denote the special alphabet {0; 1,

I, • },

where we identify 0, 1,

I

with the real numbers 0, 1 and -1 respectively. fl * is the set of all finite words and fl00 is the set of all infinite words over fl. For a word w E fl * U fl00 , let l g ( w) be the length of w, w(i) is the i-th symbol of w for OS i

<

lg(w), w [i] := w(0)w(I) · · · w(i - 1) is the prefix of w of length i E IN and [w] := {p E fl00 1 w is a prefix of p} is the set of all infinite continuations of w. The empty word is denoted by c.

The quantifier 31 is an abbrevation for 'there is one and only one' and

V

denotes

'almost everywhere' or 'all but a finite number of exceptions'. We will use Landau's O-notation in a very strict way, w here for any t: INk-+-IN:

O(t) :=

{t':

INk-+-lN 1 (3c E IN)(~x EIN) t'(x)

s

C. t(x)}

For any x E IR let

and

llog2xj := max({m EIN

l 2m

~ x} U

{0}).

(7)

2 Computable real functions

In literature many different representations of IR are used. An excellent recursion theoretical comparison of these has been given by T. Dei! in [5]. C. Kreitz and K. Weihrauch

([8,11,19])

have found strong arguments in that three basic toper logical properties of a representation are of great importance even for question of computability. In the parts (a)-to (c) of Theorem 2.3 below these properties are formulated for the representation we use in this paper.

To ease the formulation of the definition we use the following notation. lt will be used very often throughout this paper.

lk(p) := min{k E lN

I

p(k) ='•'} for any p EO*

u

000 ,

i.e. lk(p) indicates the first occurence o"f '•' in p, which at the same time is the nurnber of symbols preceeding the ·• '.

2.1 Definition. (a) The representation

e:

0 00 --,-IR is defined by

k(p)-1 oo

e(P) :=

I: p(lk(p)-1-i) •

2;

+ LP(lk(p)+i). ri

i=O i=l

for any

p

E dom(e) :=

{p

E 0 00 1 p[IJ

=f.

O /\

p[2]

€f_ {

II, II}

11 (:ll i E

lN)p( i")

='• '}.

(b) For any k E lN the representation {!k: (000)k--,-IRk is defi.ned by ek(P) :=

(e(P1), ... ,

e(Pk))

for any p =

(P1, ...

,Pk) E dom(ek) := (dom(e))k.

e

is a modified binary representation of the real numbers; the set

{O, 1}

of values allowed in representing a number in binary form is extended to the set

{I,o, l}.

Since ] • 2i+I 7

I •

2;

=

0 • 2i+i

+

1 • 2i and

I •

2i+I

+

1 • 2i

=

0 • zi+I

+ I ·

2;,

both p[2J

E {II, II}

and p[l]

= 0

indicate the existence of a 'leading zero'.

Therefore the constraint p[l]

=f.

0 I\ p[2] €f_

{11, 11}

in the definition of dom(e) has a 'normalizing' effect.

\Ve will frequently use the following notations based on the definition of Q.

e([w])

:=

{x

E IR 1 (:lp E [w])

e(P) =

x} for any w

'= n*,

i.e. e( [w]) is the set of all real numbers that can be represented with w as a prefix.

p<n> := p[lk(p)

+

n

+

I] for any p E 000 and n E

IN,

i.e. p<n> is the prefix of p up to the n-th symbol after the first '•'.

DOlvln := {p<.n> 1 p E dom(e)} for any n E IN and DOlv/ := UnEIN DOlvln, i.e. DOA1

= {

11, E 0:;:

1

w [IJ =1- O /\ w [2J tf_

{II,

11} /\ (:ll i < lg(w ))w(i) ='•'}.

e(w) := e(wOOO · · ·) for any w E DOM.

lk(C) := max{lk(p)

i

p E dom(e) /\ (3i, I:SiSk)e(p) E pr;(C)} for any k>O and any set C ~

m_k_

(8)

Next we show three very important properties of

e-

They not only determine the topological behaviour of

e

but furthermore are fundamental for the construction and the proofs on the correctness and complexity of all the algorithms in this paper.

2.2 Lemma. (a) lk( C) exists for every compact C ~

JR\

k>O.

(b) (VnEIN)(VwEDOMn) e([w])={xElRj

lx-e(w)I

::::;rn}

(c) (VxElR)(3pEe-1({x}))(VnEIN)

lx-e(p<n>)I

::::;2-(n+i)

Proof. (a) For any

p

E

dom(e)

with lk(p)

2:

2 we have p[2J E {10, 11,

Io, IT}

and hence

k(p)-3 oo

le(p)

1

>

lp(O) • 2k(p)-1

+

p(I) • 2k(pJ-21 -

L i - Lri

i=O i=l

>

2k(p)-1 _ 2k(p)-2

=

2k(p)-2.

Hence either lk(p)::::; 1 or 2k(p)-z::::;

le(p) 1.

Since Cis compact, pri(C) is bounded for any

1:Si:Sk.

So the set {lk(p) 1

p

E

dom(e) /\ (:li, 1:Si=Sk)e(p)

E

pr;(C)}

is bounded and hence has a maximum.

(b) Let n and w with w E DOM n be given. For every x E

e(

[w]) there is a

p

E [w] with

e(p) =

x and hence

00 00

lx-e(w)I = le(p)-e(w)I =

1

L

p(lk(p)+i)-2-il

< L

2 - i = r n .

i=n+I i=n+l

On the other .hand any e E lR with I e 1 ::::; 2-n can be represented in the form c

=

L~n+l c:;2-i for a suitable sequence (c:i)~n+I with e; E {I,0, 1}. We define p; E dom(e) by Pe := W€n+1€n+2 · • · yielding

e(w) +

c = Q(Pe) t:

e([w]).

( c) Let x E IR be given. By an inductive definition we prove the existence of a sequence ( un)nEIN with Un

E

DOJ\1 n, 1 X - e( un) 1

:S

2-(n+I) and Un prefix of Un+I:

Since

e(

DO!vf 0 )

=

7l there is a u0 E DOM O such that I x -

e(

u0 ) 1

:S

2-1 and with the following definition of Un+l for any n E IN we yield the required properties:

{

Unl if X

> Q(

Un)

+

2-(n+2)

Un+l := Un~ jf IX -

t!(

Un) 1

:S

2-(~+Z)

Unl if X

< e(

Un) - r(n+Z)

The sequence (un)nEIN uniquely determines a

p

E

dom(e)

such that Un is a prefix of p for all n

;=

IN. For this p we get (\in EIN) lx - g(p<n>) 1 S 2-fn+l)_

In order to interpret Lemma 2.2 from a topological viewpoint the topology on

0

00 induced by the initial segments is adequate: the set { [w] i w E

O*}

is a basis of a topology as can easily be seen. Let rn be the topology on 000 induced by this

(9)

basis and let

rt

be the corresponding product topology on (1l00)k. Furthermore let

TJR be the usual Euclidean topology on IR and let

rlR

be the corresponding product topology on

IR.k.

2.3 Theorem. (a) !lk is a continuous (partial) function with respect to

r&

and

r~.

(b) For any topological space

(M,r)

and any

H:IR.k--~M,

if

Ho{!k

is continuous, then

H

is continuous, too.

(c) For any continuous 8: (1l00)k--~1R.1 there is a continuous f: (1l00t--~(1l00 )1 such that 8

= e

1 o f.

(d) For any compact C ~ lR.k, the set

e;

1(C) is compact.

Proof. The cases k

=

0 or l

=

0 are evident, so !et k > 0 and l > 0.

(a) Since !lk is defined componentwise using

e

and since r~ and r~ are the product topologies of

rn

and TJR, we only have to prove the continuity of g. Hence it is sufficient to show that for any p E dom(g) and for any neighborhood U ~ lR. of

e(p)

there is a neighborhood

V ;;;

1100 of

p

such that

e(V) ;:

U.

Let p E dom(e) and a neighborhood U of

e(p)

be given. Then there is am E

IN

such that

{y l ly-e(p)

1

:S

z-m} ~

U.

We define

V:=

[p<m_j__l>]. Using Lemma 2.2(b) we get for any p' E V

n

dom(e)

le(p')-e(p)I <

le(p')-e(p<m+l>)I

+ le(p)-e(p<m--"-l>)I

<

z-(m+l)

+

z-(m+l)

z-m

Hence

e(V)

~ {y

l

ly -

e(p)

1

:S

2-m} ~

U.

(b) Let

x

:=

(x

1 •••• ,

xk)

E

dom(H)

and a neighborhood

U

~ M of

H(x)

be given.

By Lemma 2.2(c) for any

xi

there is a p; E e-1({x}) such that

('v'n

E

IN) 1

X; -

e(p;<n>) 1 =-~

z-(n+l).

Let

p

:=

(p

1 , . . . , Pk). Since H oek is continuous, there is a neighborhood V of

p

such that

Hor2k(V)

~

U.

The set {[w]

E 11::x)} is a basis of

rn,

so for p and V there is a m E N with

We define a neighborhood V' ~ IR,k of

x

by

V':= {(Y1, ... ,yk)

1

('v'i,

1

:Si :S k) ly; -- x:I

< z-(m+ll}.

Then for any (Y1, .... Yk) E V':

lyi - e(p,<m>)

1

< lyi -

x;I

+ lx - e(p<m>)

1

<

2-(m+l)

+

z-(m+l)

2-m

(10)

By Lemma 2.2(b) we have

So for any fj E V'

n

dom(H) there is a 7j E V such that ff

= t!k(<J)

and

H(y) =

Ho ek(<i)

EU,

i.e H(V') ~

U.

Hence His continuous.

(c) We only consider the case l

=

l. Let a continuous function 8: (000)k--~IR be given. In the following we prove the existence of a continuous function f': (000 k)--~Ooo with (Vp E dom(8)) 8(p)

=

ef'(p). Then we yield a continu- ous function

r

with 8 =eo

r

by restricting the domain of f' to dom(8).

First we inductively define a function 1 :

(O* )k --~n*

by

1(€, ...

,c) := c

and for any w1 , . . . , wk EO* with lg(wi) = ... = lg(wk) and any a1, ... , ak E

n

let

where either u is an arbitrary element of the set {w

I

w

#

c /\ 1(w1, ... ,wk)w E DOM A8([w1

a

1]

x ··· x

[wkak]) ~ e([1

(w

1, ... ,wk)w])}, ifthis set is not empty, or u

=

c, if this set is empty.

Now define

D,.,

~ (000

)k

by

{

for all n E IN there is a m E IN (P1,•••,Pk)ED,.,:-<=> w1 ' t h l ( ( [ g I p1 m , ... ,

J

Pk

[ J))>

m _ n and define f' by

, ( ) . = {

the uniquely determined q E 1100 such that for

r

Pi, .. ,,pk · all m EIN 1(p1[m], ... ,pk[m]) is a prefix of q for any (P1, ... , Pk) E

D,.,.

In order to prove the continuity of f' !et

p

:= (p1 , ••. , Pk) E D, and a neighbor- hood U ~ 1100 of f'(p) be given. Then there is a w :: 11., with f'(p) E [w] ~ U.

By the definition of D, there is am E :i:N" with lg(;(p1[m], ... ,pk[m]))

2:

lg(w).

Since both w and 1 (p1 [m], ... , Pk [m]) are prefixes of f' (p), w must be a prefix of 1(P1 [m], ... , Pk [m]). Let V := [p1 [m]] x · .. x [pk [m]].

For all

p'

E V

n

D, 1 (Pi [m], ... , Pk [m]) is a prefix of f'

(p').

Therefore w is a prefix of every word from f'(V), i.e. f'(V) ~ [w] ~ U. Hence f' is continuous.

Showing that dom(8) ~ D, and that (\ip E dom(8)) 8(p)

=

ef'(p) finishes the proof of (c). So !et p :=(Pi, ... ,Pk) E dom(c5) be given.

In order to prove

p

E D, we show that for all m E :i:N" there is a m' > m with [ g ( 1 (Pi [m], ... , Pk [m])) < l g ( 1 (pi [m'J, ... , Pk [m'])).

Let v := 1 (Pi [m], ... , Pk [m] ). By definition of ') either v = c or v E DOlvf.

(11)

v = €: Since 8 is continuous, there is a m'

>

m with

8([p1 [m1J] x · · · x [pk[m'J]) ~

{x

! lx - b(p) 1 S

r

1}.

So there is au E

DOM

0 with le(u) - o(p)I S 2-1 and

8([p1[m1J] x ··· x [pk[m'J]) ~

{x l lx- e(u)I SI}=

e([u]).

By definition of ,: lg(,(p1[m'], ... ,pk[m']))

>

0 = lg(€).

v E

DOM:

Then v E

DOMn

for an EIN. Define

{

I

if

o(p) S e(v) -

z-(n+2l, u := 1 if

o(p)

2: e(v)

+

z-(n+Z),

0 eise.

Since 8 is continuous, there is a m'

>

m with

Using

6(p)

E

e([v])

and Lemma 2.2(b) one easily verifies 6([p1[m'J] x ··· x [pktm'J]) ~

e([vu]).

Hence lg(,(p1[m'], ... ,pk[m'J))

>

lg(v).

So

p

E

D-r·

Since for all n EIN

8(p)

E

e([f'(p)<n>])

and

ef'(p)

E

e([f'(p)<n>]),

using Lemma 2.2(b) we get

b(p)

=

ef'(p).

(d) (n00 ,

ro)

is a compact space. Hence ((fl00

)k, r~)

is also compact and, fur- thermore,

D

~ (fl00

)k

is compact if the projections

pr;(D),

I

S

i

S k,

are com- pact. Therefore we only need to show that for any compact set C ~ lR the set

e-

1 (

C)

~

n

00 is compact.

Let C ~ lR be an arbitrary compact, i.e. bounded and closed, set. Suppose

e-

1(C) is not compact, i.e. suppose there is a open covering {Oi

i

i EI} of

e-

1 (

C)

which has no finite subcovering. Since

n

00 has a countable base, w .l.o.g.

we may assume that

I

=IN.So there is a sequence

(Pn)nEIN;;;; e-

1(C) such that ('in E IN)Pn (/.

U

1~n Oj.

The compactness of

n

00 implies that

(Pn)

has an accumulation point p E

n

00 •

We conclude [p[kJ]

n e-

1(C) =/=-

0

for all k E IN. Hence p[IJ

-1-

0 and p[2] (/. {11,11}. By Lemma 2.2(a) max{lk(q) 1 q E

e-

1(C)} exists. Hence there .must be a kp E IN with p(kp) ='•'. Since p(k') ='• for a k'

#-

kp implies

[p[max{k',

kr}H n dom(e)

=

0, kr

is unique. Hence p E

dom(e).

By Lemma 2.2(b) [p[k]]

n e-

1(C)

#- 0

for all

k

E IN implies that

e(P)

is an accumulation point of C. Since C is closed, we have

e(p)

E C. Hence there is a i EIN with p EO;. Since p is an accumulation point of

(Pn),

there must be infinitely many k E IN with Pk E 0;. Therefore there is a k 2: with Pte E Oi ~

Ui

9 OJ°, which is a contradiction to the construction of

(Pn).

(12)

Part (d) of the theorem, which is a consequence of Lemma 2.2(a) and hence is a consequence of the normalization of

e,

will enable us to prove the existence of a complexity bound for any real function defined on a compact set. Parts (a) to (c) of the theorem show that via

e

the continuous real functions are closely related to the continuous functions on 0 00 •

2.4 Corollary. A function

J:

JR,k--~JR,1 is continuous if and only if there is a continuous function

r: (noo)k--~(noo) 1

such that

f

O t!k

=

t!l O

r.

Proof. If

f

is continuous, then by 2.3(a)

f

o t!k is continuous and by 2.3(c) a continuous

r

with

f

o Qk

= e

1 o

r

does exist. On the other hand, if

f

o l!k

= e

1 o

r

for a continuous

r,

then by 2.3(a) and 2.3(b)

f

must be continuous. [J

We now define computability on 000 using a special kind of a Turing machine:

oracle Turing machines. Our definition follows [18]: The oracles are attached to the Turing machines in the form of infinite inputs.

2.5 Definition. An oracle Turz·ng machine is a Turing machine M of the following type:

- M has input terminals where inputs from 000 can be read symbol by symbol, - M has the usual work tapes,

- M has output terminals where outputs from 000 are produced symbol by symbol.

We say that M is a (k, l)-oracle Turz·ng machine, if M has k input terminals and l output terminals (k

2':

0, l

2':

1).

The function f M: (000)k --~(000 )1 computed by a (k, l)-oracle Turing machine M is defined by

{

given the inputs p1 , . . .

,Pk

E 0 00 at the input

rM(PI,···,Pk)

:= (q1,••·,qt) {::> terminals, A1 produces ql,···,ql E

noo

at the

output terminals.

The definition of rM demands rM(P1 , .••

,Pk)

E (0=)1, i.e. in order to produce a defined value the oracle Turing machine M must necessarily compute forever and thereby must produce infinitely many symbols at every output terminal.

2.6 Definition. A function f: (000)k

--~(f2

00 )

1 is computable, if there is a (k, l)- oracle Turing machine M with

r = r

M.

Since an oracle Turing machine reads its inputs sequentially and produces its outputs sequentially, the prefixes of the outputs from a given computation of Mare completely determined by appropriate prefixes of the given inputs; so the topology ro is adequate to computable functions.

2.7 Theorem. Every computable function

r: (noo)k--~(f2oo) 1

is continuous.

(13)

Proof. Let f: (1l00)k --:,.-.(1100 )1 be a computable function and !et Af be a

(k, l)-

oracle Turing machine with f

=

fM. Furthermore let p :=

(p

1 , ..• ,Pk) E dom(f) be arbitrarily given and !et U be a neighborhood of q

= (q

1 , . • . ,q1) :=

f(p).

Since U is a neighborhood of q, there is a n E IN such that [q1 [n_J] X • · · x [q, [n]] ~ U.

Since

r = rM,

M produces an infinite output on the input p. Hence there is a t E IN such that, given the input

p,

in the first t steps of the computation M produces at least n output symbols at every output terminal. In these

t

steps M can read at most the prefixes p1 [t], · · · , Pk [t] of the input. Hence for any input from [p1 [ t ] ]

x · · · x

[pk [ t ] ] the computations of M must be the same in the first t steps, i.e.

[q1 [n]] x · · · X [q1 [n]] r ' -

u.

Since [p1 [ t ] ] x · · · x [pk [ t ] ] is a neighborhood of p, we thus have shown that

f

=

f M is continuous.

Using oracle Turing machines as computing models and the representation {! as a mean to name real numbers, we achieve a very natural approach to computability on lR.

2.8 Definition. A function f: ]Rk --:,.-.]R1 1s computable if there is a (k, l)-oracle Turing machine

A1

such that

In this case we say that

f

is computed by J..1.

Using Theorem 2.3 and Theorem 2. 7 we immediately get

2.9 Theorem. Every computable function

J: IR.k --~

IR.1 is continuous.

We identify a real tuple

x

E IR.1 with the 0-ary function ex: { () }--1-IR1 defined by

ex()

:=

x.

So Definition 2.8 includes a definition of computability for real numbers:

Areal number is computable, if there is an oracle Turing machine without any input terminals computing a

q

E

n'X)

with

e(q) =

x. This definition is easily shown tobe equivalent to a Jot of other ones. Hence the set of real numbers computable by an oracle Turing machine includes e.g. all algebraic numbers and many transcendental numbers like e and 1r.

Some of the computable real functions are addition, multiplication, all polyno- mials with computable coefficients and the trigonometric functions. The following lemma is helpful in proving the computability of these and a lot of other real func- tions. lt enables us to use methods of numerical approximation in the construction of oracle Turing machines.

(14)

2.10 Lemma. There is a Turing program which, given inputs v E DOMn', w E DOM and n E 1N with n

2

n', computes a word v' E

n*

such that vv' E DO.A1 n and

e([v])

11 {x

I

lx - e(w) 1 :::; r(n+2))} ~ e([vv']).

The program stops after at most Cad • ( n+ lk ( v)

+

1) steps for some constant Cad E 1N.

Proof. In order to specify the individual syrnbols of the input v E DOM n' we use the notation deterrnined by v = vk(v)-I · · · v0 • v_1 · · · V-n'· In addition Jet Vj := 0 if j

>

lk(v) or if j

< -n',

so that we have e(v)

= LVi

·2i. Similarly !et wi, j E 'll,

iE'll,

denote the corresponding syrnbol of the input w E DOM resp. the syrnbol 0, so that e(w)

= L

wi · 2i.

iE'll,

Consider the following algorithrn:

Deterrnine lk(v). Then start to deterrnine lk(w). If lk(w) turns out tobe greater than lk(v)

+

4, define the output v' tobe the word O · · · 0 --..-, and stop.

Let K := lk(v)

+

4, let D := 0.

For i

==

K down to -n' do D := 2 · D

+

Wi - vi For i

==

-n' - 1 down to -n do

n-n'

E := 8. D

+

4. Wi

+

2. Wi-1

+

Wi-2

v; ·- u

if if -if

E:::;

E 2 2:::; 3 -3

E:::;

2 D := 2 · D

+

w; -

v;

Define the output v' to be the word v~n'-l · · · v~n·

We now prove that the algorithm has the desired property. By the construction of the algorithm v' automatically satisfies vv' E DO.M

If

e(

[v])

n {

x 1 1 x -

Q(

w) 1 :::; 2-(n+z)}

=

0, we are finished. So suppose that ~ is arbitrarily chosen from Q([v])

n

{x

l

lx - e(w) 1 S z-(n+2l}. Then

le(w) 1

<

le(w) - ~I

+

1 ( - e(v) 1

+

le(v) 1

:S

rfn+z)

+

rn'

+

le(v) 1

<

le(v) 1 --r 2:::; 2lk{v)

+ 2:::;

2lk(v)+2 •

As in the proof of Lemma 2.2(a) we have lk(w) :::; 1 or 2lk(w)-2 :::; le(w) 1. Hence Ik(w):::; lk(v)

+4.

Let k be the content of the variable K, i.e. k

=

lk( v)

+

4. Let di E 7l be the content of the variable D at the end of loop i·, where k

2

i

2

-n, and Jet ei E 7l be the content of the variable E at the end of loop i, where -n'

>

i 2 -n.

(15)

Furthermore for any i with i

2

-n' !et Xi :=

I:Vi · 2i,

for any i with -n'

>

i

2

-n

j?_i

let Xi :=

L

Vj • 2i

+ L vi ·

2i and for any i E '/l let Yi :=

LWi ·

21 .

j?_-n' -n1>j?_i j?_i

First we show that for any i with k

2

i

2

-n we have 2' · di

=

Yi - Xi:

i

=

k: Since k 2 max{lk(

v),

lk(

w)}

we have

2k · dk

=

2k(wk - vk)

= L

wk · 2k -

L

vk · 2k

=

Yk - Xk-

i?.k j?_k

k

>

i

2

-n: Suppose 2i+1 di+l

=

Y,+1 - Xi+i• Then if i

2

-n'

· 2i · di

=

i(2 · d;+1

+

Wi - v;)

=

Yi+i - X;+1

+ i(w; -

vi)

=

Yi - x;

and if -n'

>

i

2

-n

2' ·

d;

=

2i(2 · d;+1

+

w; -

v;) =

Yi+1 - X;+1

+ 2'(w; - v:) =

Yi -

x;.

We immediately conclude for any with -n'

> i

2 -n:

2i-2 . e;

i-

2(8. di+I

+

4. Wi

+

2. Wi-1

+

Wi-2)

21.+l . d;+1

+

2i . W;

+

2i-l . W;-1

+

2i-2 . W;-2

Y. 1 -t+ t+l ,' 2i . ,

+

2i-1 . ,-1 -.L , 2i-2 . w· ) ,-~

Yi-2 - Xi+l

Since by assumption 1~ -

e(w)

1 :S 2-(n+2l, for any i with i 2 -n we have:

j <i-2

We now show that for any i with -n'

2

i

2

-n we have 1 ~ - x; 1

:S

2;.

i

=

-n': By definition

e(v) =

X-n'· Since by assumption x E

e([v]),

usmg Lemma 2.2(b) we get 1 ~ - X-n' 1

=

1 ~ -

e(v)

1 :::; 2-n'.

-n'

>

i 2 -n: Suppose 1 ~ - X;+ 1 I :S 2i+l. We study the following cases:

e;

:S

-3: Then

v; = I

and Xi

=

Xi+l -

2'.

In addition

~

=

~

-

Yi-2

+

Yi-2 :S

2'-

1 + Yi-2 since i 2 -n 2i-1 2i-2

< + ·

e;

+

Xi+I

<

Xi+l

so x;+ 1 -2i+I

:S

~

<

X;+i- Hence l ~-x; 1

=

1 ~-(x;+1-2i) 1 :S 2i.

e;

2

3: Similar.

-2

:S

e;

:S

2: Then v:

=

0 and X;= X;+i- In addition

1 ~ - X; 1 1 ~ - X;+1 I :S 1 ~ - Y;-2 I

+

IYi-2 - X;+1 I

<

2i-I

+ i-

2 le; I

:Si

(16)

So especially I

E -

x_n 1

:S

2-n and, since X-n

= e( vv'),

by Lemma 2.2(b) we have

e

E

e([vv']).

All the arithmetic operations used by the algorithm are integer operations, so the algorithm is surely computable on a Turing machine.

Furthermore, if

e

E

e([vJ) n

{x / lx -

e(w) 1 :S

2-(n+2)} =/=

0,

we have

1 di I r i I Yi - xi 1

:S

r i ( 1 Yi -

E

1

+

1

E -

xi 1)

<

2-i(zi+l

+

2i)

=

2

+

1

=

3

and hence I ei 1

:S

8 · 3

+

4

+

2

+

1

=

35.

Therefore, if I di 1

>

3 during the execution of the algorithm, we know that

e([v]) n {x·

1 lx -

e(w)

1

:S

2-(n+2l}

=

0. So restricting the range of the variable

D

to the set { -3, ... , 3} does not affect the correctness of the algorithm. In consequence the range of the variable

E

can be restricted to { -35, ... , 35}.

So, using unary notation of the integer values, all necessary arithmetic opera- tions can be done in constant time. Therefore the whole algorithm works in time

Cad • (

n+ lk( v) +

1 )for some constant Cad E

1N. D

We will use this Turing program as a subroutine in oracle Turing machines. A call of this subroutine will be made in the form 'ADJUST&OUTPUTi V TO W UPTO

N'

and we assume that

- the variables V, W and N represent the inputs v, w and n,

- the output v' is passed through the i-th output terminal of the calling oracle Turing machine and

- the content of V is extended from v to vv'.

The use of this subroutine will be done in the following context: Suppose during a computation intended to compute a real number x the variable V contains a word v E DO!vln with x E

e([v]).

By Lemma 2.2(b) v can be interpreted as an approximation to x having an absolute error of less or equal 2-n. Furthermore suppose that by some traditional numerical algorithm we are able to determine an approximation w to x with absolute error 2-(n'+2l, where n'

>

n. Now using the above subroutine we can improve our

v

to

vv'

with absolute error 2-n'. Doing this repeatedly the content of the variable

V

converges to a p ~

dom(e)

with e(p)

= x.

Since our subroutine guarantees that the content of V is always identical to the output produced so far, indeed we compute x in the sense of the definitions 2.5 and 2.8.

(17)

3 Complexity classes

The time complexity of a compu table function

f:

IR k - -)-IR1 should be defined depending on the time necessary to evaluate

f

up to a certain ( absolute or relative) precision. In a definition built on relative precision it is unavoidable to treat the value O with special care (see e.g. [2,3]). We think that this exceptional status of O is not justifiable. Therefore we built our definition of complexity on the concept of absolute precision. Using an oracle Turing machine M computing

f,

by Lemma 2.2 the time necessary to evaluate

f

in each component to the absolute precision 2-n is the time M needs to produce each component of its output up to the n-th symbol after the '• '.

3.1 Definition. (a) Let lvf be a (k,l)-oracle Turing machine computing a real function f:IRk--1-IR.1Then for any

p

such that

fM(P)

E dom(ei) and any n E lN let

{

the minimal number of steps lvf needs to produce all

rL,(p)(n)

:= the prefixe~-qi<n~ of the components qi of the output

(q1, · · ·, qt) .- fM(p).

(b) For any k E lN, S ~

IR.k

and t: IN

--r

lN the dass

TIME

5

(t)

~

{f:

IRk --1-IR.1

l l

E lN,

l >

O}

is defined by

{

S ~ dom(f) and there is an oracle Turing machine lvf

f

E

TIA1Es(t)

:-<=> computing

f

such that

(~n E IN)(Vp,

t:?k(P)

E S) fL,(p)(n) :::'.: t(n).

(We say that j'vf

proves

or

is a witness Jor f

E

TIMEs(t).)

(c) For any k EIN·, S

s;: IR.k

and T ~ {t: IN--rlN} Jet

TIA1Es(T)

:=

LJ TIMEs(t).

tET

Since an oracle Turing machine can produce at most one output symbol per step, for any p the function >.n.f{1 (p)( n) is strictly increasing. So we especially get n S rL,(p)(n) for any n EIN.

Given a computable function f:IR.k--:,-IR.1, the existence of a complexity bound

t

with

f

E

TIME s ( t)

depends on the set

S.

We will show that

t

exists whenever S ~ C ,; dom(f) for some compact set C. In literature (e.g. [3,7]) the set S is very often a closed interval, i.e. S itself is usually chosen as a special compact set.

(18)

3.2 Lemma. Let

M

be an oracle Turing machine computing a real function f: m_k--)---1R,1

and let C ~ dom(J) be a compact set. Then there is a function t: IN -+IN such that

(\In

E IN)(Vp,

t!k(P)

E C)

I'L(p)(n) :::; t(n).

Proof. For any n EIN and any p' :=

(p;, ... ,P~)

E

{!;;

1(C) define a neighborhood up',n of

p'

by Up,,n := [p; crL(p')(n)J] X .•. X [p~ crL(p')(n)J].

Since

M

can read at most one symbol per step from its input terminals, in the first rL(p')(n) steps of each computation with inputs from Up',n M must act exactly as if its input were

p'

and hence must produce the same output. Therefore we have

(Vp

E up',n

n {!;;

1(C)) rL(p)(n)

=

rL(p')(n).

For any n E IN { UP, ,n

I p'

E {!;; 1 (

C)}

is an open covering of

e;;

1 ( C). By Theorem 2.3( d)

e;;

1 ( C) is compact, so there is a finite set Fn ~ C with C ~ up'EF„ up',n•

Now define t: IN--+IN by

t(n)

:= max{fL(:V')(n) J

p' c

Fn}- Then for any n EIN and any

p

E e;;1(C) there is a

p'

E Fn with

p

E up',n and hence rL(p)(n)

=

rL(fi')(n) :::;

t(n).

0

In the previous proof we need Theorem 2.3(d), i.e the compactness of

e;;

1(C)

for a compact set C. This is the main reason for the 'normalization' of {! in Definition 2.1.

3.3 Corollary. Let /:

IR.k

--)--1R,1 be a computable function and S ~

1R.k

be given with S ~ dom(J).

If

5 ~ C ~ dom(J) for some compact set C, then there is a function t: IN -+IN with / E

TIMEs(t).

Proof. This is an immediate consequence from Lemma 3.2.

According to Definition 3.1 the function

t

in the corollary only needs to bound the complexity of a machine computing

f

for almost every n. By Lemma 3.2 we know that we are even able to chose the function

t

to be a complexity bound for every n. Later on we will frequently use this fact in our proofs.

Usually we are interested to know about the complexity of a function on the whole of its domain. But then Definition 3.l(b) and Corollary 3.3 are not satisfying.

For example consider the trigonometric function cos. In order to evaluate cos(x) up to precision 1/2 we must know the argument x at least up to absolute precision 2. Hence there can be no upper bound for the time necessary to evaluate cos up to precision 1/2 for the whole domain IR. of cos. In consequence there is not: IN--+.IN such that cos E

TIMEJR.(t).

An analysis of oracle Turing machines computing the elementary arithmetic functions shows that usually there is a single function t: IN--+ 1N which finally bounds the computing time on every compact subset of the domain. This gives yield to the following definition.

(19)

3.4 Definition. Let k E IN and S ~ m,k be given.

(a) For any t: IN -+-IN the class

TIMEi (t)

~

{/:

m,k --~fil1 i l E IN, l

>

O}

is defined by

{

S ~ dom(f) and there is an oracle Turing machine M

TIMEe (t)

·-<=> computing

f

such that

f

E

s . (vn

E

IN}(Vp, ek(P)

E C}

rL(p}(n} ~ t(n)

holds for any compact set C t;;:;; S.

(We say that

M proves

or is a

witness for f

E

TIME~(t).)

(b} For any

T;::;

{t:IN-+-IN} !et

TIME~(T)

:= UtET

TIMEi(t).

To fulfill Definition 3.4(a), for any compact C;::; S there has tobe a

nc

sucht that

t(n)

bounds

rL(p)(n)

for any

n

2'=

nc.

Since

rL(P)

is a strictly increasing function, this implies that there is a

de

with

(Vp, ek(P)

E C)

rit(p)(n)

~

t(n) + de

for any n E IN. We will often use this in the the following.

The superscript

e

in

'f

E

Tllv1E~(t)'

was chosen since t is a

local

complexity bound for

f

on

S,

in contrast to

'f

E

TIME s ( t) ',

w here

t

is a

global

complexity bound for

f

on S. In the following theorems the aspect of locality in Definition 3.4 can easily be seen.

3.5 Theorem. For any k EIN, S ~ m,k and t: IN -+-IN the following holds:

{

S ;::; dom(f) and there is an oracle Turing machine !vl

f

E

Tllv!Ee (t)

-<=> computing

f

su_ch that for any

x

E.

S

ther.e is a neighbor-

s

hood

Ux

of

x

w1th

(vn

E IN)('v';B,

ek(p)

ES

n Ux) I'L

1

(p)(n)

~

t(n).

Proof. Let k E

IN,

S ;::; fil\ t: IN -+-IN and a real function f with S ;::; dom(J) be given.

'<=': Let M be an oracle Turing machine computing

f

such that for any

x

E S there is a neighborhood

Ux;

of :X with

(vn

E

IN)(Vp, ek(P)

E

S

7

Ux) rL(p)(n) '.S t(n).

Let C be an arbitrary comp.act subset of S. Then C ~ UxEC U:r:

n

S. Since C is compact there is a finite set

F ;::; C

with

C ;::;

UxEF

Ux n S.

Hence for all but a finite number of

n

E IN we have

('v'p, ek(p)

E

C) rI

1

(p)(n)

S

t(n).

Since

C

~

S

was arbitrary, we have

JE TIME~(t).

'•':

Let JE

TIMEi(t)

and !et

M

be an oracle Turing machine proving this. Then suppose there is a

x

E S such that for any neighborhood U of x the condition

(Vp, {!k(P)

E Sn

U) rit-(p)(n)

S

t(n)

is violated by an infinite number of

n

E IN.

(20)

Hence for any set

Un

:=

{y

E

ffik I

lx-yl

<

2-n} there must be a

Pn

and a

in 2 n

with

edPn) Es n Un

and

rL-(Pn)(in) > t(in)-

Let

C

:= {x} U

{ek(Pn)

1 n E IN}.

C

is a bounded and closed, i.e. compact, subset of S with

(Vn

E IN)(::lin

2 n)(::lpn, ek(Pn)

E C)

I'It(Pn)(in) > t(in)-

This is

a contradiction to

M

proving / E

TIME~(t).

3.6 Theorem. Let /:ffik--~ffi1 be a computable function and let S ~

m,k

be given with S ~ dom(f). lf S ~ L ~ dom(f) for some locally compact set L, then there is a function t: IN ---+IN with f E

TIME~(t).

Proof. Let L be a locally compact set with S ~ L ~ dom(f) and let M be an oracle Turing machine computing

f.

In the following we show the existence of a t: IN ---+IN such that M proves / E

TIMEi,(t).

Then

f

E

TIME~(t)

is an i_mmediate consequence.

Since L is locally compact, for any

x

E L there is a neighborhood

Ux

of

x

such that

Ux n

L is compact. The topology (

rmY

has a countable basis, hence there is a sequence

(xi)iEIN

~ L such that L ~ UiEIN

Ux,·

By Lemma 3.2 there is a sequence

(t;);EJN

such that for any i E IN the given oracle Turing machine M is a witness for / E

TIMELnUx_ (t;).

i

Now let t:IN---+JN be defined by

t(n)

:=

max{t;(n) /

:Sn}. So for any i E IN we have (~

n

E

lN)ti ( n)

:S t (

n)

and hence for any i E IN l"1. is a witness for

f

E

TJMELnux (t).

i

Let C be an arbitrary compact subset of L. Since L ~ UiEIN

Ux;,

from the compactness of C we conclude that C ~ Üi::;m

Ux; n

L for some m E IN. Since for any i EIN lvf is a witness for

f

E

TIMELnux_ (t),

we get for all but a finite number

i

of

n

EIN

(Vp, ek(p)

E Ui:=;m

Ux; n L) r{i.(p)(n)

:S

t(n).

Hence

('t{}n

E

IN)(Vp, ek(P)

E C)

rL(p)(n) 'S t(n).

C being chosen arbitrarily, we have thus shown that

f i: TIJ\i[E~-(t)

with witness

M. C

Since especially all open or closed subsets of

IRk

are locally compact, Theorem 3.6 assures us of the existence of local complexity bounds for many interesting functions on the whole of their domains. In chapter 5 some examples will be studied.

From the definitions we immediately conclude

TIA·fE

5

(t)

~

TIME~(t)

for any S and t. On the other hand it is not too difficult to construct an example showing that this inclusion can be a proper one.

In the special case of 0-ary real functions, i.e. for real tuples

x

E IR', and S := IR.0, we have Tllv!Em"

(t) =

TINJE~"

(t)

for any

t.

Therefore we usually suppress the index ffi0 and the superscript

l

and simply write

TIME(t).

So the

Referenzen

ÄHNLICHE DOKUMENTE

A practice-based version of organizational learning and, thus, a point of departure in the social, historical and material processes for learning in organizations has gained

In the second part some effective representations of the open subsets of the real numbers are introduced and

In this report we investigate computational complexity of real numbers and functions using recursive function theory.. We define a constructive representation of

If we can find complex curves which have sufficiently high contact order with the hypersurface then the plurisubharmonic functions we study cannot be globally Lipschitz in the

Chapter 14, &#34;The Analysis of Qualitative Data,&#34; includes discussion of systematic analysis; the problems of the human as analyst; specialist computer software such as

Although a vast range of modeling and simulation tools already exists, automating the mapping from models to simulation codes remains a challenging and elusive goal – even for

This construction is complemented by Theorem 5.5, which combines with the results of [13] to show that if S is basic open of dimension at least 2 and admits an S-compatible

Jaroslav Hanˇcl, Jan ˇSustek, Radhakrishnan Nair, Pavel Rucki and Dmitry Bodyagin.. Jaroslav Hanˇcl completed his studies in mathematics at Charles University in Prague