0

I'm just trying to get my understanding of big O down. I know the concept and the basics but I'm a bit confused about what it means to be equal to big O of something.

For example, is $2^{2n} = O(2^{100n})$? From my understanding it is, since $2^{2n}$ is "faster" than $2^{100n}$, and so completes within the time $2^{100n}$. Is this correct? And if this is true, does it mean that $n$ could have any coefficient greater than $2$ (in this case) such that $2^{2n}$ is equal to $O(2^{mn})$, for all $m > 2$?

Yuval Filmus
  • 280,205
  • 27
  • 317
  • 514
IABP
  • 272
  • 2
  • 6

1 Answers1

6

The equality symbol used in the Big-O notation is actually abuse of notation, at least this is the way I see it. It is used here for convenience, I guess. Actually, $O(f(n))$ is a set of functions $g(n)$ for which there exists $C$ and $n_0$ such that $Cf(n) \geq g(n) \geq 0, n \geq n_0$. Saying that $g(n) = O(f(n))$ you are actually saying $g(n) \in O(f(n))$.

More informally, $g(n)$ belongs to the set of those functions that can eventually be bounded from above by $f(n)$, up to some constant.

zpavlinovic
  • 1,664
  • 10
  • 19