CLRS 17.1 Polymerization Analysis

Source: Internet
Author: User

17.1-1
No

17.1-2
Assuming that in addition to the highest bit is 1, the remaining bits are all 0, that is, the 2k−1=10...0 2^{k-1}=10...0, the sequence of operations is −1,+1,−1+1,...-1,+1,-1+1,..., at which time each operation is to be flipped, the runtime is Θ (NK) \theta ( NK).

17.1-3
∑i=1nci≤n+∑j=0lgn2j=n+ (2n−1) <3n \sum \limits_{i=1}^{n}c_i\le n+\sum \limits_{j=0}^{\lg n}2^j=n+ (2n-1). So the average cost is less than 3.
It is also the cost of O (1) O (1) to know the amortization through the aggregation analysis.

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.