Sunday 23 April 2017

discrete mathematics - Completely lost on using strong induction for this proof regarding a recursive algorithm.


T(n) = 1 when n $\le$ 10



T(n) = T($\lfloor\frac{n}{5}\rfloor$) + 7 T($\lfloor\frac{n}{10}\rfloor$) + n when n $\gt$ 10



Prove by strong induction that, for all n ≥ 1, we have T (n) ≤ 10n.
Hint: The only fact about ⌊ ⌋ that you will need is that when x ≥ 1, ⌊x⌋ is an integer, and 1 ≤ ⌊x⌋ ≤ x.





So here is my proof so far:



Let P(n) be T(n) < 10n
We will show that P(n) is true for every integer of n $\ge$ 1 by strong induction.



Base cases (n=1, n=2 , n=3 , n=4 n=5 , n=6, n=7, n=8, n=9 and n=10)
Since T(n) = 1 for all values $\le$ 10 and $\ge$ 1, we know T(n) =1 for all base cases. 1 < 10n when n $\ge$ 1, therefore P(n) is true.



Inductive hypothesis. Suppose that for some arbitrary integer k $\ge$ 10, P(j) is true for every integer 1 $\le$ j $\le$ k.




Inductive step: We want to prove that P(k+1) is true.



T(k+1) = T($\lfloor\frac{k+1}{5}\rfloor$) + 7 • T( $\lfloor\frac{k+1}{10}\rfloor$ + k + 1 by definition of T(n)



T($\lfloor\frac{k+1}{5}\rfloor$) = 1 when k $\le$ 49



T($\lfloor\frac{k+1}{10}\rfloor$) = 1 when k $\le$ 99



$\lfloor\frac{k+1}{5}\rfloor$ $\le$ $\frac{k+1}{5}$ and $\lfloor\frac{k+1}{10}\rfloor$ $\le$ $\frac{k+1}{5}$




and... now I'm kinda lost. Any tips you can give to me to push me in the right direction? I'm really new to proofs and can't figure out how to get to k+1 $\le$ 10n from here. Thanks.

No comments:

Post a Comment

real analysis - How to find $lim_{hrightarrow 0}frac{sin(ha)}{h}$

How to find $\lim_{h\rightarrow 0}\frac{\sin(ha)}{h}$ without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...