Determine whether each of these proposed definitions is a va

Determine whether each of these proposed definitions is a valid recursive definition of a function f from the set of nonnegative integers to the set of integers. If f is well defined, find a formula for f (n) when n is a nonnegative

integerandprovethatyourformulaisvalid.

a) f(0)=1,f(n)=f(n1)forn1

b) f(0)=1, f(1)=0, f(2)=2, f(n)=2f(n3)

for n 3

c) f(0)=0,f(1)=1,f(n)=2f(n+1)forn2

d) f(0)=0,f(1)=1,f(n)=2f(n1)forn1

e) f(0)=2,f(n)=f(n1)ifnisoddandn1and f (n) = 2f (n 2) if n 2

Solution

a)f(0)=2
for any n we should start with 1.means i=1 to n;here condition n greaterthan equal to 1 so,
let n=2;
f(1)=-f(2-1)
f(1)=-f(1)
f(1)=-1.
-1>eqaul to 1
here the give options are showing condition less than given number, so start from ofter given number.follow the same steps solved above.

Determine whether each of these proposed definitions is a valid recursive definition of a function f from the set of nonnegative integers to the set of integers

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site