Proving by Induction: Solving Recurrence Relation

In summary, the solution of the recurrence relation $T(n)=2T \left ( \frac{n}{2} \right )+n^2, n>1 \text{ and } T(1)=1$ is $n(2n-1)$.
  • #1
evinda
Gold Member
MHB
3,836
0
Hello! (Wave)

I want to prove by induction, that the solution of the recurrence relation $T(n)=2T \left ( \frac{n}{2} \right )+n^2, n>1 \text{ and } T(1)=1$ is $n(2n-1)$.

We have to suppose that $n=2^k, k \geq 0$, right?

Do I have to prove the solution by induction with respect to $n$ or to $k$ ? (Thinking)
 
Physics news on Phys.org
  • #2
evinda said:
Hello! (Wave)

I want to prove by induction, that the solution of the recurrence relation $T(n)=2T \left ( \frac{n}{2} \right )+n^2, n>1 \text{ and } T(1)=1$ is $n(2n-1)$.

We have to suppose that $n=2^k, k \geq 0$, right?

Do I have to prove the solution by induction with respect to $n$ or to $k$ ? (Thinking)

Hi! (Blush)

I'd pick $k$, since $T(n)$ is not defined for all $n \in \Bbb N$. (Thinking)

Btw, do you really have to use induction? (Wondering)
 
  • #3
I like Serena said:
I'd pick $k$, since $T(n)$ is not defined for all $n \in \Bbb N$. (Thinking)

Btw, do you really have to use induction? (Wondering)

The exercise asks the following:

Solve the recurrence relation $ \displaystyle{T(n)=\left\{\begin{matrix}
1 &,n=1 \\
2T \left(\frac{n}{2} \right )+n^2 &, n>1
\end{matrix}\right.}$

and then, prove that the solution you found is right, using mathematical induction.

So, do we have to do it like that?

We suppose that $n=2^k, k \geq 0$.

  • $k=0 \Rightarrow n=1: T(1)=1=1\cdot (2 \cdot 1-1) \checkmark$
    $$$$
  • We suppose that the relation stands for any $k>1$, so $T(2^k)=2^k(2^{k+1}-1)$
    $$$$
  • We will show that the relation stands for $k+1$.

    $$T(2^{k+1})=2T \left (\frac{2^{k+1}}{2} \right )+(2^{k+1})^2=2T(2^k)+2^{2k+2}=2 (2^k(2^{k+1}-1))+2^{2k+2}\\ =2^{2k+2}-2^{k+1}+2^{2k+2}=2^{k+1}(2 \cdot 2^{k+1}-1)$$
 
  • #4
evinda said:
The exercise asks the following:

Solve the recurrence relation $ \displaystyle{T(n)=\left\{\begin{matrix}
1 &,n=1 \\
2T \left(\frac{n}{2} \right )+n^2 &, n>1
\end{matrix}\right.}$

and then, prove that the solution you found is right, using mathematical induction.

So, do we have to do it like that?

We suppose that $n=2^k, k \geq 0$.

  • $k=0 \Rightarrow n=1: T(1)=1=1\cdot (2 \cdot 1-1) \checkmark$
    $$$$
  • We suppose that the relation stands for any $k>1$, so $T(2^k)=2^k(2^{k+1}-1)$
    $$$$
  • We will show that the relation stands for $k+1$.

    $$T(2^{k+1})=2T \left (\frac{2^{k+1}}{2} \right )+(2^{k+1})^2=2T(2^k)+2^{2k+2}=2 (2^k(2^{k+1}-1))+2^{2k+2}\\ =2^{2k+2}-2^{k+1}+2^{2k+2}=2^{k+1}(2 \cdot 2^{k+1}-1)$$

Perfect! (Happy)Alternatively, note that $T(n)=n(2n-1)$ fits in the original equation, including the boundary condition that $T(1)=1$.
Therefore it is a solution.

\(\displaystyle T(1)=1(2\cdot 1 - 1)=1\)

\(\displaystyle n(2n-1)=T(n)=2T\left(\frac n2\right)+n^2 = 2\cdot \frac n 2 \left(2\cdot \frac n 2 - 1\right) + n^2 = n(n-1) + n^2 = n(2n-1)\)

In other words, there is no real need for a proof by induction.
Just verifying that the proposed solution satisfies the problem statement is enough. (Nerd)
 
  • #5
Or do I have to suppose maybe, at the second step, that the relation stands for any $k \geq 0$ ? (Thinking)
 
  • #6
evinda said:
Or do I have to suppose maybe, at the second step, that the relation stands for any $k \geq 0$ ? (Thinking)

Oh yes. (Blush)
 

What is induction and how does it relate to solving recurrence relations?

Induction is a mathematical proof technique used to prove that a statement is true for all natural numbers. In the context of solving recurrence relations, induction is used to show that a given formula or algorithm correctly calculates the terms of the recurrence relation.

What is a recurrence relation?

A recurrence relation is a mathematical equation that defines a sequence of numbers in terms of one or more previous terms. It is commonly used to model iterative processes or natural phenomena.

What is the process for proving a recurrence relation by induction?

The process for proving a recurrence relation by induction involves three steps: the base case, the inductive hypothesis, and the inductive step. First, the base case is established by showing that the formula or algorithm correctly calculates the first term of the recurrence relation. Then, the inductive hypothesis is assumed to be true for some arbitrary value of n. Finally, the inductive step involves showing that if the statement is true for n, it is also true for n+1.

What are the limitations of using induction to prove a recurrence relation?

Induction can only be used to prove that a statement is true for all natural numbers. This means that it cannot be used to prove statements about non-integer values or infinite sequences. Additionally, induction relies on the correctness of the base case, inductive hypothesis, and inductive step, which may be difficult to prove in some cases.

Can induction be used to prove all recurrence relations?

No, induction can only be used to prove certain types of recurrence relations, specifically those that have a well-defined base case and inductive step. Some recurrence relations may require alternative proof techniques, such as direct proof or strong induction.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
831
  • Set Theory, Logic, Probability, Statistics
Replies
13
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
932
  • Set Theory, Logic, Probability, Statistics
Replies
18
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
10
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
883
  • Set Theory, Logic, Probability, Statistics
Replies
0
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
1K
Back
Top