Who knows how to use (and explain) the so-called "Big Oh"?
I will assume u don't want me to bore u with that...:-)
.....you scare me......
...right...
you found a scarier answerer than you...
That's a simple example, not scary at all (bit like limits in math)
i hate math....
all i know is that Big Oh is used to measure algorithms...what i don't know is how
U know what linear, quadratic and exponential are already.......
somehow....i manage...
Well, let's do the example together, u tell me what u don't get and we go from there...
honestly....i have no idea about it...unlike most of my questions where i know what i'm doing....i only know introduction to this part...which is it is used to measure algorithms
the efficiency of algorithms....
and by that you mean....?
You can take an algorithm and calculate (count) how many steps it will take for a given input.....
and big oh measures that?
Yes, the basic division is like I said before, linear quadratic and exponential (there are some others, logarithmic etc)
interesting
So, you find that the number of steps for input n is given by 4n^2 -2n +2 Then as n becomes larger, the n^2 term dominates...it is quadratic growth.
Call the function T(n) T(n) is O(n^2)
how do you use big oh then? is it something like programming?
by that i mean if it's a code
I just did use it, it's a way of describing a function, a notation for that.....
The limiting behaviour of a function.
i meant if it's written *with* the code (say C program)
No, it's not. U would use Big O (and little o) to talk about the code
This particular area is called algorithmic complexity...
oh. so big oh is written with the algorithm?
No, the algorithm does not depend on big O in any way. The people who analyze the algorithm for efficiency (perhaps also the programmer, depends on the scale) will use big O to describe the efficiency.
i suppose only way to fully understand is to see it for myself
Read the article, like most Wikipedia articles, it looks a lot worse than it actually is because of the encyclopedic writing style.
that was what i said earlier...
OK, try this instead (to start with) http://en.wikipedia.org/wiki/Time_complexity#Table_of_common_time_complexities
i'd rather just understand its introduction for now....
I gave u the table because there are some algorithms there u might know eg binary search, bubble sort
Join our real-time social learning platform and learn together with your friends!