Progressive notation in the algorithm

Source: Internet
Author: User

Objective

When learning computer algorithms, knowing the time complexity of inserting sorting is O (N2), what does the O notation mean? This paper mainly introduces several algorithms used in the analysis of the notation.

Big O Mark

Definition: O (g (n)) = {f (n): There are normal numbers C and n0, so that for all n >= n0, there are 0 <= f (n) <= CG (N)}. The large O notation gives the progressive upper bounds of the function.

, it can be represented as f (n) = O (n2). Prove:

To make the 0 <= f (n) <= CG (N)

The presence of C = 9/2, N0 = 1, makes 0 <= f (n) <= CG (n) for all n >= n0.

O (g (n) and subsequent tokens represent the set, while f (n) = O (n2) is the actual meaning of f (n) ∈o (n2).

Assuming there is,

then g (n) = O (N2), f (n) = O (n2)

Big Omega Mark

Definition: Ω (g (n)) = {f (n): There are normal numbers C and n0, so that for all n >= n0, there are 0 <= CG (n) <= f (N)}. The large Ω notation gives the progressive lower bounds of the function.

Assuming there is,

then g (n) =ω (n), f (n) =ω (n)

Big Theta Sign

Definition: Θ (g (n)) = {f (n): There are normal numbers C1 and C2 and N0, so that for all n >= n0, there are 0 <= c1g (n) <= f (n) <= c2g (N)}. The large θ notation gives the progressive certainty of the function.

Assuming there is,

then g (n) =θ (n), f (n) =θ (n2)

Small o mark

Definition: O (g (n)) = {f (n): for any normal number C, there is a n0, so that for all n >= n0, there are 0 <= f (n) <= CG (N)}. The small O notation gives the upper bounds of the non-progressive tightening of the function.

Assuming there is,

then g (n) = O (N2), f (n) O (n2)

Small Mark

Definition: (g (n)) = {f (n): for any normal number C, there is a n0, so that for all n >= n0, there are 0 <= CG (n) <= f (N)}. A small mark gives the lower bound of a function's non-progressive compact.

Assuming there is,

then g (n) (n), f (n) = (n)

Summarize

Not all functions can be progressively compared, if the limit value does not exist (not equal to 0, constant and infinity). Like what

The limit does not exist and is not equal to infinity.

Transferred from: http://www.cnblogs.com/zabery/archive/2011/07/19/2110994.html

Progressive notation in the algorithm

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.