COMPUTABILITY THEORY 5 COMPUTABILITY THEORY 5 COMPUTABILITY THEORY

COMPUTABILITY THEORY

5. COMPUTABILITY THEORY

5. COMPUTABILITY THEORY CONT’D

5. 1 PRIMITIVE RECURSIVE FUNCTIONS - Primitive R. F built from a small collection of base functions through 2 simple mechanisms (that can produce new functions from known ones) Generalized function composition. - “Primitive recursion” = a limited type of recursive (inductive) definition. Note = most of the functions we encounter are primitive recursive. -

5. 1. 1 DEFINING PRIMITIVE RECURSIVE FUNCTIONS

5. 1. 1 DEFINING PRIMITIVE RECURSIVE FUNCTIONS CONT’D The term: primitive recursive functions – can denote either a mathematical function or - a program for that function. - The choice of base functions is somewhat arbitrary, but we need: basic arithmetic - handle functions with several arguments - Zero & Succ functions: given a foundation for natural numbers, we need a way to create arbitrary natural numbers through a − − Composition of these functions and also Logical test

5. 1. 1 DEFINING PRIMITIVE RECURSIVE FUNCTIONS CONT’D Þ We define 2 mechanisms to combine primitive recursive functions to produce more primitive recursive functions. - generalized composition - a type of recursion (gives testing capability and is also a standard programming tool) -> we limit the form this type of recursion can take. to ensure that the result is easily computable.

5. 1. 1 DEFINING PRIMITIVE RECURSIVE FUNCTIONS CONT’D

5. 1. 1 DEFINING PRIMITIVE RECURSIVE FUNCTIONS CONT’D for n > 1

5. 1. 1 DEFINING PRIMITIVE RECURSIVE FUNCTIONS CONT’D

5. 1. 1 DEFINING PRIMITIVE RECURSIVE FUNCTIONS CONT’D

5. 1. 1 DEFINING PRIMITIVE RECURSIVE FUNCTIONS CONT’D

5. 1. 1 DEFINING PRIMITIVE RECURSIVE FUNCTIONS CONT’D

5. 1. 1 DEFINING PRIMITIVE RECURSIVE FUNCTIONS CONT’D are primitive recursive.

5. 1. 1 DEFINING PRIMITIVE RECURSIVE FUNCTIONS CONT’D

5. 1. 1 DEFINING PRIMITIVE RECURSIVE FUNCTIONS CONT’D
- Slides: 16