Given the following definition, compute Q(5). Q(n) = 0 if n = 0 1 if n = 1 3 if n = 2 Q(n − 1) + Q(n − 2) + Q(n − 3) if n > 2 Q(5) =
i got it..i asked this one before lol
ok,
actually one of the numbers is diff. its a 3 instead of 2..
is the answer still 11?
oh, got what you mean, you mean \[Q_n = Q_{n-1}+ Q_{n-2}+Q_{n-3}\] if n >2
so, \[Q_4 = Q_3+Q_2+Q_1= 3\] and \[Q_5 = Q_4+Q_3+Q_2= 7\] but it is really elementary step, love, It is not our level. In discrete math, you have to find out the general form first, cannot take step lke that, right?
since the value of each know q is its index ... that makes it simpler even q5 = ((q2+q1+q0)+q2+q1)+(q2+q1+q0)+q2 q5 = 2+1+0+2+1+2+1+0+2 ??
oops,
oh got it its 15! :) i just replaced the 2s with 3s
thanks!
no no, I don't get what you mean, how?
q5 = 3+1+0+3+1+3+1+0+3
@e.mccormick
why did she get that formula,friend?
She is showing the totality of it. Because \(Q_5=Q_4+Q_3+Q_2\) but \(Q_4=Q_3+Q_2+Q_1\) and \(Q_3=Q_2+Q_1+Q_0\) therefore \(Q_5=(Q_3+Q_2+Q_1)+(Q_2+Q_1+Q_0)+Q_2\)
Yeah, got it, thank you.
=) Have fun!
ok XD
Join our real-time social learning platform and learn together with your friends!