This preview shows page 1. Sign up to view the full content.
Unformatted text preview: e the two operations and give 2 as the amortized cost for ADD and n as the amortized cost for DeleteOdds, you will get 3 out of 6 points since the question asks “What is the smallest integer amortized cost for the Add() and DeleteOdds() operations?” The question intends you to give the same amortized cost for the two operations. Also n is NOT the smallest integer amortized cost for DeleteOdds. I give you 3 points (1 point more than other incorrect scenarios) because in this scenario, your amortized cost is enough to pay for the actual cost, but the amortized cost you give is not the smallest. 3) If you indeed use the aggregation method, but separate the two operations and give 2 as the amortized cost for ADD and 2 as the amortized cost for DeleteOdds, you will get 2 out of 6 points since the amortized cost you give is not enough to pay for the actual cost. It is straightforward to show a counterexample: you insert three elements and perform one deleteOdds. The actual costs would be 2...
View
Full
Document
This note was uploaded on 11/17/2012 for the course COP 5536 taught by Professor Staff during the Spring '08 term at University of Florida.
 Spring '08
 Staff

Click to edit the document details