# Spring 2018 **CS231**

This is a course about **algorithms** and their analysis

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.

To use late passes for assignments, please fill out this form.

No Class

Part I - Basics

Lecture 2: Tractability and Asymptotic order or growth

(slides)

Lecture 3: Data structures

(slides)

Assignment 1 due in class

Lecture 5: More on stable matching

(slides)

Assignment 2 due in class

Presidents Day

No class - Monday Schedule

Spring Break

Spring Break

Spring Break

Spring Break

Spring Break

Spring Break

Spring Break

Reading Period

Reading period

Final exams

Final exams

Final exams

Final exams

Final paper due

Enjoy your summer :)

** 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**
Please add yourself to the cs231-spring2017 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. 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 group 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 course group is also a good place
to find people to join a study group. You should plan on reading group
messages on a regular basis.

**Lectures **
There are two 70-minute lectures each week that will introduce the main content
of the course.
Lectures are held on Tuesdays and Fridays
at 1:30pm-2:40pm in E111.

**Final Poster and Paper**:
During the last few weeks of the
semester, teams of 2-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 poster session during reading period,
and will prepare a short paper to be submitted by the last day of exams.

**Exams**: There will be three in-term, in-class, non-collaborative
exams that are open book and open notes. There will be no final exam, as there will be
a final poster 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.

**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:

- Assignments: 35%
- Final Poster and Paper: 20%
- Exam 1 (in-class): 10%
- Exam 2 (in-class): 15%
- Exam 3 (in-class): 15%
- Class Participation: 5%
- Total: 100%

- Each pass can be used to get a 24-hour extension on a single assignment.
- To use a late-pass, you must notify the instructor by filling out this form, and then attaching the late pass to your hard copy.
- Passes are non-tranferrable and non-refundable :)

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: No, you don't, but you have to type it in latex, and submit a pdf. If you don't use the same template, you must at least copy the header of the assignment, to fill in the assignment meta data.