0
$\begingroup$

I'm trying to find a Big-O notation of:

$\displaystyle\sum_{i=1}^{k} ( t(a_in)) + n$, where $\displaystyle\sum_{i=1}^{k} (a_i) < 1$

using a recursion tree method and substitution method. I've spent many hours trying to break this problem down, but it seems very complex (hence the summation of recurrences).

Any help would be great!

Thanks.

$\endgroup$
0

1 Answer 1

1
$\begingroup$

Hint: Presumably you are taking the floor of $a_in$ and have $$t(n)=\sum_{i=1}^{k} t(\lfloor a_in\rfloor) + n$$ Can you argue that $t$ is increasing so $$\sum_{i=1}^{k} t(\lfloor a_in\rfloor) \le t(n-1)$$ at least eventually?

$\endgroup$
4
  • $\begingroup$ sorry I don't understand where you got $t(n-1)$ from $\endgroup$
    – kubasub
    Oct 11, 2011 at 4:16
  • $\begingroup$ I want to say that $\sum_{i=1}^{k} t(\lfloor a_in\rfloor) \lt \sum_{i=1}^{k} a_it(n-1) \lt t(n-1)$. This would be true as long as $t$ is increasing at least linearly. If not, you know it is $O(n)$ $\endgroup$ Oct 11, 2011 at 4:26
  • $\begingroup$ just to be sure, you are manipulating the equation in such a way where you separate the "recursion part" from the "summation part"? $\endgroup$
    – kubasub
    Oct 11, 2011 at 4:52
  • $\begingroup$ I'm not sure what the "recursion part" and the "summation part" are. I just saw a way to fit it into things I know how to solve. Once we get to $t(n)=t(n-1)+n$ it is explicitly solved by t(n)=m+n(n-1)/2. $\endgroup$ Oct 11, 2011 at 12:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.