Fall 2018 CS231

This is a course about algorithms; their design and analysis

About CS231


The language of computer science is to a great extent the language of algorithms. Although there are many thousands of algorithms, there are relative few basic design techniques. These include: divide-and-conquer, greedy, dynamic programming, and network flow. We will illustrate these techniques by studying a few fundamental algorithms of each type. In addition to helping us understand classic solution techniques, these algorithms have proven very useful in practice. Their names and the names of the problems they solve have become a standard part of the language of computer science.

Unfortunately, there is rarely a best algorithm to solve a given problem. Each approach involves a series of tradeoffs. Therefore, we will also study methods for evaluating the usefulness of an algorithm in a given situation. Among the various competing measures, we will focus primarily on the anal- ysis of time and space complexity. However, a number of other issues will also be discussed.

Meet your instructors & tutors

Click here for CS231 drop-in calendar


CS231 Fall 2018 schedule


Note that all readings are required to be done before class, except for the first lecture :)
Please check this page frequently, as it is subject to change.

Monday

Tuesday

Wednesday

Thursday

Friday

Sep 3

Labor Day: no classes

Sep 4

Sep 5

Sep 6

Lecture 1: Introduction
(slides)

Reading (not required): Chapter 1

Sep 8

Sep 10

Part I - Basics

Lecture 2: Data Structures and Complexity
(slides)

Reading: Section 2.3

Sep 11

Sep 12

Sep 13

Lecture 3: Back to the Stable Matching problem
(notes)

Reading: Sections 1.1 and 2.3

Assignment 1 due in class

Sep 14

Sep 17

Lecture 4: Asymptotic Order of Growth
(slides)

Reading: Sections 2.1 and 2.2

Sep 18

Sep 19

Sep 20

Part II - Graphs

Lecture 5: Intro and representation
(slides)

Reading: Sections 3.1 and 3.2

Assignment 2 due in class

Sep 21

Sep 24

Lecture 6: Graph Traversals
(slides)

Reading: Sections 3.2 and 3.3

Sep 25

Sep 26

Sep 27

Lecture 7: Directed Graphs
(slides)

Reading: Sections 3.5 and 3.6

Assignment 3 due in class

Sep 28

Oct 1

Exam 1

Oct 2

Oct 3

Oct 4

Part III - Greedy Algorithms

Lecture 9: Interval Scheduling
(slides)

Reading: Section 4.1

Oct 6

Oct 8

Fall Break: no classes

Oct 9

Fall Break: no classes

Oct 10

Oct 11

Lecture 10: More on Scheduling
(Notes)

Reading: Sections 4.1 and 4.2

Assignment 4 due in class

Oct 12

Oct 15

Lecture 11: Scheduling to Minimize Lateness
(slides / Notes)

Reading: Section 4.2

Oct 16

Oct 17

Oct 18

Lecture 12: Shortest Paths in Graphs
(Slides)

Reading: Section 4.4

Assignment 5 due in class

Oct 19

Oct 22

Lecture 13: Graphs again?!
(Slides)

Reading: Sections 4.4 and 4.5

Oct 23

Oct 24

Oct 25

Part IV - Divide and Conquer

Lecture 14: Merge Sort
(Slides)

Reading: Sections 5.1 and 5.2

Assignment 6 due in class

Oct 26

Oct 29

Lecture 15: Counting Inversions
(Slides)

Reading: Section 5.2 and 5.3

Oct 30

Oct 31

Nov 1

Lecture 16: Quick Review (Questions document)

Assignment 7 due in class

Phase 1 of Final Paper

Nov 2

Nov 5

Exam 2

Nov 6

Nov 7

Nov 8

Part V - Dynamic Programming

Lecture 17: Basics and Principles
(Slides)

Reading: Sections 6.1 and 6.2

Nov 9

Nov 12

Lecture 18: The Knapsack problem
(Notes)

Reading: Sections 6.2 and 6.4

Nov 13

Nov 14

Nov 15

Lecture 19: Back to Graphs :)
(Slides)

Reading: Sections 6.8 and 6.9

Assignment 8 due in class

Nov 19

Lecture 20: Review on DP :)
(Exercises)

Reading: Sections 6.8 and 6.9

Nov 20

Nov 21

Thanksgiving Break

Nov 22

Thanksgiving Break

Nov 23

Thanksgiving Break

Nov 26

Part VI - Invited Lectures

Lecture 21: Network Flow
Reading: Skim Sections 7.1 to 7.3

Nov 27

Nov 28

Nov 29

Lecture 22: Computational intractability and NP-Completeness
Reading: Skim Sections 8.1 to 8.4

Assignment 9 due in class

Nov 30

Dec 3

Exam 3

Dec 4

Dec 5

Dec 6

Final Presentations

Dec 7

Dec 10

Final Presentations

Dec 11

Dec 12

Reading period

Dec 13

Reading period

Dec 14

Final exams

Dec 17

Final exams

Dec 18

Final exams

Dec 19

Final exams

Dec 20

Enjoy your break :)

Dec 21

Administrative details of CS231



Course Overview

Prerequisites The prerequisite for CS231 is CS230, and Math 225. Students with significant mathematical experience (writing and understanding proofs), or those who have not taken Math 225 need the permission of the instructor.

Textbook - Very Important!! The textbook for this semester is Regular readings will be assigned from the required text, Algorithm Design, by by Jon Kleinberg and Eva Tardos, 1st edition. It is required that you read the relevant sections every lecture.

Computers No programming will be done as part of this course. You will need your computers, however, to type your assignments. You are expected to use Latex for typesetting all assignments in this course.

