230 likes | 432 Views
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 ).
E N D
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). 2. Living things can self-reproduce (essential characteristic). 3. Machines cannot self-reproduce.
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.)
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
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.
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.
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.
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>.
Algorithms 1. use any other computed value <SELF> 2. simulate <M>. APPLICATIONS - computer virus
THEOREM 6.5 THEOREM 6.6 THEOREM 6.8
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?
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.
Decidability of logical Theories (cont) • 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.) let's describe the form of the alphabet of this language: - Aformula 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
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.
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.
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 Nin M2, the sentence would be false.
A DECIDABLE THEORY • Church showed that Th(N, +, x), the theory of this model, is undecidable. PROOF IDEA