Big O Notation - Formal Definition

Formal Definition

Let f(x) and g(x) be two functions defined on some subset of the real numbers. One writes

if and only if there is a positive constant M such that for all sufficiently large values of x, f(x) is at most M multiplied by g(x) in absolute value. That is, f(x) = O(g(x)) if and only if there exists a positive real number M and a real number x0 such that

In many contexts, the assumption that we are interested in the growth rate as the variable x goes to infinity is left unstated, and one writes more simply that f(x) = O(g(x)). The notation can also be used to describe the behavior of f near some real number a (often, a = 0): we say

if and only if there exist positive numbers δ and M such that

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:

if and only if

Read more about this topic:  Big O Notation

Famous quotes containing the words formal and/or definition:

    The formal Washington dinner party has all the spontaneity of a Japanese imperial funeral.
    Simon Hoggart (b. 1946)

    Mothers often are too easily intimidated by their children’s negative reactions...When the child cries or is unhappy, the mother reads this as meaning that she is a failure. This is why it is so important for a mother to know...that the process of growing up involves by definition things that her child is not going to like. Her job is not to create a bed of roses, but to help him learn how to pick his way through the thorns.
    Elaine Heffner (20th century)