6.046J | Spring 2012 | Undergraduate

Design and Analysis of Algorithms

Syllabus

Course Meeting Times

Lectures: 2 sessions / week, 1.5 hours / session

Recitations: 1 session / week, 1 hour / session

Course Description

This course assumes that students know how to analyze simple algorithms and data structures from having taken 6.006. It introduces students to the design of computer algorithms, as well as analysis of sophisticated algorithms.

Course Objectives and Outcomes

Prerequisites

This course is the header course for the Theory of Computation concentration. You are expected, and strongly encouraged, to have taken:

Petitions for waivers will be considered by the course staff. Students will be responsible for material covered in prerequisites.

Lectures and Recitations

You are responsible for material presented in lectures, including oral comments made by the lecturer.

You are also responsible for material presented in recitations. Attendance in recitation has been well correlated in the past with exam performance. Recitations also give you a more personalized opportunity to ask questions and interact with the course staff. Your recitation instructor, together with the lecturers, will assign your final grade.

Problem Sets

Nine problem sets will be assigned during the semester. Homework must be turned in by 9pm on the due date, which is typically a Wednesday.

Problem sets should be submitted in PDF format. Formatting your problem set in LaTeX will make it easier for us to read; however, any method of generating the PDF is acceptable (including scanning handwritten documents), as long as it is clearly legible.

The problem sets include exercises that should be solved but not handed in. These questions are intended to help you master the course material and will be useful in solving the assigned problems. Material covered in exercises will be tested on exams.

Guide to Writing Up Homework

You should be as clear and precise as possible in your write-up of solutions. Understandability of your answer is as desirable as correctness, because communication of technical material is an important skill.

A simple, direct analysis is worth more points than a convoluted one, both because it is simpler and less prone to error and because it is easier to read and understand. Sloppy answers will receive fewer points, even if they are correct, so make sure that your handwriting and your thoughts are legible. If writing your problem set by hand, it is a good idea to copy over your solutions to hand in, which will make your work neater and give you a chance to do sanity checks and correct bugs. If typesetting, reviewing the problem set while typing it in often has this effect. In either case, going over your solution at least once before submitting it is strongly recommended.

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 your 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. Graders will be instructed to take off points for convoluted and obtuse descriptions.

Grading Policy

The final grade will be based on the problem sets, one in-class quiz, one take-home quiz, a final during final exam week, and participation during the weekly recitation sections. Quiz 1 will be given in class; Quiz 2 will be a take-home exam, available on Monday at 9am and due Friday at noon.

The grading breakdown is as follows:

ACTIVITIES PERCENTAGES
Problem sets 20%
In-class quiz 20%
Take-home quiz 25%
Final exam 30%
Recitation participation 5%

Although the problem sets account for only 20% of your final grade, you are required to at least attempt them. The following table shows the impact of failing to attempt problems:

QUESTIONS IMPACT
0 None
1 1/100 of a letter grade
2 1/10 of a letter grade
3 1/5 of a letter grade
4 1/4 of a letter grade
5 1/3 of a letter grade
6 1/2 of a letter grade
7 One letter grade
8 Two letter grades
9 or more Fail the course

Please observe that this table is for questions skipped, not problem sets.

Collaboration Policy

Textbook

The primary written reference for the course is:

Buy at MIT Press Cormen, Thomas, Charles Leiserson, Ronald Rivest, and Clifford Stein. Introduction to Algorithms. 3rd ed. MIT Press, 2009. ISBN: 9780262033848.

In previous semesters the course has used the first or second edition of this text. We will be using material and exercise numbering from the third edition, making earlier editions unsuitable as substitutes.

Problem Sets and Exams

The goal of homework is to give you practice in mastering the course material. Consequently, you are encouraged to collaborate on problem sets. In fact, students who form study groups generally do better on exams than do students who work alone. If you do work in a study group, however, you owe it to yourself and your group to be prepared for your study group meeting. Specifically, you should spend at least 30–45 minutes trying to solve each problem beforehand. If your group is unable to solve a problem, talk to other groups or ask your recitation instructor.

You must write up each problem solution by yourself without assistance, however, even if you collaborate with others to solve the problem. You are asked on problem sets to identify your collaborators. If you did not work with anyone, you should write “Collaborators: none.” If you obtain a solution through research (e.g., on the web), acknowledge your source, but write up the solution in your own words. It is a violation of this policy to submit a problem solution that you cannot orally explain to a member of the course staff.

No collaboration whatsoever is permitted on quizzes or exams. The course has a take-home exam for the second quiz, which you must do entirely on your own, even though you will be permitted several days in which to do the exam. More details about the collaboration policy for the take-home exam will be forthcoming in the preceding lecture. Please note that this lecture constitutes part of the exam, and attendance is mandatory.

Plagiarism and other dishonest behavior cannot be tolerated in any academic environment that prides itself on individual accomplishment. If you have any questions about the collaboration policy, or if you feel that you may have violated the policy, please talk to one of the course staff. Although the course staff is obligated to deal with cheating appropriately, we are more understanding and lenient if we find out from the transgressor himself or herself rather than from a third party or discover it on our own.

Course Objectives

Upon completion of this course, students will be able to do the following:

  • Analyze the asymptotic performance of algorithms.
  • Write rigorous correctness proofs for algorithms.
  • Demonstrate a familiarity with major algorithms and data structures.
  • Apply important algorithmic design paradigms and methods of analysis.
  • Synthesize efficient algorithms in common engineering design situations.

Course Outcomes

Students who complete the course will have demonstrated the ability to do the following:

  • Argue the correctness of algorithms using inductive proofs and invariants.
  • Analyze worst-case running times of algorithms using asymptotic analysis.
  • Describe the divide-and-conquer paradigm and explain when an algorithmic design situation calls for it. Recite algorithms that employ this paradigm. Synthesize divide-and-conquer algorithms. Derive and solve recurrences describing the performance of divide-and-conquer algorithms.
  • Describe the dynamic-programming paradigm and explain when an algorithmic design situation calls for it. Recite algorithms that employ this paradigm. Synthesize dynamic-programming algorithms, and analyze them.
  • Describe the greedy paradigm and explain when an algorithmic design situation calls for it. Recite algorithms that employ this paradigm. Synthesize greedy algorithms, and analyze them.
  • Explain the major graph algorithms and their analyses. Employ graphs to model engineering problems, when appropriate. Synthesize new graph algorithms and algorithms that employ graph computations as key components, and analyze them.
  • Explain the different ways to analyze randomized algorithms (expected running time, probability of error). Recite algorithms that employ randomization. Explain the difference between a randomized algorithm and an algorithm with probabilistic inputs.
  • Analyze randomized algorithms. Employ indicator random variables and linearity of expectation to perform the analyses. Recite analyses of algorithms that employ this method of analysis.
  • Explain what amortized running time is and what it is good for. Describe the different methods of amortized analysis (aggregate analysis, accounting, potential method). Perform amortized analysis.
  • Explain what competitive analysis is and to which situations it applies. Perform competitive analysis.
  • Compare between different data structures. Pick an appropriate data structure for a design situation.
  • Explain what an approximation algorithm is, and the benefit of using approximation algorithms. Be familiar with some approximation algorithms, including algorithms that are PTAS or FPTAS. Analyze the approximation factor of an algorithm.

Course Info

Learning Resource Types
Problem Sets with Solutions
Exams with Solutions
Lecture Notes