Search results
Results From The WOW.Com Content Network
Big O notation is a mathematical notation that describes the limiting behavior of a function when the argument tends towards a particular value or infinity. Big O is a member of a family of notations invented by German mathematicians Paul Bachmann, [1] Edmund Landau, [2] and others, collectively called Bachmann–Landau notation or asymptotic notation.
It is a term commonly encountered in computer science research as a result of widespread use of big-O notation. More formally, an algorithm is asymptotically optimal with respect to a particular resource if the problem has been proven to require Ω(f(n)) of that resource, and the algorithm has been proven to use only O(f(n)).
This is often written symbolically as f (n) ~ n 2, which is read as "f(n) is asymptotic to n 2". An example of an important asymptotic result is the prime number theorem. Let π(x) denote the prime-counting function (which is not directly related to the constant pi), i.e. π(x) is the number of prime numbers that are less than or equal to x.
Big O notation is an asymptotic measure of function complexity, where () = (()) roughly means the time requirement for an algorithm is proportional to (), omitting lower-order terms that contribute less than () to the growth of the function as grows arbitrarily large.
Further, unless specified otherwise, the term "computational complexity" usually refers to the upper bound for the asymptotic computational complexity of an algorithm or a problem, which is usually written in terms of the big O notation, e.g.. ().
For example, since the run-time of insertion sort grows quadratically as its input size increases, insertion sort can be said to be of order O(n 2). Big O notation is a convenient way to express the worst-case scenario for a given algorithm, although it can also be used to express the average-case — for example, the worst-case scenario for ...
In formal mathematics, rates of convergence and orders of convergence are often described comparatively using asymptotic notation commonly called "big O notation," which can be used to encompass both of the prior conventions; this is an application of asymptotic analysis.
The above example would have a child nodes at each non-leaf node. Each node does an amount of work that corresponds to the size of the subproblem n passed to that instance of the recursive call and given by (). The total amount of work done by the entire algorithm is the sum of the work performed by all the nodes in the tree.