1

So I have the following recurrence relation:

$$f(n) = f(n-1) + f(\lceil n/2\rceil)+ 1$$

I already know that:

If:

$$g(n) = g(n-1) + 1$$

$$g(n) = O(n)$$

If:

$$g(n) = g(\lceil n/2\rceil) + 1$$

$$g(n) = O(\log(n))$$

If:

$$g(n) = g(n-1) + g(\lceil n/2\rceil)$$

$$g(n) = O(nlog(n))$)

Thus can I definitely conclude that:

$$f(n) = O(n \log(n) * n * \log(n)) = O(n^2 \log(n)^2)$$

Amzoti
  • 56,093
  • 2
    Suppose $h(n)=f(n)+1$. Then $h(n)=h(n-1)+h(\lceil n/2\rceil)$. – Gerry Myerson Jul 24 '13 at 12:41
  • 2
    It is not true that if $g(n) = g(n-1) +‌ g(\lceil n/2 \rceil)$, then $g(n) = O(n\log n)$. In fact, $g(n)$‌ grows faster than any polynomial function (unless it's the identically-0 function of course). See the question you asked just before this one: http://math.stackexchange.com/questions/450802/strange-recurrence-what-is-it-asymptotic-to where I posted an answer saying $g(n) = n^{O(\log n)}$. By @GerryMyerson's comment above, this is essentially the same question; your $f(n)$ will satisfy the same property (i.e., it too is $n^{O(\log n)}$.) – ShreevatsaR Jul 24 '13 at 18:10
  • @ShreevatsaR. I had missed the earlier question. Nice job on it. +1. – Rick Decker Jul 25 '13 at 01:11

1 Answers1

0

You have $f(n) = f(n-1) + f(\lceil n/2\rceil)+ 1$. So, if you define $f(0)=0$

$$f(n)=\displaystyle\sum_{k=1}^n(f(k)-f(k-1))$$ $$=\displaystyle\sum_{k=1}^nf(\lceil k/2\rceil)+ n$$ $$=O(n\log n)+n=O(n\log n)$$

As, $\displaystyle\sum_{k=1}^ng(\lceil k/2\rceil)=g(n)=O(n\log n)$, when $g(n) = g(n-1) + g(\lceil n/2\rceil)$.

Kunnysan
  • 2,050