Expanding a recurrence relation with a summation involved

964 Views Asked by At

Question:

$(10)$ Solve the recurrence in asymptotically tight big Oh function; $$t(n)=n+\sum_{i=1}^kt(a_in),$$ for the two cases (a) where $\sum_{i=1}^k a_i < 1$, and (b) where $\sum_{i=1}^k a_i = 1$, using both the substitution and recursion tree methods.

I'm stuck on this recurrence relation pictured above. I have to draw up a recursion tree for the recurrence and eventually solve it but I'd just like some help understanding exactly how to approach this.

So far I've been interpreting it as a tree with an initial root of $n$ that splits with its next level composed of $k$ nodes of the form $a_i$ and then after I go past that level things get really confusing. On the next level I ended up with nodes of a form $a_1a_i\dots a_ka_i$. Any help as to how this recurrence is to be interpreted and expanded would be appreciated.

Some of my work: http://imgur.com/l2V8VQ2

Can anyone explain what the height might be and if I'm on the right track with this question?

1

There are 1 best solutions below

0
On

As you mention, nodes at level $d$ have weight $a_{x_1} a_{x_2} \cdots a_{x_d} n$ for some "string" $x_1 x_2 \ldots x_d$, where each $x_i \in \{1,\ldots,k\}$. The total weight at level $d$ is thus $$ (a_1 + \cdots + a_k) (a_1 + \cdots + a_k) \cdots (a_1 + \cdots + a_k) n = (a_1 + \cdots + a_k)^d n. $$ (There are $d$ factors in the first expression.) If $a_1 + \cdots + a_k$ then $$ \sum_d (a_1 + \cdots + a_k)^d < \infty, $$ and so the contribution of all levels together is $O(n)$. When $a_1+\cdots+a_k=1$, the contribution of each level is $n$, and so the running time depends on the number of levels, which is of order $\log n$, so the total complexity is $O(n\log n)$.