Proving $T(2^k)=2^k \cdot k$ with Induction

  • MHB
  • Thread starter evinda
  • Start date
  • Tags
    Induction
In summary: You may also want to mention the base case for the induction, which is $n=2$. Other than that, the formulation is good. Keep it up!
  • #1
evinda
Gold Member
MHB
3,836
0
Hello! (Wave)

Use induction to show that if $n$ is a power of $2$ then the solution of the recurrence relation$$\left\{\begin{matrix}
2 &, \text{ if } n=2 \\
2T\left( \frac{n}{2} \right )+n & , \text{ if } n=2^k, \text{ for } k>1
\end{matrix}\right.$$

is $T(n)=n \lg n$.That's what I have tried:

We will use induction on $k$ to show that $T(2^k)=2^k \cdot k$.

For $k=1 \Rightarrow n=2^1=2$ we have: $T(2)=2=2 \lg 2 \checkmark$.

We suppose that for some $k \geq 1$ it holds that $T(2^k)=2^k \cdot k$.

For $k+1$: $T(2^{k+1})=2T\left( \frac{2^{k+1}}{2} \right )+2^{k+1}=2T(2^k)+2^{k+1} \overset{\text{induction hypothesis}}{=}2 \cdot 2^k \cdot k+2^{k+1}=2^{k+1} \cdot k+2^{k+1}=2^{k+1}(k+1)$.Thus, $\forall k \in \mathbb{N}$ it holds that $T(2^k)=2^k \cdot k$.Could you tell me if my formulation is right or if I could improve something? (Thinking)
 
Physics news on Phys.org
  • #2
evinda said:
Hello! (Wave)

Use induction to show that if $n$ is a power of $2$ then the solution of the recurrence relation$$\left\{\begin{matrix}
2 &, \text{ if } n=2 \\
2T\left( \frac{n}{2} \right )+n & , \text{ if } n=2^k, \text{ for } k>1
\end{matrix}\right.$$

is $T(n)=n \lg n$.That's what I have tried:

We will use induction on $k$ to show that $T(2^k)=2^k \cdot k$.

For $k=1 \Rightarrow n=2^1=2$ we have: $T(2)=2=2 \lg 2 \checkmark$.

We suppose that for some $k \geq 1$ it holds that $T(2^k)=2^k \cdot k$.

For $k+1$: $T(2^{k+1})=2T\left( \frac{2^{k+1}}{2} \right )+2^{k+1}=2T(2^k)+2^{k+1} \overset{\text{induction hypothesis}}{=}2 \cdot 2^k \cdot k+2^{k+1}=2^{k+1} \cdot k+2^{k+1}=2^{k+1}(k+1)$.Thus, $\forall k \in \mathbb{N}$ it holds that $T(2^k)=2^k \cdot k$.Could you tell me if my formulation is right or if I could improve something? (Thinking)

Looks fine for me :)
 
  • #3
ZaidAlyafey said:
Looks fine for me :)

Would it be better to say at the beginning something like that?

We want to show that when $n$ is some power of $2$ then the solution of the recurrence relation is $T(n)=n \lg n$, i.e. that for $n=2^k$ where $k$ is some positive integer the solution is equal to $2^k \cdot k$.
 
Last edited:
  • #4
evinda said:
Would it be better to say at the beginning something like that?

We want to show that when $n$ is some power of $2$ then the solution of the recurrence relation is $T(n)=n \lg n$, i.e. that for $n=2^k$ where $k$ is some positive integer the solution is equal to $2^k \cdot k$.

Yeah, it is better.
 

Related to Proving $T(2^k)=2^k \cdot k$ with Induction

1. What is the purpose of proving $T(2^k)=2^k \cdot k$ with induction?

The purpose of this proof is to demonstrate that the given statement holds true for all values of k, using the principle of mathematical induction. This is a powerful tool in mathematics that allows us to prove statements for infinitely many cases by only showing that it holds true for a few specific cases.

2. What is the principle of mathematical induction?

The principle of mathematical induction is a mathematical proof technique used to prove statements about natural numbers. It states that if we can prove that a statement is true for a base case (usually k=1) and then show that if the statement holds true for some value of k, it also holds true for k+1, then the statement is true for all natural numbers.

3. How does the proof of $T(2^k)=2^k \cdot k$ with induction work?

The proof uses the principle of mathematical induction to show that the statement holds true for all values of k. First, we prove the base case, which is usually k=1. Then, we assume that the statement holds true for some value of k, and use this assumption to prove that it also holds true for k+1. This completes the inductive step and proves that the statement is true for all values of k.

4. Why is it necessary to use induction to prove $T(2^k)=2^k \cdot k$?

It is necessary to use induction because the statement we are trying to prove is true for infinitely many values of k. Simply showing that it holds true for a few specific cases is not enough to prove that it holds true for all values of k. Induction allows us to generalize our proof and show that the statement is true for all natural numbers.

5. What are some applications of proving $T(2^k)=2^k \cdot k$ with induction?

This proof has many applications in mathematics, computer science, and engineering. It is commonly used to prove the correctness of algorithms and to establish the time complexity of algorithms. It is also used in number theory to prove properties of natural numbers and in combinatorics to count the number of possible combinations of objects. Additionally, this proof technique is used in many other areas of mathematics to prove various statements and theorems.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
988
  • Set Theory, Logic, Probability, Statistics
Replies
9
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
1K
  • Precalculus Mathematics Homework Help
Replies
10
Views
507
  • Set Theory, Logic, Probability, Statistics
Replies
20
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
952
  • Set Theory, Logic, Probability, Statistics
Replies
10
Views
919
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
847
Back
Top