I think it should be c.

The Gateway to Computer Science Excellence

+1 vote

The solution for the recurrence:

T(1)=1

T(n) = T(n-1) + T(n-2) + 1

a. log(n) <= T(n)=n

b. n<=T(n)<=n^{2}

c. n^{2 }<= T(n)<= 2^{n}

d. 2^{n} <= T(n) <=n!

0

fibonacci recurrence, will be O(2^n) ,multiple times you will be calling same problem again and again.

+1

the recurrence is that which generates fibonacci sequences,it is just that it calculates same subproblem many no of times that is why its complexity is exponential(just a thought which came in as I was reading dynamic programming,maybe you know this already....:)) ..you can draw a recursion tree to see why it happens so.

- All categories
- General Aptitude 1.9k
- Engineering Mathematics 7.5k
- Digital Logic 2.9k
- Programming and DS 4.9k
- Algorithms 4.4k
- Theory of Computation 6.2k
- Compiler Design 2.1k
- Databases 4.1k
- CO and Architecture 3.4k
- Computer Networks 4.2k
- Non GATE 1.4k
- Others 1.4k
- Admissions 595
- Exam Queries 573
- Tier 1 Placement Questions 23
- Job Queries 72
- Projects 18

50,737 questions

57,365 answers

198,495 comments

105,263 users