270K - views

# Partial Recursive Functions Computation Theory L Aim Amoreabstractmachineindependentdescriptionofthe collection of computable partial functions than provided by registerTuring machines they form

## Partial Recursive Functions Computation Theory L Aim Amoreabstractmachineindependentdescriptionofthe collection of computable partial functions than provided by registerTuring machines they form

Download Pdf - The PPT/PDF document "Partial Recursive Functions Computation ..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.

## Presentation on theme: "Partial Recursive Functions Computation Theory L Aim Amoreabstractmachineindependentdescriptionofthe collection of computable partial functions than provided by registerTuring machines they form"â€” Presentation transcript:

Page 1
Partial Recursive Functions Computation Theory , L 8 101/171
Page 2
Aim Amoreabstract,machine-independentdescriptionofthe collection of computable partial functions than provided by register/Turing machines: they form the smallest collection of partial functions containing some basic functions and closed under some fundamental operations for forming new functions from old—composition, primitive recursion and minimization The characterization is due to Kleene (1936), building on work of Gdel and Herbrand. Computation Theory , L 8 102/171
Page 3
Examples of recursive deﬁnitions )+( )= sum of 0,1,2,..., Computation Theory , L 8 103/169
Page 4
Examples of recursive deﬁnitions )+( )= sum of 0,1,2,..., )+ )= th Fibonacci number Computation Theory , L 8 103/169
Page 5
Examples of recursive deﬁnitions )+( )= sum of 0,1,2,..., )+ )= th Fibonacci number )+ undeﬁned except when Computation Theory , L 8 103/169
Page 6
Examples of recursive deﬁnitions )+( )= sum of 0,1,2,..., )+ )= th Fibonacci number )+ undeﬁned except when if x 100 then x 10 else f 11 )) is McCarthy’s "91 function", which maps to 91 if 100 and to 10 otherwise Computation Theory , L 8 103/169
Page 7
Primitive recursion Theorem. Given and there is a unique satisfying ,0 )) for all and We write for and call it the partial function deﬁned by primitive recursion from and Computation Theory , L 8 104/171
Page 8
Primitive recursion Theorem. Given and there is a unique satisfying ,0 )) for all and Proof (sketch). Existence :theset ,..., )= )= deﬁnes a partial function satisfying Uniqueness : if and both satisfy , then one can prove by induction on that )= )) Computation Theory , L 8 105/171
Page 9
Page 10
Example: predecessor Predecessor pred satisﬁes: pred pred So pred where () Thus pred can be built up from basic functions using primitive recursion: pred zero proj Computation Theory , L 8 107/171
Page 11
Example: multiplication Multiplication mult satisﬁes: mult ,0 mult mult )+ and thus mult zero add proj proj )) So mult can be built up from basic functions using composition and primitive recursion (since add can be). Computation Theory , L 8 108/170
Page 12
Deﬁnition. A[partial]function is primitive recursive PRIM )ifitcanbebuiltupinﬁnitelymanysteps from the basic functions by use of the operations of composition and primitive recursion. In other words, the set PRIM of primitive recursive functions is the smallest set (with respect to subset inclusion) of partial functions containing the basic functions and closed under the operations of composition and primitive recursion. Computation Theory , L 8 109/171
Page 13
Deﬁnition. [partial] function is primitive recursive PRIM )ifitcanbebuiltupinﬁnitelymanysteps from the basic functions by use of the operations of composition and primitive recursion. Every PRIM is a total function, because: all the basic functions are total if ,..., are total, then so is ,..., [why?] if and are total, then so is [why?] Computation Theory , L 8 110/171
Page 14
Deﬁnition. A[partial]function is primitive recursive PRIM )ifitcanbebuiltupinﬁnitelymanysteps from the basic functions by use of the operations of composition and primitive recursion. Theorem. Every PRIM is computable. Proof. Already proved: basic functions are computable; composition preserves computability. So just have to show: computable if and are. Suppose and are computed by RM programs and (with our usual I/O conventions). Then the RM speciﬁed on the next slide computes .(Weassume ,..., are some registers not mentioned in and ; and that the latter only use registers ,..., , where .) Computation Theory , L 8 111/171
Page 15
START ,..., :: =( ,..., ,0 yes no HALT ,..., :: =( ,..., ,..., :: =( 0,0,...,0 Computation Theory , L 8 112/170
Page 16
START ,..., :: =( ,..., ,0 yes no HALT ,..., :: =( ,..., ,..., :: =( 0,0,...,0 Computation Theory , L 8 112/170
Page 17
Aim Amoreabstract,machine-independentdescriptionofthe collection of computable partial functions than provided by register/Turing machines: they form the smallest collection of partial functions containing some basic functions and closed under some fundamental operations for forming new functions from old—composition, primitive recursion and minimization The characterization is due to Kleene (1936), building on work of Gdel and Herbrand. Computation Theory , L 9 113/171
Page 18
Minimization Given a partial function ,deﬁne by least such that )= and for each 0,..., is deﬁned and (undeﬁned if there is no such In other words ,..., )= Computation Theory , L 9 114/171
Page 19
Example of minimization integer part of least such that (undeﬁned if Computation Theory , L 9 115/171
Page 20
Example of minimization integer part of least such that (undeﬁned if where is if if Computation Theory , L 9 115/170
Page 21
Deﬁnition. Apartialfunction is partial recursive PR )ifitcanbebuiltupinﬁnitelymanysteps from the basic functions by use of the operations of composition, primitive recursion and minimization. In other words, the set PR of partial recursive functions is the smallest set (with respect to subset inclusion) of partial functions containing the basic functions and closed under the operations of composition, primitive recursion and minimization. Computation Theory , L 9 116/171
Page 22
Deﬁnition. Apartialfunction is partial recursive PR )ifitcanbebuiltupinﬁnitelymanysteps from the basic functions by use of the operations of composition, primitive recursion and minimization. Theorem. Every PR is computable. Proof. Just have to show: is computable if is. Suppose is computed by RM program (with our usual I/O conventions). Then the RM speciﬁed on the next slide computes .(Weassume ,..., are some registers not mentioned in ; and that the latter only uses registers ,..., , where .) Computation Theory , L 9 117/171
Page 23
START ,..., :: =( ,..., ,..., :: =( ,..., ,..., :: =( 0,0,...,0 :: HALT Computation Theory , L 9 118/171
Page 24
START ,..., :: =( ,..., ,..., :: =( ,..., ,..., :: =( 0,0,...,0 :: HALT Computation Theory , L 9 118/171