Recurrence Relation for time complexity

A recurrence is an equation or inequality that describes a function in terms of its values on smaller inputs, or A recurrence is a recursive description of a function. To solve a Recurrence Relation means to obtain a function defined on the natural numbers that satisfy the recurrence. 

Decreasing Recurrence Relation Functions

1. (T(n)= T(n-1) + 1) = O(n)

2. (T(n)= T(n-1) + n) = O(n^2)

3. (T(n)= T(n-1) + log n) = O(nlogn)

4. T(n)=2 T(n-1)+1 = O(2^n)

5. Masters Theorem Decreasing Function

Dividing Recurrence Relation Functions

1. T(n)=T(n/2)+1 = O(logn)

2. T(n)=T(n/2)+ n = O(n)

3. T(n)= 2T(n/2) +n = O(nlogn)

4. Masters Theorem in Algorithms for Dividing Function

Root Recurrence Relation Functions

Comments

Popular posts from this blog

gsutil Vs Storage Transfer Service Vs Transfer Appliance

SQL basic interview question