ps6 - Introduction to Algorithms October 31, 2005...

Info iconThis preview shows pages 1–3. 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: Introduction to Algorithms October 31, 2005 Massachusetts Institute of Technology 6.046J/18.410J Professors Erik D. Demaine and Charles E. Leiserson Handout 19 Problem Set 6 MIT students: This problem set is due in lecture on Monday, November 7, 2005. The homework lab for this problem set will be held 2–4 P . M . on Sunday, November 6, 2005 . Reading: Chapter 17 and the handout on competitive analysis. Both exercises and problems should be solved, but only the problems should be turned in. Exercises are intended to help you master the course material. Even though you should not turn in the exercise solutions, you are responsible for material covered in the exercises. Mark the top of each sheet with your name, the course number, the problem number, your recitation section, the date and the names of any students with whom you collaborated. Please staple and turn in your solutions on 3-hole punched paper . You will often be called upon to “give an algorithm” to solve a certain problem. Your write-up should take the form of a short essay. A topic paragraph should summarize the problem you are solving and what your results are. The body of the essay should provide the following: 1. A description of the algorithm in English and, if helpful, pseudo-code. 2. At least one worked example or diagram to show more precisely how your algorithm works. 3. A proof (or indication) of the correctness of the algorithm. 4. An analysis of the running time of the algorithm. Remember, your goal is to communicate. Full credit will be given only to correct solutions which are described clearly . Convoluted and obtuse descriptions will receive low marks. Exercise 6-1. Do Exercise 17.1-1 on page 410 in CLRS. Exercise 6-2. Do Exercise 17.3-3 on page 416 in CLRS. Exercise 6-3. Do Exercise 17.3-6 on page 416 in CLRS. Exercise 6-4. Do Exercise 17.3-7 on page 416 in CLRS. Exercise 6-5. Do Exercise 17.4-2 on page 425 in CLRS. 2 Handout 19: Problem Set 6 Problem 6-1. Electronic Billboard You are starting a new Electronic Billboard company called E-Bill. For now, you have just one billboard and you can display one advertisement on the billboard at a time. Your advertising contract with the customers says that if you display their advertisement for one week, then they will pay you, otherwise they won’t. Customers come to you with their advertisements at arbitrary times and offer you some money to display their ad. When they come to you, you must decide immediately whether you will display their advertisement starting immediately. If you are already immediately whether you will display their advertisement starting immediately....
View Full Document

This note was uploaded on 02/01/2010 for the course COMPUTERSC 6.046J/18. taught by Professor Erikd.demaineandcharlese.leiserson during the Fall '05 term at MIT.

Page1 / 5

ps6 - Introduction to Algorithms October 31, 2005...

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

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