Hubbry Logo
search
logo
2311419

Big O notation

logo
Community Hub0 Subscribers
Write something...
Be the first to start a discussion here.
Be the first to start a discussion here.
See all
Big O notation

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, Edmund Landau, and others, collectively called Bachmann–Landau notation or asymptotic notation. The letter O was chosen by Bachmann to stand for Ordnung, meaning the order of approximation.

In computer science, big O notation is used to classify algorithms according to how their run time or space requirements grow as the input size grows. In analytic number theory, big O notation is often used to express a bound on the difference between an arithmetical function and a better understood approximation; one well-known example is the remainder term in the prime number theorem. Big O notation is also used in many other fields to provide similar estimates.

Big O notation characterizes functions according to their growth rates: different functions with the same asymptotic growth rate may be represented using the same O notation. The letter O is used because the growth rate of a function is also referred to as the order of the function. A description of a function in terms of big O notation only provides an upper bound on the growth rate of the function.

Associated with big O notation are several related notations, using the symbols , , , and to describe other kinds of bounds on asymptotic growth rates.

Let the function to be estimated, be a real or complex valued function, and let the comparison function, be a real valued function. Let both functions be defined on some unbounded subset of the positive real numbers, and be non-zero (often, but not necessarily, strictly positive) for all large enough values of One writes and it is read " is big O of " or more often " is of the order of " if the absolute value of is at most a positive constant multiple of the absolute value of for all sufficiently large values of That is, if there exists a positive real number and a real number such that In many contexts, the assumption that we are interested in the growth rate as the variable goes to infinity or to zero is left unstated, and one writes more simply that The notation can also be used to describe the behavior of near some real number (often, ): we say if there exist positive numbers and such that for all defined with As is non-zero for adequately large (or small) values of both of these definitions can be unified using the limit superior: if And in both of these definitions the limit point (whether or not) is a cluster point of the domains of and i. e., in every neighbourhood of there have to be infinitely many points in common. Moreover, as pointed out in the article about the limit inferior and limit superior, the (at least on the extended real number line) always exists.

In computer science, a slightly more restrictive definition is common: and are both required to be functions from some unbounded subset of the positive integers to the nonnegative real numbers; then if there exist positive integer numbers and such that for all

In typical usage the notation is asymptotical, that is, it refers to very large . In this setting, the contribution of the terms that grow "most quickly" will eventually make the other ones irrelevant. As a result, the following simplification rules can be applied:

For example, let , and suppose we wish to simplify this function, using notation, to describe its growth rate as . This function is the sum of three terms: , , and . Of these three terms, the one with the highest growth rate is the one with the largest exponent as a function of , namely . Now one may apply the second rule: is a product of and in which the first factor does not depend on . Omitting this factor results in the simplified form . Thus, we say that is a "big O" of . Mathematically, we can write . One may confirm this calculation using the formal definition: let and . Applying the formal definition from above, the statement that is equivalent to its expansion, for some suitable choice of a real number and a positive real number and for all . To prove this, let and . Then, for all : so

See all
User Avatar
No comments yet.