Hello,
please have a look:
http://academics.tjhsst.ed
Main Topics
Browse All Topics1. In the definition of Big-O, why is the "for N >= n0" needed?
2. Since Big-O notation is a mathematical tool for functions like f(N) or g(N), how is
it applicable to algorithm analysis?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Hello,
please have a look:
http://academics.tjhsst.ed
Big O notation is useful for algorithm analysis to determine the time needed for its execution and mainly to preview how much grows the time execution, in function of n, being n the size of the input of the problem.
For exemple, in ALG 1 below, the algorithm spends n times the time needed to draw a line. Then the analysis of such algorithm shows that it is in O(n).
In ALG 2, the algorithm spends n times the time needed to draw two lines. In terms of timing, it will probably spend twice the time as in ALG 1. The analysis of ALG 2 shows that it is in O(n) too, because the time grows proportinaly to n, not to the time to draw a line.
In ALG 3 we have a quadratic growth, say, O(n²), say the time grows proportionaly to the power of two of n.
Please note, Big O notation is applied also for memory space.
Jose
Often a good algorithm uses more time for preparation, and will therefore be able to outrun a lesser algorithm when the dataset is large. But if the dataset is small the lesser algorithm can finish while the better algorithm is still preparing.
But when you start working with O notation the aim is to get an algorithm to run faster when the dataset is large, while it is not interesting if it take 1 millisek or 2 millisek to run with a small dataset, it is important to run a large set in 1 hour and not 2.
The problem in the wording "for large N" is that you can exploit it say you want to sort a list of integers, mathematically a large N could be interpreted as the number of integers all computers can store and therefore you can claim that any sorting algorithm will run in O(1) time for really large N :) don't do that!
If you have two algorithms that run: A: N*N (ie. O(N*N) and B: N+10 (i.e O(N)) and plot them in a graph you will soon see what the point is:
The runtimes will be:
1 element A: 1 B: 11
2 elements A: 4 B: 12
3 elements A: 9 B: 13
4 elements A:16 B: 14
5 elements A:25 B: 15
In this case the "large N" is 4 where the O(N) start running faster than the O(N*N), but when there are 1-3 elements O(N*N) is better.
Business Accounts
Answer for Membership
by: ozoPosted on 2009-09-11 at 22:34:51ID: 25315252
We only care what happens when N gets large, so we can can ignore things that only happen at small N
We can compare how different algorithms are affected as N gets large, independently of details of implementation.