Algorithm analysis of progressive symbols (O, O, Θ, ω, ω) sums up __ algorithm

Source: Internet
Author: User

"Asymptotic notation" is used to express "asymptotically complex degree".

1. Asymptotic notation includes:

(1) Theta (theta): tight bounds. Equivalent to "="

(2)              O (Greater Europe): upper bound. The equivalent of "<="

(3) O (Theo): not tight upper bound. Equivalent to "<"

(4) Ω (large Omega): Lower bound. The equivalent of ">="

(5) Ω (small Omega): not a tight lower bound. Equivalent to ">"

Give the definition of these tokens:

Note: asymptotic nonnegative means "when n tends to infinity, f (n) and g (n) are nonnegative".

2. Use set theory to denote the relationship between these 5 symbols:

As you can see from the diagram above:

(1) if f (n) =θ (g (n)), then f (n) =o (g (n)) and f (n) =ω (g (n)).

(2) if f (n) = O (g (n)), then f (n) =o (g (n)).

(3) if f (n) =ω (g (n)), then f (n) =ω (g (n)).

Therefore, the most accurate use of these asymptotic notation should be "f (n) ∈o (g (n))", but it is generally written as "F (n) =o (g (n))".

Give some examples:

O (n^2) can be n,2n,1,2n^2 and so on.

Θ (n^2) can be n^2,3n^2 and so on.

Ω (n^2) can be n^3,n^10, but not n^2.

Ω (n^2) can be n^2,n^3,n^10 and so on.

O (n^2) can be n,1,3n, but not n^2.

3. To judge the asymptotic relationship of two functions

Here we have a very common method called "limit Method".

Seeing the above method, a lot of people will ask "why not O and ω." , because if f (n) =o (g (n)) is either f (n) = O (g (n)), or F (n) =θ (g (n)).

4. Relevant laws

5. Commonly used function order

The following is a list of functional classifications that are common when analyzing algorithms. All of these functions are on the verge of infinity, and the slower-growing functions are listed above. is an arbitrary constant.

Symbol

Name

Constant (order, same below)

Logarithmic

Multiple logarithm

Linear, sub Linear

is the iterated logarithm

Linear logarithm, or logarithmic linear, quasi-linear, hyper-linear

Square

Polynomial, sometimes called "algebra" (order)

Exponent, sometimes called "geometry" (order)

Factorial, sometimes called "combination" (order)

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.