Question: d ) Use the potential method to find the amortized cost per operation. Let L i be the list after the i - th operation

d) Use the potential method to find the amortized cost per operation. Let Li be the list
after the i-th operation and let num (Li) be the number of items on Li. Use the following
potential function:
i=
um(Li)
i. First, show that this potential function is valid (i.e.0=0 and i0 for all i)
ii. Next use this potential function to calculate the amortized costs of Add and
Aggregate (Recall that ai=ci+i-i-1, where ai, is the amortized cost of the i-th
operation and ci is the actual cost)
 d) Use the potential method to find the amortized cost per

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!