ps3 - Massachusetts Institute of Technology Handout 10...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Massachusetts Institute of Technology Handout 10 6.046J/18.410J: Introduction to Algorithms February 25, 2003 Professors Piotr Indyk and Bruce Tidor Problem Set 3 This problem set is due at the beginning of class on Thursday, March 20, 2003 . Note that you have three weeks to do it in. Each problem is to be done on a separate sheet (or sheets) of paper. Mark the top of each sheet with your name, 6.046J/18.410J, the problem number, your recitation section, the date, and the names of any students with whom you collaborated. Problem 3-1. Priorities Brian Dean is a VERY busy TA. He often has so many things to do he can’t even figure out which one he should do first. Nitin Thaper has offered to help him by assigning ’priority’ numbers to each of Brian’s tasks. Nitin guarantees no two tasks will have the same priority. Now, content with at least having priorities, Brian writes all his tasks down on paper, and simply works on the one that is most important until he finishes it. As new tasks appear, Nitin is more than happy to assign a ’priority’ number to each of them. But Brian would like to be somewhat more efficient in how he processes all that data. Assume that there are n tasks Brian is working on. Each has an integer associated with them that represents the priority. Your task is to analyze the running time of each of these ideas (do not provide an algorithm unless we ask how): (a) If Brian were to store all his tasks in an array, along with the priority values assigned to them: • How long does it take to search for a task of specific priority?...
View Full Document

This note was uploaded on 01/01/2011 for the course CS 6.046j taught by Professor Piotrindyk during the Spring '03 term at MIT.

Page1 / 3

ps3 - Massachusetts Institute of Technology Handout 10...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online