Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I have included the slides also for help. Question 1: For each of the following functions, show that it is primitive recursive. Use a relaxed

I have included the slides also for help. image text in transcribed
image text in transcribed
Question 1: For each of the following functions, show that it is primitive recursive. Use a "relaxed" mathematical argument such as we did starting on slide 7 on February 26. You do not have to provide a precise proof as we did on the earlier slides, but you can if you like. In your arguments, you can use any functions that we have already shown in class to be primitive recursive without having to prove it again. (a) ged(xi, x2) (greatest common divisor; let us define that gcd(0, 0) 0) (b) -V (c) R,")-min(Here, min returns the smaller of its two inputs). (d) k(nz) s the number of twin primes whose smaller twin is greater than x, and less than X2. Twin primes are pairs of primes whose difference is two. For example, (3, 5) and (1, 13) are twin primes Example 3: h(x)-x! Here are the recursion equations: h(0) 1 h(t+1) h(t) s(t) This can be rewritten as: h(0) (n(t) h(t+1) g(t, h(t) where g(x1, x2) = s(x10 x2 , which can be written as: g(xl, x2) s(ul2(xl, x2)) u22(x1, x2). Multiplication is already known to be primitive recursive. Therefore. h(x) -x! is primitive recursive. Lecture 7: Primative Recunive Functions Some Primitive Recursive Functions In the following examples, we just show the recursive mechanism without developing the precise form of the recursion equations. Example 4: xy The recursion equations are: Febnuary 26, 2019Theery of Lecture 7: Primitive Recursive Punctions I Some Primitive Recursive Functions Example 5: The predecessor function p(x) It is defined as follows: p(x)= x-l if X 0 ifx=0 The recursion equations are: p(0) =0 Question 1: For each of the following functions, show that it is primitive recursive. Use a "relaxed" mathematical argument such as we did starting on slide 7 on February 26. You do not have to provide a precise proof as we did on the earlier slides, but you can if you like. In your arguments, you can use any functions that we have already shown in class to be primitive recursive without having to prove it again. (a) ged(xi, x2) (greatest common divisor; let us define that gcd(0, 0) 0) (b) -V (c) R,")-min(Here, min returns the smaller of its two inputs). (d) k(nz) s the number of twin primes whose smaller twin is greater than x, and less than X2. Twin primes are pairs of primes whose difference is two. For example, (3, 5) and (1, 13) are twin primes Example 3: h(x)-x! Here are the recursion equations: h(0) 1 h(t+1) h(t) s(t) This can be rewritten as: h(0) (n(t) h(t+1) g(t, h(t) where g(x1, x2) = s(x10 x2 , which can be written as: g(xl, x2) s(ul2(xl, x2)) u22(x1, x2). Multiplication is already known to be primitive recursive. Therefore. h(x) -x! is primitive recursive. Lecture 7: Primative Recunive Functions Some Primitive Recursive Functions In the following examples, we just show the recursive mechanism without developing the precise form of the recursion equations. Example 4: xy The recursion equations are: Febnuary 26, 2019Theery of Lecture 7: Primitive Recursive Punctions I Some Primitive Recursive Functions Example 5: The predecessor function p(x) It is defined as follows: p(x)= x-l if X 0 ifx=0 The recursion equations are: p(0) =0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Experts Guide To SQL

Authors: Frank Lusardi

1st Edition

0070390029, 978-0070390027

More Books

Students also viewed these Databases questions

Question

What does it mean to give legal advice?

Answered: 1 week ago

Question

differentiate the function ( x + 1 ) / ( x ^ 3 + x - 6 )

Answered: 1 week ago

Question

Describe the job youd like to be doing five years from now.

Answered: 1 week ago

Question

So what disadvantages have you witnessed? (specific)

Answered: 1 week ago