1
$\begingroup$

Stumbled upon some O notation counterexamples, but can't seem to figure out which one would disprove this statement:

For any positive constant $c$, $f(cn)\in O(f(n))$.

Any help would be appreciated!

$\endgroup$
1
$\begingroup$

Hint: $f(cn) \in O(f(n))$ is equivalent to $\left|\frac{f(cn)}{f(n)}\right|$ being bounded.

Hint: try an exponential function $f$.

$\endgroup$
1
$\begingroup$

Let $f(n)=2^n$. Then $f(cn)=2^{cn}$ so $\frac {f(cn)}{f(n)}$ is not bounded.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.