Big O Proof by Contradiction

3.5k Views Asked by At

Question:

Use a proof by contradiction to show that $5^n$ is not $O(3^n)$

NOTE: This is homework, please don't provide an answer, just want to know if I am on the right track.


My Attempt:

If there exists constants such that $n > 0$ and $c > 0$ then:

$5^n \le C3^n$,

$5^n/3^n = 5/3^n$.

$C \ge 5/3^n$ is a contradiction because $C$ is a constant and there are infinite many values for $n$


Is this the correct way of doing it? Thanks a lot

1

There are 1 best solutions below

0
On

Your second line should either read $$ 5^n/3^n=(5/3)^n $$ or better yet $$ \frac{5^n}{3^n}=\left(\frac{5}{3}\right)^n $$ and then as Henrik said in the comments, you need to stress that $\left(\frac{5}{3}\right)^n$ is growing unlimited and goes to infinity as $n$ tends to infinity.


If you are into logarithms, maybe a clearer rendering would be $$ 5^n\leq C 3^n\iff n\log5\leq\log C+n\log3\iff n(\log 5-\log 3)\leq\log C $$ and since $(\log5-\log3)>0$ the LHS goes to infinity as $n$ goes to infinity.

NOTE: It is OK to apply the logarithm on both sides of the inequality, since it is a growing function, thus preserving the direction of the inequality.