MIT6_045JS11_lec10

# MIT6_045JS11_lec10 - 6.045 Automata Computability and...

This preview shows pages 1–11. Sign up to view the full content.

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010 Class 10 Nancy Lynch

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Today • Final topic in computability theory: Self-Reference and the Recursion Theorem • Consider adding to TMs (or programs) a new, powerful capability to “know” and use their own descriptions. • The Recursion Theorem says that this apparent extra power does not add anything to the basic computability model: these self-referencing machines can be transformed into ordinary non- self-referencing TMs.
Today • Self-Reference and the Recursion Theorem • Topics: – Self-referencing machines and programs – Statement of the Recursion Theorem – Applications of the Recursion Theorem – Proof of the Recursion Theorem: Special case – Proof of the Recursion Theorem: General case • Reading: – Sipser, Section 6.1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Self-referencing machines and programs
Self-referencing machines/programs • Consider the following program P 1 . •P 1 : – Obtain < P 1 > –Ou tpu t < P 1 > •P 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Self-referencing machines/programs • A more interesting example: •P 2 : On input w: – If w = ε then output 0 –E l s e • Obtain < P 2 > • Run P 2 on tail(w) • If P 2 on tail(w) outputs a number n then output n+1. • What does P 2 compute? • It computes |w|, the length of its input. • Uses the recursive style common in LISP, Scheme, other recursive programming languages. • We assume that, once we have the representation of a machine, we can simulate it on a given input. • E.g., if P 2 gets < P 2
Self-referencing machines/programs • One more example: •P 3 : On input w: – Obtain < P 3 > – Run P 3 on w –I f P 3 on w outputs a number n then output n+1. • A valid self-referencing program. • What does P 3 compute? • Seems contradictory: if P 3 on w outputs n then P 3 on w outputs n+1. • But according to the usual semantics of recursive calls, it never halts, so there’s no contradiction. •P 3

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Statement of the Recursion Theorem
The Recursion Theorem • Used to justify self-referential programs like P 1 , P 2 , P 3 , by asserting that they have corresponding (equivalent) basic TMs. • Recursion Theorem (Sipser Theorem 6.3): Let T be a TM that computes a (possibly partial) 2- argument function t: Σ * ×Σ * →Σ *. Then there is another TM R that computes the function r: Σ * →Σ *, where for any w, r(w) = t(<R>, w).

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
The Recursion Theorem • Recursion Theorem: Let T be a TM that computes a (possibly partial) 2-argument function t: Σ * ×Σ * →Σ *. Then there is another TM R that computes the function r: Σ * Σ *, where for any w, r(w) = t(<R>, w). • Thus, T is a TM that takes 2 inputs.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 46

MIT6_045JS11_lec10 - 6.045 Automata Computability and...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online