Introduction to algorithms------asymptotic notation θ, 0, O, ω, ω detailed

Source: Internet
Author: User
Directory: 1. Asymptotic precision boundary notation: θθ (Big-theta) 2. Asymptotic upper bound mark: o O (Big-oh) 3. Asymptotic Nether notation: ωω (Big-omege) 4. Upper bound of non-asymptotic tightening: O (small-oh) 5. Non-asymptotic tight bound: Ω (small-omege) 6. Asymptotic notation Θ, 0, O, ω, ω Relationship 7. Reference 1. Asymptotic precision boundary notation: θθ (Big-theta)

Assume that the run-time expression of algorithm a T1 (n) t_1 (n) is: T1 (n) =30n4+20n3+40n2+46n+100 t_1 (n) =30n^4+20n^3+40n^2+46n+100
Suppose the run-time expression of algorithm B T2 (n) t_2 (n) is: T2 (n) =1000n3+50n2+78n+10 t_2 (n) =1000n^3+50n^2+78n+10
When the problem is large enough, such as n=100, the run time of the algorithm will depend mainly on the first item of the time expression, and the execution time of the other item is only a few one out of 10,000 of it, which is negligible. The constant coefficient of the first item, with the increase of N, also becomes unimportant to the execution time of the algorithm.
Thus, the run time of algorithm A can be recorded as: T1 (n) ≈n4 t_1 (n) ≈n^4, recorded as T1 (n) =θ (N4) t_1 (n) =θ (n^4); The run time of algorithm B can be recorded as: T2 (n) ≈n4 t_2 (n) ≈n^4, recorded as T2 (n) =θ (N4) t_2 (n) =θ (n^4).

The mathematical meaning of θθ
Mode one: Setting f (n) f (n) and g (n) g (n) is a function that defines the set of fields as natural numbers. If

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.