28.10.2022 Views

Computability complexity and Languages- Fundamentals of Theoretical Computer Science

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

4. Computable Functions 31

Computability theory (also called recursion theory) studies the class of

partially computable functions. In order to justify the name, we need some

evidence that for every function which one can claim to be "computable"

on intuitive grounds, there really is a program of the language Y which

computes it. Such evidence will be developed as we go along.

We close this section with one final example of a program of .Y:

[A] X+-- X+ 1

IF X* 0 GOTO A

For this program 9', I/J.~ 1 >(x) is undefined for all x. So, the nowhere

defined function (see Chapter 1, Section 2) must be included in the class of

partially computable functions.

Exercises

1. Let 9' be the program

What is 1/J.~IJ(x )?

IF Xi= OGOTOA

[A] X+-- X+ 1

IF Xi= OGOTO A

[A] Y +-- Y + 1

2. The same as Exercise 1 for the program

[ B] IF X * 0 GOTO A

Z+-Z+1

IF Z * OGOTO B

[A] X+-X

3. The same as Exercise 1 for the empty program.

4. Let 9' be the program

[A]

Y+-XI

IFX 2 =0GOTO£

Y+-Y+1

Y+-Y+1

X 2 +-- X 2 - 1

GOTOA

What is I/J.!)>(r 1 )? l/l}}>(r 1 , r 2 )? I/Jj}>(r 1 , r 2 , r 3 )?

5. Show that for every partially computable function f(x 1 , ••• , xn), there

is a number m ~ 0 such that f is computed by infinitely many

programs of length m.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!