I am currently stuck at a problem with the Big-Oh. The actual problem is this:
" Find the mistake in the following proof:
Proposition: $2^n$ = O(1)
Proof: Through induction. Proposition is correct for n = 0, because 1 = O(1). Let's propose that $2^{n-1}$ = O(1). We have to show that $2^n$ = O(1) but that is obvious because: $2^n = 2 * 2^{n-1} = O(2^{n-1}) = O(1)$. "
Ok, my problem now is that I wanted to first proof that $2^n$ is not in O(1) before checking the induction for mistakes. The Big-Oh always was a problem for me because I never understood it well but now I need it in this class. This is as far as I got:
$ \lim_{n \to\infty} \frac{2^n}{1} = \infty$
So now I got this but I don't know how to proceed or if this is actually the proof that it isn't in O(1).
Can anybody help me?
Thank you in advance!
The answer to your question so far: Yes, $\lim_{n\to\infty}\frac{2^n}{1} =\infty$ exactly proves that $2^n\ne O(1)$. this is how we would usually check if $f=O(g)$.
So, have you worked on finding the flaw in the proof?
EDIT: The problem with the proof is actually that induction can simply not be used in this situation (as Hagen von Eitzen's answer also says). Induction is used to prove that a property holds for any fixed natural number $n$. However, being Big-Oh of something is a property of the function $f(n)=2^n$ (this is also what John Hughes is talking about).
It doesn't make sense to ask: Is $(n\mapsto2^n) = O(1)$ for $n=1$? For $n=2$? For $n=3$? Etc. This is what induction does. Basically, we have shown that the constant functions $2^1, 2^2, 2^3, \ldots$ are all $O(1)$. But this says nothing about the behaviour of the function $2^n$.
Does it make sense?