Consider the function F(n) for which the pseudo code is given below: Function…
PYQ GATE 1992
Consider the function F(n) for which the pseudo code is given below:
Function F(n)
begin
F1 ← 1
if(n=1) then F ← 3
else For i = 1 to n do
begin
C ← 0
For j = 1 to F(n − 1) do
begin C ← C + 1 end
F1 = F1 * C
end
F = F1
end[n is a positive integer greater than zero]
(a) Derive a recurrence relation for F(n)
(b) Solve the recurrence relation for a closed form solutions of F(n).
Sign up free to check your answer
Sign up freeLoading lesson…

