Need help with just one question pls. The table below shows the values of f(n) for different values of n. n 1 2 3 4 5 6 f(n) 1 2 2 4 8 32 Which recursive function best represents the values shown in the table? A: f(1) = 1, f(2) = 2, f(n) = f(n -1) f(n - 2); n > 2 B: f(1) = 1, f(2) = 2, f(n) = f(n -1) + f(n - 2); n > 2 C:f(1) = 1, f(2) = 2, f(n) = f(n -3) + f(n - 2); n > 2 D: f(1) = 1, f(2) = 2, f(n) = f(n -3) f(n - 2); n > 2
it looks like each value for f(n) is the product of the two previous entries f(n-1) * f(n-2)
So what is the answer? Sorry I just kinda need it right now the test is due today.
The first entry is f(1)=1, the second f(2)=2, that covers n=1 and n=2. The third is the product of the previous 2 entries. f(n)=f(n-1)*f(n-2) , for n>2
Thanks!
welcome
Join our real-time social learning platform and learn together with your friends!