Dropping smaller terms in Big O notation

211 Views Asked by At

As I'm learning Big O notation, I'm having difficulty understanding how ALL arithmetic operations are always constant.

For example, the growth rate of either O(15n) or O(150n+50) is supposed to be same as O(n):

from 10 to 10^1.2

I would expect at a high enough level such as

from 10^40 to 10^70

these functions would appear much closer together, but am I missing something?

2

There are 2 best solutions below

0
On

By definition, big O does not care about multiplicative factors. If you plot $n$ and $150n$ on a graph $150n$ grows faster, but they are within a multiplicative factor of $150$. The point is that $n^2$ grows so much faster it exceeds any multiplicative factor times $n$, so is in a different category.

0
On

$a_n=O(g(n))$ means $\frac {a_n} {g(n)}$ is bounded. Since $\frac {a_n} {h(n)}$=$\frac {a_n} {g(n)}$$\frac {g(n)} {h(n)}$ it follows that $a_n=O(h (n))$ is also true whenever $\frac {g(n)} {h(n)}$ is bounded.

Note that$\frac {an+b} {cn+d}$ is bounded (if $c \neq 0$) so $a_n=O(an+b)$ is equivalent to $a_n=O(cn+d)$