COP5536-Exam1-solution

# COP5536-Exam1-solution

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 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 accounting 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 + 2 + 2 + 3 = 9, while you only give a sum of 2 + 2 + 2 + 2 = 8 amortized costs. 4) If you write down accounting method but then you perform other methods following your “accounting method: ” notation, for example, you write immediately that “the sum of all actual costs is …”, or “define a potential function as …”, etc, then you will be deducted by 1 point from what your other method deserves to earn. 5) If you indeed use the accounting method, but only show that P(n) >=...
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.

Ask a homework question - tutors are online