Question: Consider a sequence of n operations on a data structure. For each i in { 1 , dots, n } , operation i has cost
Consider a sequence of operations on a data structure. For each in dots, operation
has cost and takes the data structure from state to state Let be a potential function
that maps any given state of the data structure to a possibly negative real number.
a Write down an expression for the amortized cost hat of operation i with respect to potential function
b Develop an exact expression for the total actual cost of the operations in terms
of the following three quantities: the total amortized cost of the operations; ;
c We say that potential function is valid if and for all in
dots, Prove that if is valid, then the total actual cost of the operations is at most
the total amortized cost of the operations.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
