Computation, Computers, and Programs Recursive functions - PowerPoint PPT Presentation

1 / 29
About This Presentation
Title:

Computation, Computers, and Programs Recursive functions

Description:

Computation, Computers, and Programs Recursive functions. http://www.cs.caltech.edu/courses/cs20/a ... However, does not include all recursive computations ... – PowerPoint PPT presentation

Number of Views:42
Avg rating:3.0/5.0
Slides: 30
Provided by: csCal
Category:

less

Transcript and Presenter's Notes

Title: Computation, Computers, and Programs Recursive functions


1
CS20a Models (Nov 5, 2002)
  • Turing Machines
  • Churchs thesis TM are a general model of
    computation
  • But (almost) everything is undecidable
  • Today alternative models
  • Primitive recursive functions
  • Total recursive functions
  • Partial recursive functions

2
Primitive recursion
3
Primitive recursion (conventional form)
4
Arithmetic
5
Exponentiation
6
Hyper-exponentation
7
Ackermans function
8
Subtraction
9
Equality
10
For-programs
11
For-loop for y do p done
12
Interpretation of for-programs
  • Some variables variables are designated as input
  • Some are designated as output
  • The program defines a function Ninput ? Noutput

13
For programs and primitive recursion
14
Encoding p.r. functions as for-loops
15
Encoding for-loops as p.r. functions
16
Partial-recursive functions
17
Properties of p.r. programs
  • The programs always terminate
  • However, does not include all recursive
    computations
  • Can code extremely large functions, but some
    functions are not definable (Ackermans)
  • Well argue later that all tractable computations
    are primitive recursive

18
Partial recursive functions (Godel)
  • To capture r.e. computations, we need more
  • A partial recursive computation includes the
    prim-rec computations, plus unbounded minimization

19
Unbounded minimization
20
While-programs
21
Enumerating the partial-recursive funs
22
Indexing partial recursive funs
23
Universal functions
24
Godel numbering
25
Composition
26
Constant functions
27
Recursion theorem
28
Recursion theorem proof (cont.)
29
Rices theorem
Write a Comment
User Comments (0)
About PowerShow.com