Solve Recurrence $$T(n)=aT(n-1)+bn^c$$

  • MHB
  • Thread starter mathmari
  • Start date
  • Tags
    Recurrence
In summary, the conversation is about solving a recurrence with the given formula $T(n)=aT(n-1)+bn^c$, with the initial condition $T(1)=1$. The person has provided their work so far, which involves repeatedly substituting the formula and using summation notation. They then ask if their work is correct and how to continue. The other person responds by suggesting a different form for the difference equation and providing a link for further resources. They also give the final solution as $T(n)=a^n+b\sum_{k=1}^{n}a^{n-k}k^c$.
  • #1
mathmari
Gold Member
MHB
5,049
7
Hey! :eek:

I want to solve the following recurrence:
$$T(n)=aT(n-1)+bn^c , T(1)=1$$

I have done the following:

$$T(n)=aT(n-1)+bn^c \\ =a \left ( aT(n-2)+b(n-1)^c\right )+bn^c \\ =a^2T(n-2)+ab(n-1)^c+bn^c \\ =a^2 \left (aT(n-3)+b(n-2)^c\right )+ba(n-1)^c+bn^c \\=a^3T(n-3)+ba^2(n-2)^c+ba(n-1)^c+bn^c \\ = \dots \\ =a^iT(n-i)+b\sum_{k=0}^{i-1}a^k(n-k)^c$$

$n-i=1 \Rightarrow i=n-1$

Then we have the following:

$$T(n)=(n-1)+b \sum_{k=0}^{n-2}a^k(n-k)^c$$

Is it correct?? How can I continue?? (Wondering)

Is the substitution method the only way to solve this recurrence?? (Wondering)
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
mathmari said:
Hey! :eek:

I want to solve the following recurrence:
$$T(n)=aT(n-1)+bn^c , T(1)=1$$

I have done the following:

$$T(n)=aT(n-1)+bn^c \\ =a \left ( aT(n-2)+b(n-1)^c\right )+bn^c \\ =a^2T(n-2)+ab(n-1)^c+bn^c \\ =a^2 \left (aT(n-3)+b(n-2)^c\right )+ba(n-1)^c+bn^c \\=a^3T(n-3)+ba^2(n-2)^c+ba(n-1)^c+bn^c \\ = \dots \\ =a^iT(n-i)+b\sum_{k=0}^{i-1}a^k(n-k)^c$$

$n-i=1 \Rightarrow i=n-1$

Then we have the following:

$$T(n)=(n-1)+b \sum_{k=0}^{n-2}a^k(n-k)^c$$

Is it correct?? How can I continue?? (Wondering)

Is the substitution method the only way to solve this recurrence?? (Wondering)

Lets write the difference equation in slightly different form...

$\displaystyle t_{n+1} = a\ t_{n} + b\ (n+1)^{c},\ t_{0}=1\ (1)$

The solving procedure is illustrated in...

http://mathhelpboards.com/discrete-mathematics-set-theory-logic-15/difference-equation-tutorial-draft-part-i-426.html

With simple steps You should obtain...

$\displaystyle t_{n} = a^{n} + b\ \sum_{k=1}^{n} a^{n - k}\ k^{c}\ (2)$

Kind regards

$\chi$ $\sigma$
 

FAQ: Solve Recurrence $$T(n)=aT(n-1)+bn^c$$

What is a recurrence relation?

A recurrence relation is a mathematical equation or formula that describes a sequence of numbers or values, where each term is defined in terms of previous terms in the sequence.

How do you solve a recurrence relation?

To solve a recurrence relation, you can use various methods such as substitution, iteration, or the Master Theorem. These methods involve finding a closed-form solution for the relation, which can then be used to calculate any term in the sequence.

What do the variables a, b, and c represent in the recurrence formula T(n)=aT(n-1)+bn^c?

The variable a represents the coefficient of the previous term, b represents the coefficient of the exponential term, and c represents the exponent of the exponential term in the recurrence formula. These values help determine the growth rate of the sequence and can be used to solve the recurrence relation using various methods.

Can recurrence relations be used to analyze algorithms?

Yes, recurrence relations can be used to analyze the time complexity of algorithms. By expressing the number of operations performed by an algorithm in terms of a recurrence relation, we can determine the time complexity and efficiency of the algorithm as the input size increases.

Are there any limitations to using recurrence relations?

One limitation of using recurrence relations is that they assume that all previous terms in the sequence are known. This may not always be the case, especially when dealing with real-world problems or algorithms. Additionally, some recurrence relations may not have a closed-form solution, making it difficult to solve them using traditional methods.

Back
Top