- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

# Practice Set for Recurrence Relations

**Recurrence relations** are equations that recursively defines a multidimensional array.

Here we will solve so questions based on recurrence relations.

Solve the recurrence reation:T(n) = 12T(n/2) + 9n^{2}+ 2. T(n) = 12T(n/2) + 9n^{2}+ 2. Here, a = 12 and b = 2 and f(n) = 9(n)^{2}+ 2 It is of the form f(n) = O(n^c), where c = 2

This form its in the master’s theorem condition,

So, logb(a) = log2(12) = 3.58 Using case 1 of the masters theorm, T(n) = θ(n^{3.58}).

Solve the recurrence reation:T(n) = 5T(n/2 + 23) + 5n^{2}+ 7n - 5/3. T(n) = 5T(n/2 + 23) + 5n^{2}+ 7n - 5/3

On simplification, in case of large values, n,n/2 >> 23, so 23 is neglected.

T(n) = 5T(n/2) + 5n^{2}+ 7n - 5/3. Further, we can take 5n2 + 7n - 5 ≃0(n^{2}). So, T(n) = 5T(n/2) + O(n^{2})

This fall under the case 2 of masters theorem,

So, T(n) = O(n^{2}).

Check if the following comes under any case of a master’s theorem.

T(n) = 2T(n/3) + 5^{n}

No, For masters theorem to be applied, the function should be a polynomial function.

T(n) = 2T(n/5) + tan(n)

No, trignometric function do not come under masters theorem.

T(n) = 5T(n+1) + log(n)

No, Logarithmic function do not come under masters theorem.

T(n) = T(n-7) + e^{n}

No, exponential function do not come under masters theorem.

T(n) = 9n(n/2+1 ) + 4(n^{2}) - 17 Yes, as solved above.

- Related Questions & Answers
- Relations of a Set
- Explain Set relations and operations in TOC?
- Types of Relations
- C++ Program to Compute Combinations using Recurrence Relation for nCr
- Find the Number of Reflexive Relations on a Set using C++
- Best practice for variable and method naming in Java
- Recurrence Equations in Data Structure
- Best practice to wait for a change with Selenium Webdriver?
- Representation of Relations using Graph
- How to implement backtracking for a climbing stairs practice in JavaScript?
- What are Precedence Relations in Operator Grammar?
- Practice questions on Strings in C++
- Practice questions on Arrays in C++
- What is the way to practice verbal ability for SSC Bank PO examination?
- Find nth term of a given recurrence relation in Python

Advertisements