FACTOID # 18: Alaska spends more money per capita on elementary and secondary education than any other state.
 
 Home   Encyclopedia   Statistics   States A-Z   Flags   Maps   FAQ   About 
 
WHAT'S NEW
 

SEARCH ALL

FACTS & STATISTICS    Advanced view

Search encyclopedia, statistics and forums:

 

 

(* = Graphable)

 

 


Encyclopedia > Big O notation

In computational complexity theory, big O notation is often used to describe how the size of the input data affects an algorithm's usage of computational resources (usually running time or memory). It is also called Big Oh notation, Landau notation, Bachmann-Landau notation, and asymptotic notation. Big O notation is also used in many other scientific and mathematical fields to provide similar estimations. As a branch of the theory of computation in computer science, computational complexity theory investigates the problems related to the amounts of resources required for the execution of algorithms (e. ... Flowcharts are often used to graphically represent algorithms. ... In computational complexity theory, a computational resource is a resource used by some computational model in the solution of computational problems. ...


The symbol O is used to describe an asymptotic upper bound for the magnitude of a function in terms of another, usually simpler, function. There are also other symbols o, Ω, ω, and Θ for various other upper, lower, and tight bounds. Informally, the O notation is commonly employed to describe an asymptotic tight bound, but tight bounds are more formally and precisely denoted by the Θ (capital theta) symbol as described below. This distinction between upper and tight bounds is useful, and sometimes critical; most computer scientists would urge distinguishing the usage of O and Θ. In some other fields, however, the Θ notation is not commonly known. In mathematics and applications, particularly the analysis of algorithms, asymptotic analysis is a method of classifying limiting behaviour, by concentrating on some trend. ... In mathematics, especially in order theory, an upper bound of a subset S of some partially ordered set is an element which is greater than or equal to every element of S. The term lower bound is defined dually. ... The magnitude of a mathematical object is its size: a property by which it can be larger or smaller than other objects of the same kind; in technical terms, an ordering of the class of objects to which it belongs. ... Look up Θ, θ in Wiktionary, the free dictionary. ...

Contents

Usage

