This preview shows pages 1–4. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: T i1 ) = 2 for all i = 1, 2, …, N Add all these equations up N T T C N N i i 2 1 =+ ∑ = ) ( 2 2 1 N O N T N C N N i i = ≤= ∑ = T worst = O (log N ), but T amortized = 2 §2 Binomial Queues T actual + ∆ Potential = T amortized Savings Account If an operation uses less than its allotted time, the unused time is saved in the form of a higher potential , for use later on by more expensive operations. In the case of the BuildBinomialQueue routine, the potential function can be taken as the number of trees . Note: While T actual varies from operation to operation, T amortized is stable . In general, a good potential function should • Always assume its minimum at the start of the sequence (e.g. start from 0 and is always nonnegative). • Cancel a term in the actual time....
View
Full
Document
This note was uploaded on 02/16/2011 for the course CS 136 taught by Professor Yuechen during the Winter '08 term at Zhejiang University.
 Winter '08
 YueChen

Click to edit the document details