Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>f ∈ O(g) says, essentially</p> <blockquote> <p>For <strong>at least one</strong> choice of a constant <em>k</em> > 0, you can find a constant <em>a</em> such that the inequality 0 &lt;= f(x) &lt;= k g(x) holds for all x > a. </p> </blockquote> <p>Note that O(g) is the set of all functions for which this condition holds.</p> <p>f ∈ o(g) says, essentially</p> <blockquote> <p>For <strong>every</strong> choice of a constant <em>k</em> > 0, you can find a constant <em>a</em> such that the inequality 0 &lt;= f(x) &lt; k g(x) holds for all x > a.</p> </blockquote> <p>Once again, note that o(g) is a set.</p> <p>In Big-O, it is only necessary that you find a particular multiplier <em>k</em> for which the inequality holds beyond some minimum <em>x</em>. </p> <p>In Little-o, it must be that there is a minimum <em>x</em> after which the inequality holds no matter how small you make <em>k</em>, as long as it is not negative or zero.</p> <p>These both describe upper bounds, although somewhat counter-intuitively, Little-o is the stronger statement. There is a much larger gap between the growth rates of f and g if f ∈ o(g) than if f ∈ O(g). </p> <p>One illustration of the disparity is this: f ∈ O(f) is true, but f ∈ o(f) is false. Therefore, Big-O can be read as "f ∈ O(g) means that f's asymptotic growth is no faster than g's", whereas "f ∈ o(g) means that f's asymptotic growth is strictly slower than g's". It's like <code>&lt;=</code> versus <code>&lt;</code>.</p> <p>More specifically, if the value of g(x) is a constant multiple of the value of f(x), then f ∈ O(g) is true. This is why you can drop constants when working with big-O notation.</p> <p>However, for f ∈ o(g) to be true, then g must include a higher <em>power</em> of x in its formula, and so the relative separation between f(x) and g(x) must actually get larger as x gets larger.</p> <p>To use purely math examples (rather than referring to algorithms):</p> <p>The following are true for Big-O, but would not be true if you used little-o:</p> <ul> <li>x² ∈ O(x²) </li> <li>x² ∈ O(x² + x)</li> <li>x² ∈ O(200 * x²)</li> </ul> <p>The following are true for little-o:</p> <ul> <li>x² ∈ o(x³)</li> <li>x² ∈ o(x!)</li> <li>ln(x) ∈ o(x)</li> </ul> <p>Note that if f ∈ o(g), this implies f ∈ O(g). e.g. x² ∈ o(x³) so it is also true that x² ∈ O(x³), (again, think of O as <code>&lt;=</code> and o as <code>&lt;</code>)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload