final-f2010

final-f2010 - December 14, 2010 6.006 Fall 2010 Final Exam...

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

View Full Document Right Arrow Icon
Introduction to Algorithms December 14, 2010 Massachusetts Institute of Technology 6.006 Fall 2010 Professors Konstantinos Daskalakis and Patrick Jaillet Final Exam Final Exam Do not open this quiz booklet until directed to do so. Read all the instructions on this page. When the quiz begins, write your name on every page of this quiz booklet. You have 180 minutes to earn 180 points. Do not spend too much time on any one problem. Read them all first, and attack them in the order that allows you to make the most progress. This exam is closed book. You may use three 8 1 2 00 × 11 00 or A4 crib sheets (both sides). No calculators or programmable devices are permitted. No cell phones or other communications devices are permitted. Write your solutions in the space provided. If you need more space, write on the back of the sheet containing the problem. Pages may be separated for grading. Don’t waste time and paper rederiving facts that we have studied. It is sufficient to cite known results. When writing an algorithm, a clear description will suffice. Pseudo-code isn’t required. When asked for an algorithm, your algorithm should have the time complexity specified in the problem with a correct analysis. If you cannot find such an algorithm, you will generally receive partial credit for a slower algorithm if you analyze your algorithm correctly . Show your work, as partial credit will be given. You will be graded not only on the correct- ness of your answer, but also on the clarity with which you express it. Problem Parts Points Grade Grader 1 2 2 2 1 30 3 2 30 4 2 28 5 3 30 6 3 30 7 2 30 Total 180 Name: Friday Recitation: Aleksander 11 AM Arnab 12 PM Alina 3 PM Matthew 4 PM
Background image of page 1

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

View Full DocumentRight Arrow Icon
6.006 Final Exam Name 2 Problem 1. What is Your Name? [2 points] (2 parts) (a) [1 point] Flip back to the cover page. Write your name there. (b) [1 point] Flip back to the cover page. Circle your recitation section.
Background image of page 2
6.006 Final Exam Name 3 Problem 2. Storing Partial Maxima [30 points] (1 part) 6.006 student, Mike Velli, wants to build a website where the user can input a time interval in history, and the website will return the most exciting sports event that occurred during this interval. Formally, suppose that Mike has a chronologically sorted list of n sports events with associated integer “excitement factors” e 1 ,...,e n . You can assume for simplicity that n is a power of 2 . A user’s query will consist of a pair ( i,j ) with 1 i < j n , and the site is supposed to return max( e i ,e i +1 ,...,e j ) . Mike wishes to minimize the amount of computation per query, since there will be a lot of traffic to the website. If he precomputes and stores max( e i ,...,e j ) for every possible input ( i,j ) , he can respond to user queries quickly, but he needs storage Ω( n 2 ) which is too much.
Background image of page 3

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

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

Page1 / 13

final-f2010 - December 14, 2010 6.006 Fall 2010 Final Exam...

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

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