Explanation:
For the first recurrence relation, we have:
T(n) = 4T(3n) + 5n^2 - 2n + 2
Here, a = 4, b = 3, f(n) = 5n^2 - 2n + 2
Now, logb(a) = log3(4) ≈ 1.26
Since f(n) = Θ(n^2), we have c = 2
Therefore, by the Master Theorem, the complexity class of the recurrence relation is T(n) = Θ(n^2 log n).
For the second recurrence relation, we have:
T(n) = 8T(2n) + 7n^3 - 5
Here, a = 8, b = 2, f(n) = 7n^3 - 5
Now, logb(a) = log2(8) = 3
Since f(n) = Θ(n^3), we have c = 3
Therefore, by the Master Theorem, the complexity class of the recurrence relation is T(n) = Θ(n^3 log n).
For the third recurrence relation, we have:
T(n) = 5T(2n) + 5n^2 + 7
Here, a = 5, b = 2, f(n) = 5n^2 + 7
Now, logb(a) = log2(5) ≈ 2.32
Since f(n) = Θ(n^2), we have c = 2
Therefore, by the Master Theorem, the complexity class of the recurrence relation is T(n) = Θ(n^2 log n).