Asymptotic notations are a little vague for me at the moment. Here I have a problem that asks me if two equations are equal to each other, and it involves the big O notation. I wrote my question in the image in magenta color.
Asymptotic notation (big O)
3 Answers
The answer to your first question is in the definition of $O$-notation.
In fact, given $f,g$ functions, $f:=O(g)\Leftrightarrow \exists C\gt0$ such that $f(x) \le Cg(x)$ definitively.
In your case $2^{n+1}=2\cdot 2^n$, so take $C\ge2$ and by the definition written above you have $2^{n+1}=O(2^n)$.
For the second question, yes it is $\omega$-notation, and $4^n$ became $\omega(2^n)$ because the exercise asks you to see the asymptotic relation between $2^{2n}$ and $2^n$.
The definition of $\omega$-notation is: given two functions $f,g$, then $f:=\omega(g)\Leftrightarrow \lim_{n \to \infty}\frac fg = \infty$.
Note that $\lim_{n \to \infty}\frac {4^n} {2^n} = \infty$, so this is the answer to your second question.
-
0You are saying that the $\omega(f(n))$ notation is the same as Edmund Landau's "little oh" notation $o(f(n))$. In that case, why are they using the much less familiar $\omega$? – 2017-02-07
-
0I used this one https://oeis.org/wiki/Asymptotic_notations – 2017-02-07
-
0@Giulio Thanks. However, how do we distinguish between the big and small omega? In my Textbook it says that big omega is asymptotically tight, while little omega is not. Is it by taking the limit? If it equals to infinity then it little omega instead of big omega? – 2017-02-09
-
0Yes you distinguish them with the limit to infinity and yes, if the limit of the fraction is 1 then it is big omega, if it is infinity it is little omega – 2017-02-09
You need to go to the definitions to understand what you are having trouble with.
The big O notation $f(n) \equiv 2^{n+1} = \mbox{ O}\left( 2^n \right)$ says "There is some real positive $C$ and natural number $n_0$ such that whenever $n>n_0$, $$|f(n)| < |C\cdot 2^n|$$ (Some definitions use $\leq$ instead of $<$; it makes no difference.)
For $f(n) \equiv 2^{n+1}$, we could use, for example, $n_0 = 1$ and $C = 3$ because
$$
2^{n+1} = 2\cdot 2^n < 3 \cdot 2^n
$$
For your second part, you need the definition of $\omega(f(n))$, which is nowhere near as standard and common as the big O notation. (The big omega notation, $\Omega(f(n))$, which says "There is some real positive $C$ and natural number $n_0$ such that whenever $n>n_0$, $|f(n)| > |C\cdot 2^n|$ is somewhat more common and familiar.)
From the context of the problem, the definition of the little omega notation is something like "$f(n) = \omega(g(n))$ iff there is some real positive $C$ and natural number $n_0$ and power $p > 1$ such that whenever $n>n_0$, $$|f(n)| < |C\cdot [g(n)]|^p$$
SO the last line is basically saming that $2^{2n}$ is $\omega(2^n)$ with $p=2$ in that definition.
Let's clear up the definition first. A function $f(n)$ defined on the positive integers $n$ is said to be $O(g(n))$, where for simplicity we assume $g(n)$ is nonzero, if $$ \left|{f(n) \over g(n)}\right| \leq \mbox{(some nonzero constant) $\quad$ for all $n$ starting with some specific $n_{0}$}. $$
That's the definition. Note that the value of the constant is unimportant: any positive constant will do.
If we first try $f(n) = 2^{n+1}$ and $g(n) = 2^{n}$, the above inequality is met for all $n \geq 1$.
Now, for $f(n) = 2^{2^{n}}$ and keeping $g(n) = 2^{n}$ we have: $$ {2^{2^{n}} \over 2^{n}} = {4^{n} \over 2^n}, $$ a ratio which is not bounded by a constant. So, $f(n)$ is not $O(g(n))$.
Note: $O(g(n))$ is not a specific function, but is a class of functions; namely, of those functions that grow "principally no faster than $g(n)$ does as $n \rightarrow \infty$."
