Open In App

UGC-NET | UGC NET CS 2017 Jan – III | Question 24

A recursive function h is defined as follows :

h(m) = k, if m = 0
     = 1, if m = 1
     = 2 h(m – 1) + 4h(m – 2), if m ≥ 2

If the value of h(4) is 88 then the value of k is :



(A)

0



(B)

1

(C)

2

(D)

-1

Answer: (C)
Explanation:

According to given question:

     h(4) = 88
       88 = 2 h(3) + 4 h(2)
          = 2 [2 h(2) + 4 h(1)] + 4 h(2)
          = 8 h(2) + 8 h(1)
          = 8 (2 + 4 k) + 8
          = 24 + 32 k
 i.e.   k = 2

So, option (C) is correct.

Quiz of this Question
Please comment below if you find anything wrong in the above post

Article Tags :