This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full 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 3hole punched paper . You will often be called upon to “give an algorithm” to solve a certain problem. Your writeup 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, pseudocode. 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 61. Do Exercise 17.11 on page 410 in CLRS. Exercise 62. Do Exercise 17.33 on page 416 in CLRS. Exercise 63. Do Exercise 17.36 on page 416 in CLRS. Exercise 64. Do Exercise 17.37 on page 416 in CLRS. Exercise 65. Do Exercise 17.42 on page 425 in CLRS. 2 Handout 19: Problem Set 6 Problem 61. Electronic Billboard You are starting a new Electronic Billboard company called EBill. 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.
 Fall '05
 ErikD.DemaineandCharlesE.Leiserson

Click to edit the document details