David Evans CS200: Computer Science University of Virginia Computer Science Class 32: The Meaning of Truth.

Slides:



Advertisements
Similar presentations
David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 17: ProvingUndecidability.
Advertisements

David Evans CS150: Computer Science University of Virginia Computer Science Lecture 26: Proving Uncomputability Visualization.
Computational Models The exam. Models of computation. –The Turing machine. –The Von Neumann machine. –The calculus. –The predicate calculus. Turing.
David Evans CS200: Computer Science University of Virginia Computer Science Class 30: Models of Computation.
Cs3102: Theory of Computation Class 25: NP-Complete Appetizers Spring 2010 University of Virginia David Evans PS6 is due Tuesday, April 27 (but don’t wait.
Class 39: Universality cs1120 Fall 2009 David Evans University of Virginia.
David Evans CS200: Computer Science University of Virginia Computer Science Class 27: Modeling Computation.
David Evans CS150: Computer Science University of Virginia Computer Science Lecture 39: Lambda Calculus.
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
David Evans CS150: Computer Science University of Virginia Computer Science Lecture 40: Computing with Glue and Photons.
David Evans CS150: Computer Science University of Virginia Computer Science Lecture 31: Types of Types.
Turing Machines CS 105: Introduction to Computer Science.
David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 2: Modeling Computers.
Class 19: Undecidability in Theory and Practice David Evans cs302: Theory of Computation University of Virginia Computer.
Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning.
David Evans CS200: Computer Science University of Virginia Computer Science Class 31: Universal Turing Machines.
1 Turing Machines. 2 A Turing Machine Tape Read-Write head Control Unit.
Lecture 14: Church-Turing Thesis Alonzo Church ( ) Alan Turing ( )
Cs3102: Theory of Computation Class 17: Undecidable Languages Spring 2010 University of Virginia David Evans.
Lecture 20: λ Calculus λ Calculus & Computability Yan Huang Dept. of Comp. Sci. University of Virginia.
Cs3102: Theory of Computation Class 18: Proving Undecidability Spring 2010 University of Virginia David Evans.
Class 37: Computability in Theory and Practice cs1120 Fall 2011 David Evans 21 November 2011 cs1120 Fall 2011 David Evans 21 November 2011.
David Evans University of Virginia cs1120 Fall Lecture 38: Modeling Computing.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012.
David Evans CS200: Computer Science University of Virginia Computer Science Lecture 18: Think Globally, Mutate Locally.
David Evans CS200: Computer Science University of Virginia Computer Science Class 38: Fixed Points and Biological Computing.
Lecture 31: Laziness University of Virginia cs1120 Fall 2009 David Evans.
Lecture 8: The Meaning of Life, Searching for Truth and The Stuff Primitives are Made Of (and a smattering of Quantum Physics) David Evans
David Evans CS150: Computer Science University of Virginia Computer Science Class 33: Computing with Photons From The.
David Evans CS150: Computer Science University of Virginia Computer Science Lecture 30: Laziness.
Cs3102: Theory of Computation Class 14: Turing Machines Spring 2010 University of Virginia David Evans.
THE CHURCH-TURING T H E S I S “ TURING MACHINES” Part 1 – Pages COMPUTABILITY THEORY.
CSE 311 Foundations of Computing I Lecture 26 Computability: Turing machines, Undecidability of the Halting Problem Spring
David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 16: Universality and Undecidability.
David Evans CS150: Computer Science University of Virginia Computer Science Lecture 36: Modeling Computing.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
David Evans CS200: Computer Science University of Virginia Computer Science Lecture 18: Mutation M. C. Escher, Day and.
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
David Evans Class 15: P vs. NP (Smiley Puzzles and Curing Cancer) CS150: Computer Science University of Virginia Computer.
David Evans CS200: Computer Science University of Virginia Computer Science Class 32: The Meaning of Truth.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 12 Mälardalen University 2007.
Spring, 2011 –– Computational Thinking – Dennis Kafura – CS 2984 Lambda Calculus Introduction.
David Evans CS150: Computer Science University of Virginia Computer Science Class 32: Computability in Theory and Practice.
MA/CSSE 474 Theory of Computation Universal Turing Machine Church-Turing Thesis (Winter 2016, these slides were also used for Day 33)
David Evans CS200: Computer Science University of Virginia Computer Science Class 26: Halting Problem It is plain at any.
(Thunking about Thunks)
Lecture 6: Lambda Calculus
Lecture 2: Schreme David Evans
Class 27: Universal Turing Machines CS150: Computer Science
Class 30: Models of Computation CS200: Computer Science
Lecture 37: A Universal Computer
Lambda Calculus Revisited
Class 19: Think Globally, Mutate Locally CS150: Computer Science
Decidable Languages Costas Busch - LSU.
Class 36: The Meaning of Truth CS200: Computer Science
Lecture 24: Metalinguistics CS200: Computer Science
Class 37: Making Lists, Numbers and Recursion from Glue Alone
Lecture 27: In Praise of Idleness CS200: Computer Science
Lecture 26: The Metacircular Evaluator Eval Apply
Formal Languages, Automata and Models of Computation
Class 33: Making Recursion M.C. Escher, Ascending and Descending
Class 24: Computability Halting Problems Hockey Team Logo
Class 31: Universal Turing Machines CS200: Computer Science
Class 34: Models of Computation CS200: Computer Science
Class 33: Learning to Count CS200: Computer Science
Lecture 3: Rules of Evaluation CS200: Computer Science
Class 26: Modeling Computing CS150: Computer Science
Lecture 15: Crazy Eddie and the Fixed Points Background
Lecture 23: Computability CS200: Computer Science
Presentation transcript:

David Evans CS200: Computer Science University of Virginia Computer Science Class 32: The Meaning of Truth

7 April 2004CS 200 Spring Menu Lambda Calculus Review How to Prove Something is a Universal Computer Making “Primitives”

7 April 2004CS 200 Spring Lambda Calculus Review ( f. (( x. f (xx)) ( x. f (xx)))) ( z.z) term ::= variable |term term | (term)| variable. term  -reduction(renaming) y. M   v. (M [y v]) where v does not occur in M.  -reduction(substitution) ( x. M)N   M [ x N ] Parens are just for grouping, not like in Scheme

7 April 2004CS 200 Spring Alyssa P. Hacker’s Answer ( f. (( x. f (xx)) ( x. f (xx)))) ( z.z)   ( x. ( z.z)(xx)) ( x. ( z.z)(xx))   ( z.z) ( x.( z.z)(xx)) ( x.( z.z)(xx))   ( x.( z.z)(xx)) ( x.( z.z)(xx))   ( z.z) ( x.( z.z)(xx)) ( x.( z.z)(xx))   ( x.( z.z)(xx)) ( x.( z.z)(xx))  ...

7 April 2004CS 200 Spring Ben Bitdiddle’s Answer ( f. (( x. f (xx)) ( x. f (xx)))) ( z.z)   ( x. ( z.z)(xx)) ( x. ( z.z)(xx))   ( x. xx) ( x.( z.z)(xx))   ( x. xx) ( x.xx)  ...

7 April 2004CS 200 Spring Be Very Afraid! Some -calculus terms can be  -reduced forever! The order in which you choose to do the reductions might change the result!

7 April 2004CS 200 Spring Take on Faith (until CS655) All ways of choosing reductions that reduce a lambda expression to normal form will produce the same normal form (but some might never produce a normal form). If we always apply the outermost lambda first, we will find the normal form if there is one. –This is normal order reduction – corresponds to normal order (lazy) evaluation

7 April 2004CS 200 Spring Universal Language Is Lambda Calculus a universal language? –Can we compute any computable algorithm using Lambda Calculus? To prove it isn’t: –Find some Turing Machine that cannot be simulated with Lambda Calculus To prove it is: –Show you can simulate every Turing Machine using Lambda Calculus

7 April 2004CS 200 Spring Simulating Every Turing Machine A Universal Turing Machine can simulate every Turing Machine So, to show Lambda Calculus can simulate every Turing Machine, all we need to do is show it can simulate a Universal Turing Machine

7 April 2004CS 200 Spring Simulating Computation zzzzzzzzzzzzzzzzzzzz 1 Start HALT ), X, L 2: look for ( #, 1, -  ), #, R  (, #, L (, X, R #, 0, - Finite State Machine Lambda expression corresponds to a computation: input on the tape is transformed into a lambda expression Normal form is that value of that computation: output is the normal form How do we simulate the FSM?

7 April 2004CS 200 Spring Simulating Computation zzzzzzzzzzzzzzzzzzzz 1 Start HALT ), X, L 2: look for ( #, 1, -  ), #, R  (, #, L (, X, R #, 0, - Finite State Machine Read/Write Infinite Tape Mutable Lists Finite State Machine Numbers to keep track of state Processing Way of making decisions (if) Way to keep going

7 April 2004CS 200 Spring Making “Primitives” from Only Glue ( )

7 April 2004CS 200 Spring In search of the truth? What does true mean? True is something that when used as the first operand of if, makes the value of the if the value of its second operand: if T M N  M

7 April 2004CS 200 Spring Charge Remember: if you have team requests for PS8, I must receive them before midnight tonight! Friday: finish discovering truth (and proving lambda calculus is as powerful as a Turing Machine) Monday: Review session for Exam 2