2

I was going across some problems which translated the fact that $\log (n!) = \Theta(n\log n)$ to give $$\log(\lceil\log n\rceil!) = \Theta(\lceil\log n\rceil \log \lceil\log n\rceil)$$ and therefore $\log(\lceil \log n\rceil!) = \omega(\lg n)$.

Now I just have this intuition that this sort of conversions shouldn't and wouldn't be always right.

Would it be right to think that.

Any justification as to why am I wrong in thinking that and guidance to what I should have a look at, what texts I should go through to understand it better for myself are very much appreciated.

Thank you.

Raphael
  • 72,336
  • 29
  • 179
  • 389
ps_
  • 73
  • 1
  • 1
  • 8

3 Answers3

6

In general, you can prove nothing. You know $f(n) = \Theta(g(n))$. Now assume f (n) = g (n) = n for all n except g (n) = 0 if n ≤ 1000. And h (n) = 1000 for all n.

So we now have f (h (n)) = 1000 and g (h (n)) = 0.

The problem is that $O (n)$ and $\Theta (n)$ only work for large n. You are fine if h (n) -> inf, or if you look specifically at f (n) and h (n).

If the limit of h (n) is infinity, then you overcome the problem that $\Theta(g(n))$ only gives you information for n ≥ N for some possibly large N, because h (n) will eventually be greater than that N.

gnasher729
  • 29,996
  • 34
  • 54
2

Below, I'm assuming that the domain of all function is the non-negative reals.

By definition, $f(n) = \Theta(g(n))$ if there exist $N \geq 0$ and $A,B > 0$ such that $$ n \geq N \Longrightarrow A g(n) \leq f(n) \leq B g(n). $$ If there exists a constant $c > 0$ such that $f(n),g(n) \geq c$ for all $n$ and $f,g$ are continuous, then we can in fact take $N = 0$ (perhaps modifying $A,B$ in the process). This means that for all $n$, it holds that $$ A g(n) \leq f(n) \leq B g(n). $$ Assuming that $h(n) \geq 0$ for all $n$, this implies that $$ A g(h(n)) \leq f(h(n)) \leq B g(h(n)), $$ and so $f(h(n)) = \Theta(g(h(n))$.

Even without assuming that $N = 0$, we can make the same conclusion if $\lim_{n\to\infty} h(n) = \infty$. In that case, there exists $M$ such that $n \geq M$ implies $h(n) \geq N$, and so $$ n \geq M \Longrightarrow A g(h(n)) \leq f(h(n)) \leq B g(h(n)), $$ again implying $f(h(n)) = \Theta(g(h(n))$.

Yuval Filmus
  • 276,994
  • 27
  • 311
  • 503
  • I haven't gone through the details, but I think there are some subtleties involved. Compare with bullet two here, a statement we found a rigorous proof for (but not for stronger claims). – Raphael Sep 15 '16 at 17:10
2

Why would there be a problem? You know that $\log (t!) = \Theta(t\log t)$. Why would it matter whether you call the thing $t$ or $\lceil\log n\rceil$? (As long as you can make $\lceil\log n\rceil$ large enough for the asymptotic relationship to kick in; and you can.)

David Richerby
  • 81,689
  • 26
  • 141
  • 235