![]() |
VOOZH | about |
A recurrence relation is an equation that expresses each term of a sequence as a function of its preceding terms. In other words, it defines a sequence where each term depends on one or more of its previous terms. Recurrence relations commonly arise in divide-and-conquer algorithms, dynamic programming, and combinatorial problems.
Below are practice problems with solutions on recurrence relation.
Solve the following recurrence relation?
7T(n/2)+3n2+2
Options:
(a) O(n2.8)
(b) O(n3)
(c) θ(n2.8)
(d) θ(n3)
Correct answers: (a), (b), and (c)
Explanation:
Sort the following functions in decreasing order of their asymptotic (big-O) complexity:
Options:
(a) f2 > f4 > f1 > f3
(b) f2 > f4 > f3 > f1
(c) f1 > f2 > f3 > f4
(d) f2 > f1 > f4 > f3
Correct answer: (b) f2 > f4 > f3 > f1
Explanation:
Given: f(n)=22n, which of the following correctly represents f(n)?
Options:
(a) O(2n)
(b) Ω(2n)
(c) Θ(2n)
(d) None of these
Correct answer: (b) Ω(2n)
Explanation:
Master’s theorem can be applied on which of the following recurrence relations?
Options:
(a) T(n) = 2T(n/2) + 2n
(b) T(n) = 2T(n/3) + sin(n)
(c) T(n) = T(n − 2) + 2n2 + 1
(d) None of these
Correct answer: (d) None of these
Explanation:
Given: T(n) = 3T(n/2 +47) + 2n2 + 10n − 1/2
What is the order of T(n)?
Options:
(a) O(n2)
(b) O(n3/2)
(c) O(nlogn)
(d) None of these
Correct answer: (a) O(n2)
Explanation:
Read in detail about Recurrence Relation here.