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.
1 votes 1 votes GIVEN THAT h(0)=k; h(1)=1; h(m)=2h(m−1)+4h(m−2),if m≥2 h(m-1)=2h(m−2)+4h(m−3) h(m-2)=2h(m−3)+4h(m−4) now putting the value of h(m-1) &h(m-2) in h(m) we got h(m) = 2(2h(m−2)+4h(m−3)) +4(2h(m−3)+4h(m−4)) =>4h(m−2)+16h(m−3)+16h(m−4) =>4(2h(m−3)+4h(m−4))+16h(m−3)+16h(m−4) h(m)=24h(m−3)+32h(m−4) therefore h(4)=24h(1)+32(k) => 88=24(1)+32k (h(4)=88 given) => 32k=64 => k=2 (answer) Raushan0502 answered Aug 7, 2020 Raushan0502 comment Share Follow See all 0 reply Please log in or register to add a comment.