Big O notation has two main areas of application: in mathematics, it is usually used to characterize the residual term of a truncated infinite series, especially an asymptotic series; in computer science, it is useful in the analysis of the complexity of algorithms. For other meanings of mathematics or uses of math and maths, see Mathematics (disambiguation) and Math (disambiguation). ... In mathematics, a series is a sum of a sequence of terms. ... In mathematics and applications, particularly the analysis of algorithms, asymptotic analysis is a method of classifying limiting behaviour, by concentrating on some trend. ... Computer science, or computing science, is the study of the theoretical foundations of information and computation and their implementation and application in computer systems. ... To analyze an algorithm is to determine the amount of resources (such as time and storage) necessary to execute it. ... As a branch of the theory of computation in computer science, computational complexity theory investigates the problems related to the amounts of resources required for the execution of algorithms (e. ... Flowcharts are often used to graphically represent algorithms. ...


The notation was first introduced by number theorist Paul Bachmann in 1894, in the second volume of his book Analytische Zahlentheorie ("analytic number theory"), the first volume of which (not yet containing big O notation) was published in 1892. The notation was popularized in the work of another German number theorist Edmund Landau, hence it is sometimes called a Landau symbol. The big-O, standing for "order of", was originally a capital omicron; today the identical-looking Latin capital letter O is also used, but never the digit zero. Paul Gustav Heinrich Bachmann (June 22, 1837 - March 31, 1920) was a German mathematician. ... Number theory is the branch of pure mathematics concerned with the properties of numbers in general, and integers in particular, as well as the wider classes of problems that arise from their study. ... Edmund Georg Hermann (Yehezkel) Landau (February 14, 1877 – February 19, 1938) was a German Jew mathematician and author of over 250 papers on number theory. ... Look up Ο, ο in Wiktionary, the free dictionary. ... Look up O, o in Wiktionary, the free dictionary. ... Zero redirects here. ...


There are two formally close, but noticeably different, usages of this notation: infinite asymptotics and infinitesimal asymptotics. This distinction is only in application and not in principle, however—the formal definition for the "big O" is the same for both cases, only with different limits for the function argument. Infinity is a word carrying a number of different meanings in mathematics, philosophy, theology and everyday life. ... Infinitesimals have been used to express the idea of objects so small that there is no way to see them or to measure them. ...


Equals or member-of and other notational anomalies

In a way to be made precise below, O(f(x)) denotes the collection of functions of the variable x that exhibit a growth that is limited to that of f(x) in some respect. The traditional notation for stating that g(x) belongs to this collection is:

g(x) = O(f(x)),.

This use of the equals sign is an abuse of notation, as the above statement is not an equation. It is improper to conclude from g(x) = O(f(x)) and h(x) = O(f(x)) that g(x) and h(x) are equal. One way to think of this is to consider "= O" one symbol here. To avoid the anomalous use, some authors prefer to write instead: The equal sign, equals sign, or = is a mathematical symbol used to indicate equality. ... In mathematics, abuse of notation occurs when an author uses a mathematical notation in a way that is not formally correct but that seems likely to simplify the exposition (while being unlikely to introduce errors or cause confusion). ... An equation is a mathematical statement, in symbols, that two things are the same (or equivalent). ...

g in O(f),,

without difference in meaning.


The common arithmetic operations are often extended to the class concept. For example, h(x) + O(f(x)) denotes the collection of functions having the growth of h(x) plus a part whose growth is limited to that of f(x). Thus,

g(x) = h(x) + O(f(x)),

expresses the same as

g(x) - h(x) in O(f(x)),.

Another anomaly of the notation, although less exceptional, is that it does not make explicit which variable is the function argument, which may need to be inferred from the context if several variables are involved. The following two right-hand side big O notations have dramatically different meanings:

f(m) = O(m^n),,
g(n),, = O(m^n),.

The first case states that f(m) exhibits polynomial growth, while the second, assuming m > 1, states that g(n) exhibits exponential growth. So as to avoid all possible confusion, some authors use the notation

g in O(f),,

meaning the same as what is denoted by others as

g(x) in O(f(x)),.

A final anomaly is that the notation does not make clear "where" the function growth is to be considered; infinitesimally near some point, or in the neighbourhood of infinity. This is in contrast with the usual notation for limits. Similar terminological and notational devices as for limits would resolve both this and the preceding anomaly, but are not in use. Wikibooks Calculus has a page on the topic of Limits In mathematics, the concept of a limit is used to describe the behavior of a function as its argument either gets close to some point, or as it becomes arbitrarily large; or the behavior of a sequences elements as...


Infinite asymptotics

Big O notation is useful when analyzing algorithms for efficiency. For example, the time (or the number of steps) it takes to complete a problem of size n might be found to be T(n) = 4n² − 2n + 2. To analyze an algorithm is to determine the amount of resources (such as time and storage) necessary to execute it. ...


As n grows large, the n² term will come to dominate, so that all other terms can be neglected — for instance when n = 500, the term 4n² is 1000 times as large as the 2n term. Ignoring the latter would have negligible effect on the expression's value for most purposes. In elementary mathematics, a term is either a single number or variable, or the product of several numbers and/or variables. ...


Further, the coefficients become irrelevant as well if we compare to any other order of expression, such as an expression containing a term n³ or n². Even if T(n) = 1,000,000n², if U(n) = n³, the latter will always exceed the former once n grows larger than 1,000,000 (T(1,000,000) = 1,000,000³ = U(1,000,000)). For other senses of this word, see coefficient (disambiguation). ...


So the big O notation captures what remains: we write any of

T(n) = O(n2)
T(n)in O(n^2)

(read as "big o of n squared") and say that the algorithm has order of n² time complexity.


Infinitesimal asymptotics

Big O can also be used to describe the error term in an approximation to a mathematical function. For example,

e^x=1+x+frac{x^2}{2!}+O(x^3)qquadhbox{as} xto 0

expresses the fact that the error, the difference e^x - left(1 + x +frac{x^2}{2}right), is smaller in absolute value than some constant times left|x^3right| when x is close enough to 0. In mathematics, the absolute value (or modulus[1]) of a real number is its numerical value without regard to its sign. ...


Formal definition

Suppose f(x) and g(x) are two functions defined on some subset of the real numbers. We say In mathematics, the real numbers may be described informally as numbers that can be given by an infinite decimal representation, such as 2. ...

Theory of O-Notation: f is in the order of g (i.e. f(x) = O(g(x))) if and only if there exists a positive real number M and a real number x0 such that for all x,, wherever x > x0
Theory of O-Notation: f is in the order of g (i.e. f(x) = O(g(x))) if and only if there exists a positive real number M and a real number x0 such that for all x,|f(x)|le Mcdot g(x), wherever x > x0
f(x)mbox{ is }O(g(x))mbox{ as }xtoinfty

if and only if Image File history File links Yorick215. ... Image File history File links Yorick215. ... ↔ ⇔ ≡ logical symbols representing iff. ...

exists ;x_0,exists ;M>0mbox{ such that } |f(x)| le ; M |g(x)|mbox{ for }x>x_0.

The notation can also be used to describe the behavior of f near some real number a: we say

f(x)mbox{ is }O(g(x))mbox{ as }xto a

if and only if

exists ;delta >0,exists ; M>0mbox{ such that }|f(x)| le ; M |g(x)|mbox{ for }|x - a| < delta.

If g(x) is non-zero for values of x sufficiently close to a, both of these definitions can be unified using the limit superior: In mathematics, the limit inferior and limit superior of a sequence can be thought of as limiting bounds on the sequence. ...

f(x)mbox{ is }O(g(x))mbox{ as }x to a

if and only if

limsup_{xto a} left|frac{f(x)}{g(x)}right| < infty.

These absolute value bars may be left out.


Example

Take the polynomials: In mathematics, a polynomial is an expression that is constructed from one variable or more variables and constants, using only the operations of addition, subtraction, multiplication, and constant positive whole number exponents. ...

 f(x) = 6x^4 -2x^3 +5 ,
 g(x) = x^4. ,

We say f(x) has order O(g(x)) or O(x4) (as  xtoinfty )


From the definition of order

|f(x)| le ; M |g(x)|mbox{ for }x>x_0.


Proof:

for all x > 1 (we take x0 = 1):
 |6x^4 - 2x^3 + 5| le 6x^4 + 2x^3 + 5 ,
 |6x^4 - 2x^3 + 5| le 6x^4 + 2x^4 + 5x^4 ,
 |6x^4 - 2x^3 + 5| le 13x^4 ,
 |6x^4 - 2x^3 + 5| le 13 ,|x^4 |. ,                       where M = 13 in this example

Matters of notation

The statement "f(x) is O(g(x))" as defined above is usually written as f(x) = O(g(x)). This is a slight abuse of notation; equality of two functions is not asserted, and it cannot be since the property of being O(g(x)) is not symmetric: In mathematics, abuse of notation occurs when an author uses a mathematical notation in a way that is not formally correct but that seems likely to simplify the exposition (while being unlikely to introduce errors or cause confusion). ...

O(x)=O(x^2)mbox{ but }O(x^2)ne O(x).

There is also a second reason why that notation is not precise. The symbol f(x) means the value of the function f for the argument x. Hence the symbol of the function is f and not f(x).


For these reasons, some authors prefer set notation and write f in O(g), thinking of O(g) as the set of all functions dominated by g. Mathematical notation is used in mathematics, and throughout the physical sciences, engineering, and economics. ...


In more complex usage, O( ) can appear in different places in an equation, even several times on each side. For example, the following are true for ntoinfty

(n + 1)2 = n2 + O(n)
(n+O(n^{1/2}))(n + O(log,n))^2 = n^3 + O(n^{5/2})
nO(1) = O(en)

The meaning of such statements is as follows: for any functions which satisfy each O( ) on the left side, there are some functions satisfying each O( ) on the right side, such that substituting all these functions into the equation makes the two sides equal. For example, the third equation above means: "For any function f(n)=O(1), there is some function g(n)=O(en) such that nf(n)=g(n)." In terms of the "set notation" above, the meaning is that the class of functions represented by the left side is a subset of the class of functions represented by the right side.


Orders of common functions

Here is a list of classes of functions that are commonly encountered when analyzing algorithms. All of these are as n increases to infinity. The slower-growing functions are listed first. c is an arbitrary constant.

Notation Name Example
Oleft(1right) constant Determining if a number is even or odd
Oleft(alpha(n)right) inverse Ackermann Amortized time per operation when using a disjoint-set (union-find) data structure
Oleft(log^* nright) iterated logarithmic The find algorithm of Hopcroft and Ullman on a disjoint set
Oleft(log log nright) log log n
Oleft(log nright) logarithmic Finding an item in a sorted array with the binary search algorithm
Oleft(left(log nright)^cright) polylogarithmic Deciding if n is prime with the AKS primality test
Oleft({n^c}right), 0<c<1 fractional power Searching in a kd-tree
Oleft(nright) linear Finding an item in an unsorted list, adding two n-digit numbers.
Oleft(nlog nright) linearithmic, loglinear, or quasilinear Sorting a list with heapsort, performing an FFT
Oleft({n^2}right) quadratic Sorting a list with insertion sort, multiplying two n-digit numbers by simple algorithm, adding of two n×n matrices.
Oleft({n^3}right) cubic Multiplying two n×n matrices by simple algorithm.
Oleft({n^c}right), c>1 polynomial, sometimes called algebraic Finding the shortest path on a weighted digraph with the Floyd-Warshall algorithm
Ln[α,c],0 < α < 1
=e^{(c+o(1)) (ln n)^alpha (ln ln n)^{1-alpha}}
L-notation Factoring a number using the special or general number field sieve
Oleft({c^n}right) exponential, sometimes called geometric Determining if two logical statements are equivalent using brute force; finding the (exact) solution to the traveling salesman problem using dynamic programming.
Oleft(n!right) factorial, sometimes called combinatorial Determining if two logical statements are equivalent[1]; solving the traveling salesman problem via brute-force search; finding the determinant of a matrix with expansion by minors.
Oleft({n^n}right) n to the n Often used instead of Oleft(n!right) to derive simpler formulas for asymptotic complexity.
c_1^{O(c^n)} double exponential Finding a complete set of associative-commutative unifiers[2]

Not as common, but even larger growth is possible, such as the single-valued version of the Ackermann function, A(n,n). In mathematics and the mathematical sciences, a constant is a fixed, but possibly unspecified, value. ... In recursion theory, the Ackermann function or Ackermann-Péter function is a simple example of a general recursive function that is not primitive recursive. ... In computational complexity theory, amortized analysis is the time per operation averaged over a worst_case sequence of operations. ... Given a set of elements, it is often useful to break them up or partition them into a number of separate, nonoverlapping sets. ... In computer science, the iterated logarithm of n, written log*n, is the number of times the logarithm function must be iteratively applied before the result is less than or equal to 1. ... John Hopcroft John E. Hopcroft (born October 7, 1939) is a renowned theoretical computer scientist and the grandson of Jacob Nist, founder of the Seattle Box Company. ... Jeffrey D. Ullman (born November 22, 1942) is a renowned computer scientist. ... Given a set of elements, it is often useful to break them up or partition them into a number of separate, nonoverlapping sets. ... -1... A binary search algorithm (or binary chop) is a technique for finding a particular value in a sorted list. ... A polylogarithmic function in n is a polynomial in the logarithm of n, In computer science, polylogarithmic functions occur as the order of some algorithms (eg. ... The AKS primality test (also known as Agrawal-Kayal-Saxena primality test and cyclotomic AKS test) is a deterministic primality-proving algorithm created and published by three Indian scientists named Manindra Agrawal, Neeraj Kayal and Nitin Saxena on August 6, 2002 in a paper titled PRIMES is in P. The... A 3-dimensional kd-tree. ... For other uses, see Linear (disambiguation). ... This article does not cite any references or sources. ... A run of the heapsort algorithm sorting an array of randomly permuted values. ... The Fast Fourier Transform (FFT) is an efficient algorithm to compute the discrete Fourier transform (DFT) and its inverse. ... f(x) = x2 - x - 2 A quadratic function, in mathematics, is a polynomial function of the form , where . ... Example of insertion sort sorting a list of random numbers. ... Graph of a cubic function; the roots are where the curve crosses the x-axis (y = 0). ... In mathematics, a polynomial is an expression that is constructed from one variable or more variables and constants, using only the operations of addition, subtraction, multiplication, and constant positive whole number exponents. ... In computer science, the Floyd–Warshall algorithm (sometimes known as the Roy–Floyd algorithm, since Bernard Roy described this algorithm in 1959) is a graph analysis algorithm for finding shortest paths in a weighted, directed graph. ... The L-notation is widely used to express the computational complexity of an algorithm. ... The special number field sieve (SNFS) is a special-purpose integer factorization algorithm. ... In mathematics, the general number field sieve (GNFS) is the most efficient algorithm known for factoring integers larger than 100 digits. ... The exponential function is one of the most important functions in mathematics. ... Diagram showing the geometric series 1 + 1/2 + 1/4 + 1/8 + ... which converges to 2. ... In computer science, a brute-force search consists of systematically enumerating every possible solution of a problem until a solution is found, or all possible solutions have been exhausted. ... The traveling salesman problem (TSP), is a problem in discrete or combinatorial optimization. ... In mathematics and computer science, dynamic programming is a method of solving problems exhibiting the properties of overlapping subproblems and optimal substructure (described below) that takes much less time than naive methods. ... For factorial rings in mathematics, see unique factorisation domain. ... The traveling salesman problem (TSP), is a problem in discrete or combinatorial optimization. ... In computer science, a brute-force search consists of systematically enumerating every possible solution of a problem until a solution is found, or all possible solutions have been exhausted. ... In algebra, a determinant is a function depending on n that associates a scalar, det(A), to every n×n square matrix A. The fundamental geometric meaning of a determinant is as the scale factor for volume when A is regarded as a linear transformation. ... Look up matrix in Wiktionary, the free dictionary. ... A double exponential function is a constant raised to the power of an exponential function. ... In recursion theory, the Ackermann function or Ackermann-Péter function is a simple example of a general recursive function that is not primitive recursive. ...


For any k>0 and c>0, O(nc(log n)k) is subset of O(n(c+a)) for any a>0. So O(nc(log n)k) may be considered as polynomial with some bigger order.


Properties

If a function f(n) can be written as a finite sum of other functions, then the fastest growing one determines the order of f(n). For example

f(n) = 9 log n + 5 (log n)^3 + 3n^2 + 2n^3 in O(n^3),!.

In particular, if a function may be bounded by a polynomial in n, then as n tends to infinity, one may disregard lower-order terms of the polynomial.


O(nc) and O(cn) are very different. The latter grows much, much faster, no matter how big the constant c is (as long as it is greater than one). A function that grows faster than any power of n is called superpolynomial. One that grows more slowly than any exponential function of the form cn is called subexponential. An algorithm can require time that is both superpolynomial and subexponential; examples of this include the fastest known algorithms for integer factorization. Prime decomposition redirects here. ...


O(logn) is exactly the same as O(log(nc)). The logarithms differ only by a constant factor, (since log(nc) = clogn) and thus the big O notation ignores that. Similarly, logs with different constant bases are equivalent. Exponentials with different bases, on the other hand, are not of the same order; assuming that they are is a common mistake. For example, 2n and 3n are not of the same order.


Changing units may or may not affect the order of the resulting algorithm. Changing units is equivalent to multiplying the appropriate variable by a constant wherever it appears. For example, if an algorithm runs in the order of n2, replacing n by cn means the algorithm runs in the order of c2n2, and the big O notation ignores the constant c2. This can be written as  c^2n^2 in O(n^2) . If, however, an algorithm runs in the order of 2n, replacing n with cn gives 2cn = (2c)n. This is not equivalent to 2n (unless, of course, c=1).


Changing of variable may affect the order of the resulting algorithm. For example, if an algorithm runs on the order of O(n) when n is the number of digits of the input number, then it has order O(log n) when n is the input number itself.


Product

 f_1 in O(g_1) wedge f_2in O(g_2), implies f_1 f_2in O(g_1 g_2),
fcdot O(g) in O(f g)

Sum

 f_1 in O(g_1) wedge f_2in O(g_2), implies f_1 + f_2in O(g_1 + g_2),
This implies f_1 in O(g) land f_2 in O(g) implies f_1+f_2 in O(g) , which means that O(g) is a convex cone.
f + O(g) in O(f + g)

In linear algebra, a convex cone is a subset of a vector space that is closed under linear combinations with positive coefficients. ...

Multiplication by a constant

Let  k in R_{>0} .
O(k cdot g) = O(g)
fin O(g) Rightarrow kcdot fin O(g)

Related asymptotic notations

Big O is the most commonly used asymptotic notation for comparing functions, although in many cases Big O may be replaced with Θ for asymptotically tighter bounds (Theta, see below). Here, we define some related notations in terms of "big O": Look up Θ, θ in Wiktionary, the free dictionary. ...


Little-o notation

The relation f(x) in o(g(x)) is read as "f(x) is little-o of g(x)". Intuitively, it means that g(x) grows much faster than f(x). It assumes that f and g are both functions of one variable. Formally, it states that the limit of f(x) / g(x) is zero, as x approaches infinity. For algebraically defined functions f(x) and g(x), lim_{x to infty}f(x)/g(x) is generally found using L'Hôpital's rule. Wikibooks Calculus has a page on the topic of Limits In mathematics, the concept of a limit is used to describe the behavior of a function as its argument either gets close to some point, or as it becomes arbitrarily large; or the behavior of a sequences elements as... In calculus, lHôpitals rule (also spelled lHospital) uses derivatives to help compute limits with indeterminate forms. ...


For example,

  • 2x in o(x^2) ,!
  • 2x^2 not in o(x^2)
  • 1/x in o(1)

Little-o notation is common in mathematics but rarer in computer science. In computer science the variable (and function value) is most often a natural number. In math, the variable and function values are often real numbers. The following properties can be useful:

  • o(f) + o(f) subseteq o(f)
  • o(f)o(g) subseteq o(fg)
  • o(o(f)) subseteq o(f)
  • o(f) subset O(f) (and thus the above properties apply with most combinations of o and O).

As with big O notation, the statement "f(x) is o(g(x))" is usually written as f(x) = o(g(x)), which is a slight abuse of notation.


Other related notations

Notation Intuition Definition
f(n) in O(g(n)) f is bounded above by g (up to constant factor) asymptotically exists (C>0), n_0 : forall(n>n_0) ; |f(n)| leq |Cg(n)| or  exists (C>0), n_0 : forall(n>n_0) ; f(n) leq Cg(n)
f(n) in Omega(g(n)) f is bounded below by g (up to constant factor) asymptotically exists (C>0), n_0 : forall (n>n_0) ; |Cg(n)| leq |f(n)|
f(n) in Theta(g(n)) f is bounded both above and below by g asymptotically exists (C,C'>0), n_0 : forall (n>n_0) ; |Cg(n)| < |f(n)| < |C'g(n)|
f(n) in o(g(n)) f is dominated by g asymptotically forall (C>0),exists n_0 : forall(n>n_0) ; |f(n)| < |Cg(n)|
f(n) in omega(g(n)) f dominates g asymptotically forall (C>0),exists n_0 : forall(n>n_0) ; |Cg(n)| < |f(n)|
f(n) sim g(n) f is equal to g asymptotically lim_{n to infty} frac{f(n)}{g(n)} = 1

(A mnemonic for these Greek letters is that "omicron" can be read "o-micron", i.e., "o-small", whereas "omega" can be read "o-mega" or "o-big".)


Aside from big-O, the notations Θ and Ω are the two most often used in computer science; The lower-case ω is rarely used.


Another notation sometimes used in computer science is Õ (read soft-O). f(n) = tilde{O} (g(n)) is shorthand for f(n) = O(g(n)logkg(n)) for some k. Essentially, it is Big-O, ignoring logarithmic factors. This notation is often used to describe a class of "nitpicking" estimates (since logkn is always o(nε) for any constant k and any ε > 0).


The L notation, defined as The L-notation is widely used to express the computational complexity of an algorithm. ...

L_n[alpha, c] = Oleft(e^{((c + o(1))(ln n)^alpha(lnln n)^{1-alpha})}right),

is convenient for functions that are between polynomial and exponential.


Multiple variables

Big O (and little o, and Ω...) can also be used with multiple variables.


To define Big O formally for multiple variables, suppose f(vec{x}) and g(vec{x}) are two functions defined on some subset of mathbb{R}^n. We say

f(vec{x})mbox{ is }O(g(vec{x}))mbox{ as }vec{x}toinfty

if and only if ↔ ⇔ ≡ logical symbols representing iff. ...

exists ;C,exists ;M>0mbox{ such that } |f(vec{x})| le ; M |g(vec{x})|mbox{ for all }vec{x} mbox{ with } x_i>C mbox{ for all }i.

For example, the statement

f(n,m) = n^2 + m^3 + hbox{O}(n+m) mbox{ as } n,mtoinfty

asserts that there exist constants C and M such that

forall n, m>M: |g(n,m)| le C(n+m).

where g(n,m) is defined by

displaystyle f(n,m) = n^2 + m^3 + g(n,m).

Note that this definition allows all of the coordinates of vec{x} to increase to infinity. In particular, the statement

f(n,m) = hbox{O}(n^m) mbox{ as } n,mtoinfty

(i.e. exists C exists M forall n forall m...) is quite different from

forall m: f(n,m) = hbox{O}(n^m) mbox{ as } ntoinfty

(i.e. forall m exists C exists M forall n...).


Graph theory

It is often useful to bound the running time of graph algorithms. Unlike most other computational problems, for a graph G = (V, E) there are two relevant parameters describing the size of the input: the number |V| of vertices in the graph and the number |E| of edges in the graph. Inside asymptotic notation (and only there), it is common to use the symbols V and E, when someone really means |V| and |E|. We adopt this convention here to simplify asymptotic functions and make them easily readable. The symbols V and E are never used inside asymptotic notation with their literal meaning, so this abuse of notation does not risk ambiguity. For example O(E + VlogV) means O((E,V) mapsto |E| + |V|cdotlog|V|) for a suitable metric of graphs. Another common convention—referring to the values |V| and |E| by the names n and m, respectively—sidesteps this ambiguity. An asymptote is a straight or curved line which a curve will approach, but never touch. ...


Generalizations and related usages

The generalization to functions taking values in any normed vector space is straightforward (replacing absolute values by norms), where f and g need not take their values in the same space. A generalization to functions g taking values in any topological group is also possible. In mathematics, with 2- or 3-dimensional vectors with real-valued entries, the idea of the length of a vector is intuitive and can easily be extended to any real vector space Rn. ... In mathematics, a topological group G is a group that is also a topological space such that the group multiplication G × G → G and the inverse operation G → G are continuous maps. ...


The "limiting process" x→xo can also be generalized by introducing an arbitrary filter base, i.e. to directed nets f and g. In mathematics, a filter is a special subset of a partially ordered set. ... In topology and related areas of mathematics a net or Moore-Smith sequence is a generalization of a sequence, intended to unify the various notions of limit and generalize them to arbitrary topological spaces. ...


The o notation can be used to define derivatives and differentiability in quite general spaces, and also (asymptotical) equivalence of functions, For other uses, see Derivative (disambiguation). ... In mathematics, the derivative of a function is one of the two central concepts of calculus. ...

 fsim g iff (f-g) in o(g)

which is an equivalence relation and a more restrictive notion than the relationship "f is Θ(g)" from above. (It reduces to lim f/g = 1 if f and g are positive real valued functions.) For example, 2x is Θ(x), but 2x − x is not o(x). In mathematics, an equivalence relation is a binary relation between two elements of a set which groups them together as being equivalent in some way. ...


See also

Wikibooks
Wikibooks Data Structures has a page on the topic of

Image File history File links Wikibooks-logo-en. ... Wikibooks logo Wikibooks, previously called Wikimedia Free Textbook Project and Wikimedia-Textbooks, is a wiki for the creation of books. ... In mathematics an asymptotic expansion, asymptotic series or Poincaré expansion (after Henri Poincaré) is a formal series of functions which has the property that truncating the series after a finite number of terms provides an approximation to a given function as the argument of the function tends towards a particular... In computer science, an algorithm is said to be asymptotically optimal if, roughly speaking, for large inputs it performs at worst a constant factor worse than the best possible algorithm. ... In complexity theory and mathematics, the Hardy notation, introduced by G. H. Hardy, is used for asymptotic comparison of functions, equivalently to Landau notation (also known as Big O notation). It is defined in terms of Landau notation by   and   (Similar symbols are used, like resp. ... In mathematics, the limit inferior and limit superior (also called infimum limit and supremum limit) of a sequence can be thought of as limiting bounds on the sequence. ... In mathematics, in the area of complex analysis, Nachbins theorem is commonly used to establish a bound on the growth rates for an analytic function. ... Complex analysis is the branch of mathematics investigating functions of complex numbers. ... In mathematics, an integral transform is any transform T of the following form: The input of this transform is a function f, and the output is another function Tf. ...

References

  1. ^ An Algorithm For Generation In Unification
  2. ^ Double-Exponential Complexity of Computing a Complete Set of AC-Unifiers - Kapur, Narendran (ResearchIndex)

Further reading

  • Paul Bachmann. Die Analytische Zahlentheorie. Zahlentheorie. pt. 2 Leipzig: B. G. Teubner, 1894.
  • Edmund Landau. Handbuch der Lehre von der Verteilung der Primzahlen. 2 vols. Leipzig: B. G. Teubner, 1909.
  • G. H. Hardy. Orders of Infinity: The 'Infinitärcalcül' of Paul du Bois-Reymond, 1910.
  • Marian Slodicka (Slodde vo de maten) & Sandy Van Wontergem. Mathematical Analysis I. University of Ghent, 2004.
  • Donald Knuth. Big Omicron and big Omega and big Theta, ACM SIGACT News, Volume 8, Issue 2, 1976.
  • Donald Knuth. The Art of Computer Programming, Volume 1: Fundamental Algorithms, Third Edition. Addison-Wesley, 1997. ISBN 0-201-89683-4. Section 1.2.11: Asymptotic Representations, pp.107–123.
  • Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. Introduction to Algorithms, Second Edition. MIT Press and McGraw-Hill, 2001. ISBN 0-262-03293-7. Section 3.1: Asymptotic notation, pp.41–50.
  • Michael Sipser (1997). Introduction to the Theory of Computation. PWS Publishing. ISBN 0-534-94728-X.  Pages 226–228 of section 7.1: Measuring complexity.
  • Jeremy Avigad, Kevin Donnelly. Formalizing O notation in Isabelle/HOL
  • Paul E. Black, "big-O notation", in Dictionary of Algorithms and Data Structures [online], Paul E. Black, ed., U.S. National Institute of Standards and Technology. 11 March 2005. Retrieved December 16, 2006.
  • Paul E. Black, "little-o notation", in Dictionary of Algorithms and Data Structures [online], Paul E. Black, ed., U.S. National Institute of Standards and Technology. 17 December 2004. Retrieved December 16, 2006.
  • Paul E. Black, "Ω", in Dictionary of Algorithms and Data Structures [online], Paul E. Black, ed., U.S. National Institute of Standards and Technology. 17 December 2004. Retrieved December 16, 2006.
  • Paul E. Black, "ω", in Dictionary of Algorithms and Data Structures [online], Paul E. Black, ed., U.S. National Institute of Standards and Technology. 29 November 2004. Retrieved December 16, 2006.
  • Paul E. Black, "Θ", in Dictionary of Algorithms and Data Structures [online], Paul E. Black, ed., U.S. National Institute of Standards and Technology. 17 December 2004. Retrieved December 16, 2006.

Paul Gustav Heinrich Bachmann (June 22, 1837 - March 31, 1920) was a German mathematician. ... Edmund Georg Hermann (Yehezkel) Landau (February 14, 1877 – February 19, 1938) was a German Jew mathematician and author of over 250 papers on number theory. ... Godfrey Harold Hardy FRS (February 7, 1877 Cranleigh, Surrey, England [1] – December 1, 1947 Cambridge, Cambridgeshire, England [2]) was a prominent English mathematician, known for his achievements in number theory and mathematical analysis. ... Donald Ervin Knuth ( or Ka-NOOTH[1], Chinese: [2]) (b. ... Donald Ervin Knuth ( or Ka-NOOTH[1], Chinese: [2]) (b. ... Thomas H. Cormen is the co-author of Introduction to Algorithms, along with Charles Leiserson, Ron Rivest, and Cliff Stein. ... Charles E. Leiserson is a computer scientist, specializing in the theory of parallel computing and distributed computing, and particularly practical applications thereof; as part of this effort, he developed the Cilk multithreaded language. ... Professor Ron Rivest Professor Ronald Linn Rivest (born 1947, Schenectady, New York) is a cryptographer, and is the Viterbi Professor of Computer Science at MITs Department of Electrical Engineering and Computer Science. ... Clifford Stein is a computer scientist, currently working as a professor at Columbia University in New York, NY. He earned his BSE from Princeton University in 1987, a MS from Massachusetts Institute of Technology in 1989, and a PhD from Massachusetts Institute of Technology in 1992. ... Cover of the second edition Introduction to Algorithms is a book by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. ... Michael Sipser Michael Sipser is a professor of Applied Mathematics in the Theory of Computation Group at the Massachusetts Institute of Technology. ...

External links


  Results from FactBites:
 
Big O notation - Wikipedia, the free encyclopedia (1649 words)
Big O notation is a mathematical notation used to describe the asymptotic behavior of functions.
Big O notation is useful when analyzing algorithms for efficiency.
Big O is the most commonly used asymptotic notation for comparing functions, although it is often actually an informal substitute for Θ (Theta, see below).
Big O notation (907 words)
Big O notation (with a capital letter O -- originally an omicron -- not a zero), also called Landau's symbol, is a symbolism used in complexity theory, computer science, and mathematics to describe the asymptotic behavior of functions.
Obviously, this notation is abusing the equality symbol, since it violates the axiom of equality: "things equal to the same thing are equal to each other".
In addition to the big O notations, another Landau symbol is used in mathematics: the little o.
  More results at FactBites »

 
 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments

Want to know more?
Search encyclopedia, statistics and forums:

 


Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms, 1022, m