University of Virginia, Department of Computer Science
CS200: Computer Science, Spring 2004

Notes: Monday 5 April 2004
Schedule

Notes
Universal Turing Machine

A Turing Machine that can simulate any other Turing Machine on an input: TMU (P, I) = the output of running TM-P on input I

What is a calculus?






What properties make Scheme too complex to be a good model of computation?







Lambda Calculus is a set of rules for manipulating symbols. They can be given meanings that map well to computation.

Lambda Calculus Term Grammar

term ::= variable
term ::= term term
term ::= ( term )
term ::= λ variable . term

Rules

Alpha Reduction: (renaming variables)
λ y . Mα λ v . M [y |→ v]) where v does not occur in M.
We can change the name of a lambda variable by replacing all occurances of the variable in the body term with a new name that does not appear in the body term.

Beta Reduction: (substitution)

x . M) Nβ M [ x |→ N ]
All computation can be modeled using Beta Reduction!
Uninteresting Reduction Rules

MM
PMPN if MN
MPNP if MN
λ x . M → λ x . N → if MN
M → P if MN and N → P

Identity and Composition

I ≡ λ x . x
C ≡ λ x .y . yx)

CII = (λx.(λy. yx)) (λx.x) (λx.x)
      →β







Example

λ f . ((λ x . f (xx)) (λ x . f (xx)))












cs200-staff@cs.virginia.edu
Using these Materials