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

  • Context: MHB 
  • Thread starter Thread starter evinda
  • Start date Start date
  • Tags Tags
    Induction
Click For Summary

Discussion Overview

The discussion revolves around proving a recurrence relation using mathematical induction, specifically focusing on the case where \( n \) is a power of \( 2 \). Participants explore the formulation and correctness of the proof that \( T(2^k) = 2^k \cdot k \) and its relation to the solution \( T(n) = n \lg n \).

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant presents an induction proof to show that \( T(2^k) = 2^k \cdot k \) and verifies the base case for \( k=1 \).
  • The same participant assumes the induction hypothesis holds for some \( k \geq 1 \) and demonstrates the case for \( k+1 \).
  • Another participant expresses agreement with the proof and suggests a clearer introductory statement regarding the goal of the proof.
  • A further response reiterates the suggestion for a clearer introduction, indicating a preference for improved clarity in the presentation.

Areas of Agreement / Disagreement

There is general agreement on the correctness of the proof presented, but there is no consensus on the best way to introduce the problem statement. The discussion remains open to refinement of the presentation.

Contextual Notes

Participants have not resolved whether the formulation of the proof could be improved beyond the suggestions made, and there is no explicit agreement on the implications of the proof regarding the relationship to \( T(n) = n \lg n \).

evinda
Gold Member
MHB
Messages
3,741
Reaction score
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
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 :)
 
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:
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.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 29 ·
Replies
29
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 21 ·
Replies
21
Views
1K
  • · Replies 20 ·
Replies
20
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K