This is a great spot to use the Master Theorem.
In the first recurrence, T(n) = 7T(n/2) + n2, the Master Theorem, says that
- a = 7
- b = 2
- d = 2
Since logb a = log2 7 is greater than d = 2, the recurrence solves to T(n) = Θ(nlog27).
Now, let's look at T'(n). Here, we have a unknown, b = 4, and d = 2. If we have the following conditions holding true:
- log4a > 2, and
- log4a < log2 7
Then the Master Theorem says that T'(n) = Θ(nlog4a) = o(nlog27) and we're done. So we need to solve for a.
Doing this gives
log4a < log2 7
log2a / log2 4 < log2 7 (using the change of base formula for logs)
log2 a / 2 < log2 7
log2 a < 2 log 2 7
log2 a < log2 72 (using the power rule for logs)
log2 a < log2 49
a < 49
Therefore, the largest integral a you can pick is 48.
Hope this helps!