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 4 16 128 4096 Which recursive function best represents the values shown in the table? f(1) = 1, f(2) = 2, f(n) = f(n -3) + f(n - 2); n > 2 f(1) = 1, f(2) = 2, f(n) = f(n -3) f(n - 2); n > 2 f(1) = 1, f(2) = 2, f(n) = 2f(n -1) + f(n - 2); n > 2 f(1) = 1, f(2) = 2, f(n) = 2f(n -1) f(n - 2); n > 2
@amistre64
what do we know about a recursive function ... what does it tell us?
notice that all the options differ only by the function rule that they state. so the rest of it is eye clutter. which rule defines the sequence?
I'm not sure. :/
tell me whats confusing you about the function rules ...
I just dont know what to do to see if the values match up with the functions.
f(n) = f(n -3) + f(n - 2) notice that there are 3 terms to deal with, and the rule for this one is just saying that the new terms is the sum of the 2 before it f(n) = f(n -3) f(n - 2), and this one is saying its the product of the 2 terms before it the rest are read in similar mathical nomenclatures
one minor thing to note is that there is no f(0), so having some f(n-3) for n=3 is simply undefined and cannot be worked out. so those first 2 options are errors just by default.
f(n) = 2f(n -1) + f(n - 2), let n=3 f(3) = 2f(3-1) + f(3 - 2) f(3) = 2f(2) + f(1) 4 = 2(2) + 1 ... is not right either so work the rule for the last option to verify
Do I plug in 3 for n like you did?
id hope so lol
for n>2 means that n=3,4,5,6,...
so testing it out for n=3 at lest lets us know its good for n=3
Thanks! :) The last one is definitely the correct answer.
Join our real-time social learning platform and learn together with your friends!