-3
$\begingroup$

Prove by induction on $n$ that $ 2^nāˆ’1 $ solves the recurrence

$H_n =\begin{cases}0, &\text{if $n=0$}\\[6px] 2H_{n-1}+1,&\text{otherwise}\end{cases}$

I know the base case would be when $n = 0$, $H_n = 0$, but how would you do the inductive case and the rest of the proof?

  • 1
    Have you given it a real thought? What did you try and why didn't it work? Or what prevents you from trying? – 2017-02-20

2 Answers 2

1

For $n=0$, $2^n-1=2^0-1=0$.

Suppose $n>0$ and $H_{n-1}=2^{n-1}-1$. Then $$ H_n=2H_{n-1}+1=\cdots $$

1

Did you try anything?

$H_{n+1} = 2H_n +1 = 2(2^n - 1) +1 = ?????$

Kind of hard not to get this right off the bat.