






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!







WAggregate method.
a = x + ( ( a + b ) * c + d ) + y ; actual cost amortized cost potential
Potential = stack size except at end.
create an empty stack; for (int i = 1; i <= n; i++) // n is number of symbols in statement processNextSymbol();
counter
counter
one unit of amortized cost is used to pay for the change in bit 2 from 0 to 1 the other unit remains as a credit on bit 2 and is used later to pay for the time when bit 2 changes from 1 to 0 the change in bits 0 and 1 from 1 to 0 is paid for by the credits on these bits
bits credits
= 0