Course Directory The CS231 course directory is located at /home/cs231 on tempest. You will be submitting your assignments, in pdf format, in that directory. Any required material, if any, of the course will be placed in the download folder inside the /home/cs231 directory, and you can access it using an ftp program (like Fetch on a Mac).

Course Group You will be added to the cs231-fall2018 google group. This group has several purposes. We will use it to make class announcements, such as corrections to assignments and clarifications of material discussed in class.

Course Piazza Page You will also receive an invitation to join the course Piazza page. We encourage you to post questions or comments that are of interest to students in the course.
The instructors and TAs will read messages posted in the page on a regular basis and post answers to questions found there. If you know the answer to a classmate's question, feel free to post a reply yourself. The Pizza page is also a good place to find people to join a study group. You should plan on reading group meetings on a regular basis.


Course Requirements

Lectures There are two 70-minute lectures each week that will introduce the main content of the course. Lectures are held on Mondays and Thursdays at 1:30-2:40 PM (section 01 in E111), and at 2:50-4:00PM (section 02 in E111)

Discussion Sections Similar to Supplemental Instruction (SI), discussion sections is a support program offered for selected Wellesley courses. Our discussion leaders are trained and highly experienced in tutoring. They will offer multiple study sections each week throughout the semester. During discussion sections, they will cover problem set solutions and review important concepts. Discussion sections are open to all students enrolled in the course. We highly recommend attending at least one of these sections every week, as well as reviewing the handouts used in them.

Final Presentations and Paper: During the last few weeks of the semester, teams of 3 students work on a short survey paper. After choosing an interesting algorithmic problem, you will first read related literature on the topic, and summarize your findings into a short scientific paper (5 pages). Each team will present their work in a final presentation during the last two classes, and will prepare a short paper to be submitted by the last day of exams.

Exams: There will be three in-term, non-collaborative exams that are open book and open notes. There will be no final exam, as there will be a final presentation and paper instead. The dates of the exams are listed on the schedule. Please mark the exam dates in your calendars as they are not flexible.


Grading Policy

Final Grades Your final grade for the course will be computed as a weighted average of several components. The relative weight of each component is shown below:

This course complies with the Wellesley College grading policy. While that policy asks faculty to hold each 100- and 200-level course with 10 or more students to an average of no higher than 3.33, it does not require faculty to grade on a "curve." There is no arbitrary limit on the number of A's, B's, C's etc., and every student will be assigned the grade they earn and deserve according to the grading standards of the college.

Assignments in CS231

There will be weekly assignments in which you will analyze algorithmic problems, using concepts and techniques discussed in class. Assignments are due as indicated on the class schedule. You are required to complete the assignments on your own. You can discuss the problems with the CS231 team members and classmates, but you must write your own solutions.

Proof Modules (Problems)

In most assignments, you will find a problem marked with [Proof-problem] For these problems, you need to carefully formulate and write your arguments for the correctness of your solutions. For these proof problems, you need to submit on the same day as the assignment, but in a separate sheet. T Your proof will be graded through the weekend, and you’ll get feedback on it by Monday. Based on your grade, you have a chance to resubmit it, if you want.
Grading:
* If the proof is correct and complete, you get full points (1)
* If edits need to be made, you get (0.5), and you can resubmit the following Thursday.
* If many edits need to be made, you get (0), and you can resubmit the following Thursday.

Peer Review

In some assignments, there is a marked problem(s), which you are allowed to ask a classmate to review for you. If you adopt this peer-review process, then you should follow the following guidelines:

Submission

A softcopy of the assignments must be submitted to the /home/cs231/ directory, in pdf format. It is required that you typeset the assignment using Latex. You can find some good tutorials here, and here. And a complete book here.

Working with Latex

You can work with Latex editors locally on your computers. There are many editors, and I personally use Atom since it works for both Windows and Latex. In any case, you must download the Tex libraries first. For Windows, you need the Miktex library, and for Mac OS, you need the MacTex library. If you don't want to go through all of that, you can always use sharelatex.com, which is an online editor and compiler, with some nice tutorials as well.

Late Assignment Policy.

No late work will be accepted unless there are extenuating circumstances (e.g., sickness, personal crisis, family problems). In this case you may request an extension before the due date.
The softcopy submission will be a dated file. If the formal solutions are distributed before you turn in a late assignment, you are bound by the Honor Code not to examine these solutions.
Late passes will be distributed in the second week of class. They allow you to get 24-hour extensions on any assignment.

Course FAQs

Exam questions:

Q: How can we memorize all of these algorithms before the exam?
A: The exam is open book / notes. No need to memorize anything.

Q: How long will the exam be?
A: It's only 70 minutes long. Definitely shorter than the assignments!

Q: How will the questions look like?
A: A mix of things, but it'll never be a type of problem, in which you write the algorithm to solve a new problem, and analyze it.



Assignment questions:

Q: If the problem doesn't ask us to prove the correctness of the algorithm, then we don't have to write a proof. Right?
A: Yes, you don't have to write a proof. However, what if your algorithm was incorrect? Showing us your reasoning would give you partial credit. Just a simple explanation of your reasoning would suffice.

Q: Should I write the algorithm in English? Or do I have to explain the data structures that I am using?
A: If you are not required to show the data structures that you'll be using, then you can just explain the algorithm in English. Remember, if you are asked to analyze the running time complexity of the algorithm, thinking about which data structures to use matter.

Q: Do I have to use the latex template provided?
A: Yes, you do.