




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





Jared Saia University of New Mexico
“I will gladly pay you Tuesday for a hamburger today” - Welling- ton Wimpy
Amortized analysis is not average case analysis.
Increment(A){ i = 0; while(i<k && A[i]=1){ A[i] = 0; i++; } if (i<k) A[i] = 1; }
⌊ n/ 2 i
⌋ times in a sequence of n calls to Increment on an initially zero counter
blog∑ nc
i=
⌊ (^) n 2 i
⌋ < n
∑^ ∞ i=
2 i^
= 2 n (2)