Syllabus

Course Information

Staff

Lecturers:
Erik Demaine
Charles E. Leiserson

SMA Lecturer:
Lee Wee Sun

Course Objectives and Outcomes
Course Objectives

This course introduces students to the analysis and design of computer algorithms. Upon completion of this course, students will be able to do the following:
• Analyze the asymptotic performance of 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:
1. Argue the correctness of algorithms using inductive proofs and loop invariants.

2. Analyze worst-case running times of algorithms using asymptotic analysis. Compare the asymptotic behaviors of functions obtained by elementary composition of polynomials, exponentials, and logarithmic functions. Describe the relative merits of worst-, average-, and best-case analysis.

3. Analyze average-case running times of algorithms whose running time is probabilistic. Employ indicator random variables and linearity of expectation to perform the analyses. Recite analyses of algorithms that employ this method of analysis.

4. Explain the basic properties of randomized algorithms and methods for analyzing them. Recite algorithms that employ randomization. Explain the difference between a randomized algorithm and an algorithm with probabilistic inputs.

5. Analyze algorithms using amortized analysis, when appropriate. Recite analyses of simple algorithms that employ this method of analysis. Describe different strategies for amortized analysis, including the accounting method and the potential method.

6. 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.

7. Describe the dynamic-programming paradigm and explain when an algorithmic design situation calls for it. Recite algorithms that employ this paradigm. Synthesize dynamicprogramming algorithms and analyze them.

8. 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.

9. Explain the major algorithms for sorting. Recite the analyses of these algorithms and the design strategies that the algorithms embody. Synthesize algorithms that employ sorting as a subprocedure. Derive lower bounds on the running time of comparison-sorting algorithms,
and explain how these bounds can be overcome.

10. Explain the major elementary data structures for implementing dynamic sets and the analyses of operations performed on them. Recite algorithms that employ data structures and how their performance depends on the choice of data structure. Synthesize new data structures by augmenting existing data structures. Synthesize algorithms that employ data structures as key components.

11. 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.

12. Demonstrate a familiarity with applied algorithmic settings — such as computational geometry, operations research, security and cryptography, parallel and distributed computing, operating systems, and computer architecture — by reciting several algorithms of importance to different fields.
Distance Learning

This course will be taught concurrently at MIT in the United States and as part of the Singapore-MIT Alliance (SMA) program in Singapore. All aspects of the course — lectures, recitations, problem sets, and exams — will be essentially the same in the two countries. The lectures, all of which will be given live at MIT, will be recorded, digitized, and made available to the students in Singapore via the course website. The recorded lectures will also be available to MIT students. Prof. Lee will participate in the administration of the course with Profs. Demaine and Leiserson, help produce course materials, and teach recitations for the SMA students.

Prerequisites
A strong understanding of programming and a solid background in discrete mathematics, including probability, are necessary prerequisites to this course.

MIT Students: This course is the header course for the MIT/EECS Engineering Concentration of Theory of Computation. You are expected to have taken 6.001 Structure and Interpretation of Computer Programs and 6.042J / 18.062J Mathematics for Computer Science, and received a grade of C or higher in both classes. If you do not meet these requirements, you must talk to a TA before registering for the course.
Lectures

Two sessions / week
1.5 hours / session

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

Recitations
Students must attend a one-hour recitation session each week. The course staff will schedule recitations. You are responsible for material presented in recitation. Attendance in recitation has been well correlated in the past with examperformance. Recitations also give you a more intimate opportunity to ask questions and interact with the course staff.

MIT Students: MIT recitations will be taught by the teaching assistants on last day of the week. Handout 3 asks you to fill out the sign-up sheet on the course web page to indicate your preferences for recitation sections. Recitation assignments made by the scheduling office are inoperative.
Handouts

Most handouts will be made available on the course web page in formats suitable for printing. Students should download and print out the handouts from the course web page. You will receive an email reminder when the handouts are available online. The email message will say where and when the few handouts that are not available from the web page can be obtained.

Textbook
The primary written reference for the course is the second edition of the textbook Introduction to Algorithms by Cormen, Leiserson, Rivest, and Stein. In previous semesters the course has used the first edition of this text. The second edition is a substantial revision of the first, making the first edition unsuitable as a substitute.

MIT Students: The textbook can be obtained at various local and online bookstores.
Problem Sets
Nine problem sets will be assigned during the semester. The course calendar, Handout 2, shows the tentative schedule of assignments and due dates, but the actual due date will always be on the problem set itself.
• Late homeworks will generally not be accepted. If there are extenuating circumstances, you should make prior arrangements with your recitation instructor.

MIT Students: An excuse from the Dean’s Office will be required if prior arrangements have not been made.
• Each problem should be written up on a separate sheet (or sheets) of paper, since problems may be graded by separate graders. Mark the top of each sheet with the following:

– the name of your recitation instructor,
– the problem number,
– the people you worked with on the problem (see Section 14), or “Collaborators: none” if you solved the problem completely alone.

MIT Students: You must write up your answers on three-hole punch paper. The course staff puts rings through the holes to avoid losing homeworks. In addition, your graded homeworks can easily be included in your loose-leaf course notebook.
• 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 is legible. 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.
• The problem sets includes 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.
Describing Algorithms

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.
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.

The final grade will be primarily based on problem sets (P), one in-class quiz (Q1), one take-home quiz (Q2), and a final (F). The problem sets will together be worth about 80 points, the in-class quiz about 80 points, the take-home quiz about 150 points, and the final exam about 180 points.

Although the problem sets account for only 80 points in your final grade, you must do them.
The following table shows the impact of failing to do problems:

Problems skipped    Impact

0                               None
1                               One-hundredth of a letter grade
2                               One-tenth of a letter grade
3                               One-fifth of a letter grade
4                               One-fourth of a letter grade
5                               One-third of a letter grade
6                               One-half of a letter grade
9 or more                   Fail

Please observe that this table is for problems skipped, not problem sets. The specifics of this grading policy are subject to change if the need arises.
Collaboration Policy

The goal of homeworks 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.

No collaboration whatsoever is permitted on 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 takehome exam will be forthcoming in the lecture on Day 35. Please note that this lecture constitutes part of the exam, and attendance is mandatory.

Plagiarism and other antiintellectual 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.