-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,19 @@ | ||
\workinprogress % TODO | ||
Our first guess is that $T(n)\le c2^n$ for all $n\ge n_0$, where $c$, $n_0>0$ are constants. | ||
Letting $n\ge n_0+1$ and substituting the inductive hypothesis applied to $T(n-1)$, yields | ||
\begin{align*} | ||
T(n) &\le 2c2^{n-1}+1 \\ | ||
&= c2^n+1, | ||
\end{align*} | ||
but that does not imply that $T(n)\le c2^n$ for any choice of $c$. | ||
|
||
Let's then improve our guess by subtracting a lower-order term: $T(n)\le c2^n-d$, where $d\ge0$ is another constant. | ||
We now have | ||
\begin{align*} | ||
T(n) &\le 2(c2^{n-1}-d)+1 \\ | ||
&= c2^n-2d+1 \\ | ||
&= c2^n-d-(d-1) \\ | ||
&\le c2^n-d && \text{(as long as $d\ge1$)}. | ||
\end{align*} | ||
|
||
Let's pick $n_0=1$. | ||
By choosing a sufficiently large $c$, we can satisfy the condition $T(1)\le c\cdot2^1-d$ for any fixed constants $d$ and $T(1)$, so the bound also holds when $n_0\le n<n_0+1$. |