1 votes 1 votes A recursive function $h$, is defined as follows: $\begin{array} {} h(m) & =k, \text{if } m=0 \\ &=1, \text{if } m=1 \\ &= 2 h(m-1)+4h(m-2), \text{if } m \geq 2 \end{array}$ If the value of $h(4)$ is $88$ then the value of $k$ is: $0$ $1$ $2$ $-1$ DS ugcnetcse-jan2017-paper3 data-structures recursion + – go_editor asked Mar 24, 2020 • recategorized May 24, 2020 go_editor 1.9k views answer comment Share Follow See 1 comment See all 1 1 comment reply sourav. commented Oct 9, 2017 reply Follow Share https://gateoverflow.in/113801/ugcnet-dec2016-iii-24 0 votes 0 votes Please log in or register to add a comment.
5 votes 5 votes given that h(m)=k, if m=0 = 1, if m=1 = 2h(m-1) + 4h(m-2), if m≥2 If the value of h(4) is 88 then the value of k is h(4)=2h(3)+4h(2)=2(2h(2)+4h(1))+4h(2) =8h(2)+8h(1)=8(2h(1)+4h(0))+8h(1)=24h(1)+32h(0)=24+32k=88=>k=2 hence ans is option 3 Sanjay Sharma answered Jan 28, 2017 Sanjay Sharma comment Share Follow See all 0 reply Please log in or register to add a comment.
4 votes 4 votes h(2)=2h(1)+4h(0) =2+4k h(3)= 2h(2)+4h(1) = 4+8k+4 = 8+8k h(4)= 2h(3)+4h(2) = 16+16k+8+16k= 32k+24 =88 32k=64 k=2 sh!va answered Jan 31, 2017 sh!va comment Share Follow See all 0 reply Please log in or register to add a comment.
2 votes 2 votes h(0)=k h(1)=1 h(2)=2h(1)+4h(0) =2+4k h(3) =2h(2)+4h(1) =4+8k+4 = 8+8k Therefore, h(4)=32k+24 =88 k=2 (Answer) Avinash31 answered Jun 28, 2020 Avinash31 comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes Upon solving the recurrence we get 32k + 24 = 88 k = 64/32 k=2 (Answer) AkashChandraGupta answered Aug 6, 2020 AkashChandraGupta comment Share Follow See all 0 reply Please log in or register to add a comment.