-->
当前位置:首页 > 题库 > 正文内容

单选题:When doing amortized analysis, which one of the following statem

Luz3年前 (2021-05-10)题库651
When doing amortized analysis, which one of the following statements is FALSE? @[C](2)

A. Aggregate analysis shows that for all $$n$$, a sequence of $$n$$ operations takes worst-case time $$T(n)$$ in total. Then the amortized cost per operation is therefore $$T(n)/n$$
B. For accounting method, when an operation's amortized cost exceeds its actual cost, we save the difference as credit to pay for later operations whose amortized cost is less than their actual cost
C. For potential method, a good potential function should always assume its maximum at the start of the sequence
D. The difference between aggregate analysis and accounting method is that the later one assumes that the amortized costs of the operations may differ from each other



A.Aggregate analysis shows that for all $$n$$, a sequence of $$n$$ operations takes worst-case time $$T(n)$$ in total. Then the amortized cost per operation is therefore $$T(n)/n$$
B.For accounting method, when an operation's amortized cost exceeds its actual cost, we save the difference as credit to pay for later operations whose amortized cost is less than their actual cost
C.For potential method, a good potential function should always assume its maximum at the start of the sequence
D.The difference between aggregate analysis and accounting method is that the later one assumes that the amortized costs of the operations may differ from each other


答案:C

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。