f(X)= 2X-1 + f(X-1) if X is not equal to zeroandiff(X=0)=0, If f(X)= f(X-1)+f(X-2) for X>1 then X= ?



f(X)= 2X-1 + f(X-1) if X is not equal to zeroandiff(X=0)=0, If f(X)= f(X-1)+f(X-2) for X>1 then X..

Answer / Dhiraj Singh Garbyal

This question involves two different recurrence relations. For X > 1, the given relation is f(X) = f(X-1) + f(X-2). We can rewrite this as f(X-1) = f(X) - f(X-2), and then we can use the initial relation (f(X)= 2X-1 if X is not equal to zero and diff(X=0)=0) to find out the value of f(X-2). However, this requires solving a recursion which doesn't have an explicit solution.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More General Aptitude Interview Questions

Two trains at speed 60 km/hr come in the opposite direction. At a particular time the distance between the two trains is 18km. A shuttle flies between the trains at the speed of 80 km/hr. At the time the two trains crashes what is the distance traveled by shuttle?

1 Answers   Accenture,


1,2,3,4,5,6,7,8,9 station. route between any 2 station is there only if the 2 digit nob. is divisible by 3. e.g. route exist between 1 to 2 because 12 is divisible by 3 how many station have routes to 8 either direct or indirect

1 Answers   Infosys,


OUT OF 111 MARBLES ONE IS NOT OF SAME WEIGHT. HOW TO FIND AND GIVE THE MIN. NO OF STEPS

3 Answers   Satyam,


23*2

1 Answers  


Pointing to Meena, Swarup says, ?She is the doughter of my grandfather?s only child?. How is Meena related to Swarup? (a) Cousin (b) Sister (c) Aunt (d) Data inadequate (e) None of these

4 Answers  


Ajay and Vijay ave their salaries in the ratio of 2:3. If each of their salaries are increased by Rs 4000, the new ration comes to be 40:57. How much is the present salary of Vijay?

1 Answers   CGI,


what sort of questions may be asked

0 Answers   ICICI,


I want some Aptitude Test Questions.Let me know the answer please.

1 Answers   PreludeSys,


the squre of 225?

3 Answers   Banking,


In the following questions mark: 1, if the question can be answered with the help of statement I alone. 2, if the question can be answered with the help of statement II alone. 3, if the question can be answered with the help of both I and II. 4, if the question cannot be answered at all. Ram and Shyam are having a competition on eating bananas. If both start eating simultaneously, who will first finish eating 12 bananas? Statement I: Ram eats 12 bananas in 7.5 minutes. Statement II: Shyam takes a break of 12 seconds after eating every two bananas. Choice a. 1 b. 2 c. 3 d. 4 a and b are integers. What is the value of b? Statement I: a = b2 Statement II: ab = 27 Choice a. 1 b. 2 c. 3 d. 4 Is X = 3? Statement I: X is the solution of X2 – 3X = 0. Statement II: X is the solution of X2 – 2X = 3. Choice a. 1 b. 2 c. 3 d. 4 What is the total profit on the sale of seven dozen oranges? Statement I: The oranges were bought at Rs.15 per dozen and sold at Rs.6 for four pieces. Statement II: The mark-up on oranges is 20%. Choice a. 1 b. 2 c. 3 d. 4 What is the distance between Mumbai and Bangalore? Statement I: Mumbai is 500 kilometers from Goa. Statement II: Goa is 1000 kilometers from Bangalore. Choice a. 1 b. 2 c. 3 d. 4

3 Answers   Infosys,


5+3+2=151012 9+2+4=183662 5+4+5=202504 7+2+5=?

4 Answers   Span Infotech, TCS,


Convert the expression ((A + B) * C - (D - E) ^ (F + G)) to equivalent Prefix and Postfix notations.

3 Answers   Apalya Technologies,


Categories