Little Notation

The difference between the little and big notations have always confused me. This post is an attempt to sort them out. I have been encountering this dilemma every time I go back to my problem set in school. I always find myself referring to my Kindle to refresh my memory.

So what are the differences?

  • Little notation denotes a bound that is NOT asymptotically tight. – I used to think that n^{2} was waaaay bigger compared to \frac{n^{2}}{2} because come to think of it 100^{2} is bigger then \frac{100^2}{2} right? Apparently not big enough. When I tried graphing it and zoomed out 100x, their lines were near each other.
  • Little notation requires that the condition holds true for ALL positive constants c that is multiplied to g(n) – this is the most important distinction of them all. If one says that f(n) = o(g(n)), then for ALL positive constants c and some n_{0} > n, cg(n) should be > f(n).

Phew, that was some definition and it wasn’t even the original one . I have always found myself hard pressed to remember and apply the definition above because I am lazy and I like a methodical quick fix (with emphasis on the word methodical).

So a technique I am using is graphing of both functions on a piece of paper. An easy starting point is to let c=1 where one can easily see from the graphs of both functions if indeed g(n) is > f(n) for all n > n_{0}. If it is, then the condition should hold true for c > 1.

One gotcha, however, is that c can also be anything between 1 and 0. Going back to my previous dilemma, is \frac{n^{2}}{2} = o(n^{2}) It seems at first that the answer is yes for c \geq 1 but a closer look reveals that for c= \frac{1}{4} which is c < 1 the condition does not hold anymore. Hence, \frac{n^{2}}{2} != o(n^{2}).

UPDATE: Since I have rarely encountered the use of the \omega notation, one mnemonic I have devised today to help me quickly process a statement like ‘is n^(2)=\omega(n) is to quickly apply the form cg(n) < f(n) to the statement. As such, if I see a the statement like n^(2)=\omega(n), it quickly registers as cn < n^{2}.

Advertisement

Tags: ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s