Constant Amortized Time

后端 未结 6 1182
太阳男子
太阳男子 2020-11-22 01:44

What is meant by \"Constant Amortized Time\" when talking about time complexity of an algorithm?

6条回答
  •  礼貌的吻别
    2020-11-22 02:05

    The explanations above apply to Aggregate Analysis, the idea of taking "an average" over multiple operations. I am not sure how they apply to Bankers-method or the Physicists Methods of Amortized analysis.

    Now. I am not exactly sure of the correct answer. But it would have to do with the principle condition of the both Physicists+Banker's methods:

    (Sum of amortized-cost of operations) >= (Sum of actual-cost of operations).

    The chief difficulty that I face is that given that Amortized-asymptotic costs of operations differ from the normal-asymptotic-cost, I am not sure how to rate the significance of amortized-costs.

    That is when somebody gives my an amortized-cost, I know its not the same as normal-asymptotic cost What conclusions am I to draw from the amortized-cost then?

    Since we have the case of some operations being overcharged while other operations are undercharged, one hypothesis could be that quoting amortized-costs of individual operations would be meaningless.

    For eg: For a fibonacci heap, quoting amortized cost of just Decreasing-Key to be O(1) is meaningless since costs are reduced by "work done by earlier operations in increasing potential of the heap."

    OR

    We could have another hypothesis that reasons about the amortized-costs as follows:

    1. I know that the expensive operation is going to preceded by MULTIPLE LOW-COST operations.

    2. For the sake of analysis, I am going to overcharge some low-cost operations, SUCH THAT THEIR ASYMPTOTIC-COST DOES NOT CHANGE.

    3. With these increased low-cost operations, I can PROVE THAT EXPENSIVE OPERATION has a SMALLER ASYMPTOTIC COST.

    4. Thus I have improved/decreased the ASYMPTOTIC-BOUND of the cost of n operations.

    Thus amortized-cost analysis + amortized-cost-bounds are now applicable to only the expensive operations. The cheap operations have the same asymptotic-amortized-cost as their normal-asymptotic-cost.

提交回复
热议问题