MIT6_045JS11_lec10

MIT6_045JS11_lec10 - 6.045: Automata, Computability, and...

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

View Full Document Right Arrow Icon
6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010 Class 10 Nancy Lynch
Background image of page 1

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

View Full DocumentRight Arrow Icon
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.
Background image of page 2
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
Background image of page 3

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

View Full DocumentRight Arrow Icon
Self-referencing machines and programs
Background image of page 4
Self-referencing machines/programs • Consider the following program P 1 . •P 1 : – Obtain < P 1 > –Ou tpu t < P 1 > •P 1
Background image of page 5

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

View Full DocumentRight Arrow Icon
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
Background image of page 6
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
Background image of page 7

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

View Full DocumentRight Arrow Icon
Statement of the Recursion Theorem
Background image of page 8
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).
Background image of page 9

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

View Full DocumentRight Arrow Icon
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.
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

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 Right Arrow Icon
Ask a homework question - tutors are online