Choose all of the correct recursive definitions of the facto

Choose all of the correct recursive definitions of the factorial function:

check all that apply, I have checked one which I belive is correct but im not sure about the rest. Any help would be appriciated, Thanks in advance

Choose all of the correct recursive definitions of the factorial function: f(n)=n!, n=0, 1, 2, f(0) = 0, Kn) = n·f(n-1), n=1,2, Kn) = n·f(n-1), n=1,2, f(n) = n·Kn-1), n=0,1,2, Kn) = i, n =0, 1, 2,

Solution

Option I is wrong since f(0) is not 1.

-----------------------------

f(0) = 1

and f(n) = n (n-1)! = n f(n-1)

Hence option II is right.

-----------------------------

Option III is not right as for n =0

f(0) not equals f(0-1) = f(-1) as for negative number no factorial

-------------------------------

Option iv is not right

as i varies from 1 to n hence n should be atleast 1. n cannot be 0

So wrong

Choose all of the correct recursive definitions of the factorial function: check all that apply, I have checked one which I belive is correct but im not sure ab

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site