The Recursion Theorem

22
The Recursion Theorem Pages 217– 227 1 ADVANCED TOPICS IN C O M P U T A B I L I T Y THEORY

description

ADVANCED TOPICS IN C O M P U T A B I L I T Y THEORY. The Recursion Theorem. Pages 217– 227. Recursion. It concerns the possibility of making machines that can construct replicas of themselves . 1. Living things are machines ( operate in a mechanistic way ). - PowerPoint PPT Presentation

Transcript of The Recursion Theorem

1

The Recursion Theorem

Pages 217– 227

ADVANCED TOPICS INC O M P U T A B I L I T Y

THEORY

2

3

Recursion

• It concerns the possibility of making machines that can construct replicas of themselves.

1. Living things are machines (operate in a mechanistic way).

2. Living things can self-reproduce (essential characteristic).3. Machines cannot self-reproduce.

4

a machine A that constructs a machine B

• A must be more complex than B. But a machine cannot be more complex than itself.

How can we resolve this paradox?• Making machines that reproduce themselves

is possible. (The recursion theorem demonstrates how.)

5

SELF-REFERENCE

• Let's begin by making a Turing machine that ignores its input and prints out a copy of its own description.

• We call this machine SELF. • To help describe SELF, we need the following

lemma.• LEMMA 6.1

6

SELF-REFERENCE (algorithm)

7

Machines A and B

• The job of A is to print out a description of B, and conversely the job of B is to print out a description of A.

• The result is the desired description of SELF.• The jobs are similar, but they are carried out

differently.• Our description of A depends on having a

description of B. So we can't complete the description of A until we construct B.

8

Machines A and B (cont)

For A we use the machine P<B>, described by q(<B>).q(<B>) means applying the function q to <B>.

• If B can obtain <B>, it can apply q to that and obtain <A>.

• B only needs to look at the tape to obtain <B>.• Then after B computes q(<B>) = <A>, it combines A

and B into a single machine and writes its description <AB> = <SELF> on the tape.

9

Machines A and B (algorithm)

10

TM that prints its own description

Suppose that we want to give an English sentence that commands the reader to print a copy of the same sentence. One way to do so is to say: Print out this sentence.

11

Example 2

12

TERMINOLOGY FOR THE RECURSION THEOREM

• recursion theorem in TM - (If you are designing a machine M, you can include the phrase "obtain own description <M>" in the informal description of M's algorithm.)

• Two ways: 1. use any other computed value <SELF> 2. simulate <M>.

13

Algorithms

2. simulate <M>.

1. use any other computed value <SELF>

APPLICATIONS - computer virus

14

THEOREM 6.5

THEOREM 6.6

THEOREM 6.8

15

Decidability of logical Theories

• What is a theorem?• What is a proof? • What is truth? • Can an algorithm decide which statements are

true? • Are all true statements provable?

16

Decidability of logical Theories (cont.)

We focus on the problem of:• determining whether mathematical

statements are true or false and,• investigate the decidability of this problem.

• Can be done - an algorithm to decide truth and another for which this problem is undecidable.

17

• Statement 1 - infinitely many prime numbers exist - solved.• Statement 2 is Fermat' last theorem - solved, and• Statement 3 - infinitely many prime pairs1 exist - unsolved.

1. differ by 2

Decidability of logical Theories (cont)

18

let's describe the form of the alphabet of this language:

- A formula is a well-formed string over this alphabet- All quantifiers appear in the front of the formula.- A variable that isn't bound within the scope of a quantifier is called a free variable

Decidability of logical Theories (cont.)

19

Examples

1. is the universe over which the variables may take values.

• A universe together with an assignment of relations to relation symbols is called a model.

20

Examples (cont)

Formally we say that a model M is a tuple (U, P1, ... , Pk), and

• language of a model is the collection of formulas that use only the relation symbols the model assigns and that use each relation symbol with the correct arity.

21

EXAMPLE 6.11 (decidable)

• let M2 be the model whose universe is the real numbers R and that assigns the relation PLUS to R1, where PLUS(a, b, c) = TRUE

whenever a + b = c.• Then M2 is a model of • Replacing R with N in M2, the sentence would

be false.

22

A DECIDABLE THEORY

• Church showed that Th(N, +, x), the theory of this model, is undecidable.

PROOF IDEA