This is a Discrtete Math Question Given the following defini

This is a Discrtete Math Question

Given the following definition, compute Q(5).

Q(n) =

Q(5) =

\"Image
This is a Discrtete Math Question Given the following definition, compute Q(5). Q(n) = { 0 if n = 0 2 if n = 1 3 if n = 2 Q(n ? 1) +Q(n ? 2) +Q(n ? 3) if n > 2 Q(5) =

Solution

Q(0) =0

Q(1) = 2

Q(2) = 3 are given

Q(n) = Q(n-1)+Q(n-2)+Q(n-3) if n >2

Let us find Q(3) first

Q(3) = Q(3-1)+Q(3-2)+Q(3-3) = 5

Q(4) = Q(4-1)+Q(4-2)+Q(4-3)=5+3+2 =10

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

Using Q(3) =5, Q(4) = 10 and Q(2) = 3 we find Q(5) as

Q(5) = Q(5-1)+Q(5-2)+Q(5-3)

= 10+5+3 =18

Hence answer is 18

This is a Discrtete Math Question Given the following definition, compute Q(5). Q(n) = Q(5) = This is a Discrtete Math Question Given the following definition,

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site