39.1k views
5 votes
Solve the recurrence T(n) = 3T(n) + log n. by making a change of variables. Your solution should be asymptotically tight

1 Answer

4 votes

Final answer:

To solve the recurrence relation T(n) = 3T(n) + log n by making a change of variables, we can define a new variable m such that n = 2^m. Then the recurrence becomes T(2^m) = 3T(2^m) + log(2^m). The solution to the recurrence relation T(n) = 3T(n) + log n, when expressed in terms of n, is T(n) = -log n/2.

Step-by-step explanation:

To solve the recurrence relation T(n) = 3T(n) + log n by making a change of variables, we can define a new variable m such that n = 2^m. Then the recurrence becomes T(2^m) = 3T(2^m) + log(2^m). We can simplify this to T(2^m) = 3T(2^m) + m. Now, let's solve this new recurrence relation.

  1. Substitute T(2^m) with T(m) to simplify the notation: T(m) = 3T(m) + m.
  2. Now, subtract 3T(m) from both sides: T(m) - 3T(m) = m.
  3. Simplify the left side of the equation: -2T(m) = m.
  4. Divide both sides by -2: T(m) = -m/2.

Since m = log n, we can substitute it back into the equation: T(n) = -log n/2.

Therefore, the solution to the recurrence relation T(n) = 3T(n) + log n, when expressed in terms of n, is T(n) = -log n/2.

User Ramasamy Kandasamy
by
9.0k points