ta11_question

# ta11_question - COMP 271H Design and Analysis of Algorithms...

• Notes
• 1

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

COMP 271H Design and Analysis of Algorithms 2006 Fall Semester Tutorial 11 1. (From textbook) A sequence of n operations is performed on a data structure. The i th operation costs i if i is an exact power of 2, and 1 otherwise. Determine the amortized cost per operation in two ways: (i) using the accounting method; (ii) using the potential method. 2. (From textbook) Design a data structure to support the following two operations for a
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: set S of integers: • Insert( S,x ) inserts x into S . • Delete-Larger-Half( S ) deletes the largest ⌈ S/ 2 ⌉ elements from S . Explain how to implement this data structure so that any sequence of m operations runs in O ( m ) time. 1...
View Full Document

• Spring '10
• may
• English, Analysis of algorithms, Amortized analysis, Fall Semester Tutorial, COMP 271H Design

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern