User:IssaRice/Little o notation: Difference between revisions

From Machinelearning
 
Line 19: Line 19:


'''Definition''' (little o at infinity). Let <math>f : \mathbf R \to \mathbf R</math> and <math>g : \mathbf R \to \mathbf R</math> be two functions. We say that <math>f</math> is little o of <math>g</math> at positive infinity (or equivalently <math>f(x)</math> is little of <math>g(x)</math> as <math>x \to \infty</math>) iff for every real <math>\epsilon > 0</math> there exists a real number <math>M</math> such that for all <math>x</math>, if <math>x > M</math> then <math>|f(x)| < \epsilon|g(x)|</math>. We say that <math>f</math> is little o of <math>g</math> at negative infinity (or equivalently <math>f(x)</math> is little of <math>g(x)</math> as <math>x \to -\infty</math>) iff for every real <math>\epsilon > 0</math> there exists a real number <math>M</math> such that for all <math>x</math>, if <math>x < M</math> then <math>|f(x)| < \epsilon|g(x)|</math>.
'''Definition''' (little o at infinity). Let <math>f : \mathbf R \to \mathbf R</math> and <math>g : \mathbf R \to \mathbf R</math> be two functions. We say that <math>f</math> is little o of <math>g</math> at positive infinity (or equivalently <math>f(x)</math> is little of <math>g(x)</math> as <math>x \to \infty</math>) iff for every real <math>\epsilon > 0</math> there exists a real number <math>M</math> such that for all <math>x</math>, if <math>x > M</math> then <math>|f(x)| < \epsilon|g(x)|</math>. We say that <math>f</math> is little o of <math>g</math> at negative infinity (or equivalently <math>f(x)</math> is little of <math>g(x)</math> as <math>x \to -\infty</math>) iff for every real <math>\epsilon > 0</math> there exists a real number <math>M</math> such that for all <math>x</math>, if <math>x < M</math> then <math>|f(x)| < \epsilon|g(x)|</math>.
'''Exercise'''. Show that in the definition of little o at positive infinity, "there exists a real number <math>M</math>" can be replaced by "there exists a real number <math>M > 0</math>". Show that in the definition of little o at negative infinity, "there exists a real number <math>M</math>" can be replaced by "there exists a real number <math>M < 0</math>".


'''Exercise'''. Can we write just <math>f \in o(g)</math> or <math>f = o(g)</math> or <math>f(x) \in o(g(x))</math> or <math>f(x) = o(g(x))</math>?
'''Exercise'''. Can we write just <math>f \in o(g)</math> or <math>f = o(g)</math> or <math>f(x) \in o(g(x))</math> or <math>f(x) = o(g(x))</math>?

Latest revision as of 17:29, 29 November 2018

Definition

Definition (little o near a point). Let f:R→R and g:R→R be two functions, and let a∈R. We say that f is little o of g near a iff for every ϵ>0 there exists δ>0 such that |x−a|<δ implies |f(x)|<ϵ|g(x)|. Some equivalent ways to say the same thing are:

Notation Comments
f is little o of g near a This is a point-free notation.
f(x)∈o(g(x)) as x→a This is in point notation, as the variable x appears in the notation. This allows us to define functions anonymously. For example, we can say x2∈o(x) as x→0; we didn't even name the functions. As the appearance of the symbol "∈" suggests, in this notation we think of o(g(x)) as a set, namely the set of all functions that are o(g(x)) as x→a.
f(x)=o(g(x)) as x→a This is in point notation. As the equality symbol suggests, in this notation we think of f as a concrete manifestation of a function that is o(g(x)) near a. This allows us to algebraically manipulate the expression o(g(x)) along with all our other expressions.
f∈o(g) near a This is a point-free notation. As the appearance of the symbol "∈" suggests, in this notation we think of o(g) as a set, namely the set of all functions that are o(g) near a. In other words, o(g)={f:∀ϵ>0∃δ>0∀x(|x−a|<δ⟹|f(x)|<ϵ|g(x)|)}
f=o(g) near a This is a point-free notation.

Definition (little o at infinity). Let f:R→R and g:R→R be two functions. We say that f is little o of g at positive infinity (or equivalently f(x) is little of g(x) as x→∞) iff for every real ϵ>0 there exists a real number M such that for all x, if x>M then |f(x)|<ϵ|g(x)|. We say that f is little o of g at negative infinity (or equivalently f(x) is little of g(x) as x→−∞) iff for every real ϵ>0 there exists a real number M such that for all x, if x<M then |f(x)|<ϵ|g(x)|.

Exercise. Show that in the definition of little o at positive infinity, "there exists a real number M" can be replaced by "there exists a real number M>0". Show that in the definition of little o at negative infinity, "there exists a real number M" can be replaced by "there exists a real number M<0".

Exercise. Can we write just f∈o(g) or f=o(g) or f(x)∈o(g(x)) or f(x)=o(g(x))?

Expand to see solution:

In general we can't because for this notation to make sense, we also need to know where the argument x is going. In algorithms, we have x→∞, but in analysis (e.g. in some definitions of differentiability) we have x→0.

Exercise. If we are being a little pedantic, what is wrong with saying "f∈o(g) as x→a"?

Expand to see solution:

We are saying x→a, but we haven't clarified what x is. Instead, we are relying on the reader to assume that x is an argument to f and g.

Exercise. Interpret the meaning of x2∈o(x).

Expand to see solution:

It depends on where x is going. We want |x2|<ϵ|x| whenever |x−a|<δ, so this is only true when a=0.

Properties

Proposition. Let f:R→R and g:R→R be two functions, and suppose g(x)≠0 for all x∈R. Then f is little o of g near a if and only if limx→af(x)g(x)=0.

Proposition. transitivity

Proposition. we can replace the < in the definition with ≤, right?

Exercise. Let c,x0∈R be constants. Interpret the statement "o(c(x−x0)+o(x−x0))∈o(x−x0) as x→x0".

Expand to see solution:

TODO: be careful with universal vs existential quantifiers.

The statement is saying f(x)∈o(x−x0) where f is some function such that limx→x0f(x)c(x−x0)+o(x−x0)=0.

Because of the nested little o, we need to expand again and introduce g, where g(x)∈o(x−x0) so limx→x0g(x)x−x0=0.

Now we verify:

limx→x0f(x)x−x0=limf(x)c(x−x0)+g(x)limc(x−x0)+g(x)x−x0=0⋅(c+0)=0

Could g have been arbitrary? In other words, could we have said o(c(x−x0)+o(h(x)))∈o(x−x0) for arbitrary h(x)? To compute the limit limx→x0f(x)x−x0 we actually used the limit laws, which require that the right hand limit exist. This means that we needed limx→x0g(x)/h(x) to exist.

References

[1]

[2]