Verify answers to these big o notation questions

393 Views Asked by At

May someone look over if I did these big o notation problems correctly?

Some of them were tricky.

1) $f(x) = 10 = O(10)$

2) $f(x) = 3x + 7 = O(x) $

3) $f(x) = x^2 + x + 1 = O(x^2) $

4) $f(x) = 5\log x = O(\log x)$

5) $f(x) = \lfloor x \rfloor= O(x)$

6) $f(x) = \left\lceil \frac{x}2\right\rceil= O(x)$

1

There are 1 best solutions below

2
On BEST ANSWER

All these equality are correct. Recall that $f(x)=_ a O(g(x))$ if

$$\exists M>0,\exists \delta>0,\; |f(x)|\le M|g(x)|\;\text{if}\; |x-a|\le \delta$$