11/10/2017: Office hours updated:

- Drop-in: Mon 3-4, Tues 8-9:30 am, Wed 3-4, Friday 3-4
- By appointment: Thursday 9am-noon + other times. Click Here to book at least 12 hours in advance.
- If you would like to schedule something outside of these hours e-mail me, and I will do my best to find time to meet with you.

10/31/2017: Change to office hours for this week ONLY. 11/01/2017: 3pm-5pm, 11/02/2017: 12-2pm, 11/03/2017: cancelled

10/27/2017: Due date of PA3 now Oct. 15. Exam solutions on my door.

10/01/2017: Changes to Office Hours for the week of 10/02. No drop-in on Wed, Thurs, Friday. Additional office hours: Drop-in: Monday 3-4:30,f Tuesday (usual): 8:00-9:30.. Also by appointment through Calendly: Wed 10:15-1pm, Thursday 2-5pm, Friday 11:15-2:45pm, via Zoom

9/23/2017: New office hour schedule:

- Drop-in: Tues 8:00-9:30 am, Wed 3-4, Thursday 1-2, Friday 3-4
- By appointment: Thursday 9am-noon + other times. Click Here to book at least 12 hours in advance.
- If you would like to schedule something outside of these hours e-mail me, and I will do my best to find time to meet with you.

9/23/2017: Error found in pseudocode in PS2. Now corrected (see calendar for link), but link to old version is there too (called "Old Version").

9/20/2017 PS2 has been replaced!! Please see new version below.

The study of algorithms is central to computer science. Algorithms are important from a practical perspective (when creating programs or software), but they are also crucial for addressing some of the BIG questions of computer science: what can computers do, and what resources do they need to do it?

Learning Goals are broad and somewhat immeasurable goals that I want you to achieve by the end of the course. Learning Objectives are concrete, measurable learning outcomes that will help you to reach the Learning Goals.

- Ability to apply standard algorithmic paradigms to create, analyze runtime, and prove the correctness of algorithms for common, real-world problems.
- Appreciation of the creativity and beauty involved in algorithm design.
- Appreciation of the connection between algorithms and data structures.
- Awareness of the limits of efficient algorithms.

After completing this course, students should be able to

- Describe the following paradigms, give examples of algorithms that employ the following paradigms, classify algorithms according to the following paradigms, and create algorithms using the following paradigms:
- Divide and Conquer
- Dynamic Programming
- Greedy
- Randomized
- Local Search

- Prove correctness of deterministic algorithms using inductive proofs, loop invariants, exchange arguments, and proofs by contradiction.
- Analyze the runtime of algorithms. Analyze expected runtime of randomized algorithms using linearity of expectation and indicator variables.
- Explain major graph algorithms and their analyses, and create new graph algorithms.
- Give examples of algorithms that use data structures, and explain how the choice of data structure can affect the performance of an algorithm.
- Understand the meaning of NP completeness, and describe several NP Complete problems.
- Create a reduction from one problem to another.
- Implement algorithms using various design paradigms.

The syllabus contains important information! You are expected to be familiar with all of the information contained in the syllabus.

**Time and location:** Monday, Wednesday, Friday 1:45-2:35 PM in MBH 538

**What do I call you?** Please call me Professor Kimmel or Professor. I use the pronouns she/her/hers.

**Professor Office Hours:** in MBH 635.

- Drop-in: Mon 3-4, Tues 8:00-9:30 am, Wed 3-4,Friday 3-4
- By appointment: Thursday 9am-noon + other times. Click Here to book at least 12 hours in advance.
- If you would like to schedule something outside of these hours e-mail me, and I will do my best to find time to meet with you.

**Tutor Office Hours:**
See the CS Tutoring Site

**Super Useful Department Wiki: **Here!

**Communication:** I will use e-mail to communicate with you about urgent matters. Please check your Middlebury e-mail at least once a day. I will post less urgent messages (e.g. a change in office hours) to the announcements section of this site. Please check the Calendar regularly for an up-to-date record of assignments, due dates, and lecture notes.

**Texts:**

There are no required texts. I will post lecture notes after each lecture. If you would like a different perspective from the one I provide in class, I suggest the following two texts, which are on reserve at Armstrong Library:

- Algorithms by Dasgupta, Papadimitriou, and Vazirani
- Introduction to Algorithms by Cormen, Leiserson, Rivest, and Stein

**Prerequisites:**

CSCI 200 and 201. We will be writing a lot of proofs in this course, so please review your proof writing notes from 200. Here is a short guide to writing a good proof.

**Growth Mindset:**

I expect all students to work to develop a growth mindset: awareness that intelligence is not fixed, and that your ability in any skill will increase through practice. I will provide many low-stakes opportunities for you to practice skills in this course, including in-class activities and problem sets.

Part of developing a growth mindset is viewing critical feedback (through grades or other forms of assessment) for what it is: an opportunity to understand your weaknesses and improve on them, rather than a sign of failure. This perspective will not only tend to improve your grades, but will make learning more enjoyable.

**Group Work:**

You will be assigned to a small group for in class discussions and problem solving. Groups will be assigned randomly. Diverse groups tend to perform better than
homogeneous groups, so please think about what diverse perspectives or
background you might bring to your group.

**Technology in the Classroom**

You may **NOT** use any type of cell phone, tablet, or computer during class, unless you have a compelling reason. Please come talk to me if you have a compelling reason for wanting to use technology. Otherwise, I will ask you to put the technology away, or step out of the class while using it. Taking notes on a laptop has been shown to be less effective and lower quiz scores not only for the student using the device, but for nearby students as well (because it distracts those around you).

**Office Hours and E-mail Policy**

Please come to office hours with specific questions, comments, or concerns.
I will not answer coding questions or problem set questions via e-mail, except for logistical questions.

**Problem Sets**

As mentioned above, problem sets are an
opportunity for you to practice the skills of this course, and to become aware
of areas for further practice and improvement. Because of this, only a small
part of your grade is based on the correctness of your responses.

Each problem set will have two parts:

Part 1:

- What: responses to problem set questions
- Goal: Practice the skills you are learning
- Due: Mondays by the beginning of class
- Submission: electronically as pdf through Canvas (handwritten work should be scanned) - keep original copy. Please make sure your submission is correctly oriented in portrait format.

Part 2:

- What: self-grade and reflection
- Goal: Recognize weaknesses and mistakes. Critically think about your learning process.
- Due: Wednesdays at the beginning of class
- Submission: Paper in class.

Please see the Resources tab for a sample problem set procedure.

**Programming Assignments**

Programming assignments are an opportunity for you to apply your knowledge

- What: a java implementation of an algorithm we discuss in class.
- Goal: Understand subtleties of algorithm design that do not become apparent until you actually try to code it up.
- Due: Every couple of weeks, before class on the day it is due. See the calendar for assignments and deadlines.
- Submission: Electronically through canvas

**Quizzes and Tests**

One of the primary ways I assess your learning is through quizzes and tests. However, you should also view these assessments as feedback on your own learning. There will be quizzes on most Fridays. Quizzes will usually consist of two problems, one from topics on the problem set due earlier that week, and one from earlier topics. (Questions will typically be similar to in-class activities or problem sets questions.)

The midterm will be self-scheduled, with pick-up from my office door from Wednesday Oct 18 at 11:05 until Friday Oct. 20 at 6pm.

The final will be scheduled, Dec. 16, 2-5pm.

**Get Out of Jail Free Passes**

I will drop your two lowest problem set scores, your two lowest quiz scores, and your lowest programming assignment score.

**Evaluation and Grading**

Your final grade will be determined as follows:

- Final:25%
- Midterm: 20%
- Quizzes: 20% (approximately 2% each)
- Problem Sets: 20% (approximately 2% each)
- Part 1 will constitute 50% of each problem set grade and will be graded based on this rubric.
- Part 2 will constitute 50% of each problem set grade and will be graded based on this rubric.
- No late homeworks will be accepted. (If only Part 2 is late, you can still get credit for Part 1.) However, see Get out of Jail Free Passes and Excused Absences and Extensions.
- If your homework is illegible, no credit will be given. I strongly encourage typing (see the Resources Tab).
- If you find a mistake in my solutions, you will receive bonus points worth the amount that would have been taken off for my error.
- Programming Assignments: 7.5%
- Graded based on this rubric.
- You will not receive credit for late programming assignments. However, see Get out of Jail Free Passes and Excused Absences and Extensions.
- Class Participation and Attendance: 7.5%
- Your participation will be graded according to this rubric.
- Because of the emphasis on group work, it is important that you attend class regularly. For each unexcused absence after the first, you will receive a 3.33% deduction from your final grade.

Note: rubric points do not necessarily correspond to percentage points.

**Excused Absences and Extensions:**

If you miss class because of sickness, a doctor/nurse's note should be provided. If you will miss class because of a religious observance, please notify me within the first two weeks of class. Other absences will be dealt with on a case by case basis, but please let me know as early as possible if you will not be able to attend a class. If you miss class, you are still responsible for the missed material. You should carefully read the lecture notes for the class you miss. I will be happy to answer questions related to the lecture, but I will not repeat the lecture for students who missed the original. Quizzes will be rescheduled as necessary for students with an excused absence.

In extenuating circumstances (e.g. personal crisis, serious illness, family problems) extensions for assignments or quizzes may be granted. Please contact me in this case.

**Honor Code:**

You are expected to maintain the highest level of academic integrity in this course. This means that work you submit must be the result of your own individual effort. You may discuss problem sets and programming assignments with other students in the course, but you may not collaborate in the actual writing of problem sets or code. (This is obviously to your benefit as a learner, since your skills will not improve if you do not practice those skills!)

If you work with another student on a problem set or programming assignment, or if another student contributes a significant idea that you use, please acknowledge that person (e.g. "I worked with xxx on this problem.") For programming assignments put this acknowledgment in a comment header.

Regarding problem sets: You may not read, copy, or possess another student's solutions, solutions from previous semesters, or solutions you may find online, while working on Part 1. While working on Part 2, in order to grade your problem set, you may obviously look at the written solutions I provide, but you can also look at other students' solutions in order to discuss self-grading. The reflection must be entirely your own work.

Regarding programming assignments: You can help one another, but I do not want to see identical assignments that differ only in small ways. If someone does show you code (as an explanation or asking for debugging help), do not copy it. Retain ideas, and go away and write your own version later. I encourage you to help classmates to debug misbehaving code. You are welcome to use the internet to look up approaches for basic language functionality, but you may not look up code that implements the complete solution.

The exams and quizzes must be entirely your own work. You may not share any information about tests or quizzes with any other students, either within or outside of the course.

**Academic Accommodation:**

Students with documented disabilities who may need accommodations in this class (e.g., extra time on exams) are encouraged to contact me as early as possible to ensure that such accommodations are implemented in a timely fashion. Assistance is available to eligible students through the Student Accessibility Office. Please contact one of the ADA Coordinators. Jodi Litchfield cab be reached at litchfie@middlebury.edu or 802-443-5936 and Courtney Cioffredi can be reached at cioffredi@middlebury.edu or 802-443-2169 for more information. All discussions will remain confidential.

**Disclaimer:**

This syllabus is a guideline, and parts may be subject to change if we find that they are not conducive to your learning.

The following is a sample procedure for how problem sets work in this course.

- A problem set is assigned, usually on Mondays. Here is a sample problem set.
- The following Monday, you should turn in your answers to the problem set (this is Part 1 of the assignment). For example if you use Latex, your solution to the sample problem set might look like this.
- The same Monday that you turn in Part 1, I will post solutions, which would look like this for the sample problem set.
- The Wednesday after you submit Part 1, Part 2 will be due. Part 2 contains two subparts:
- You should submit a marked up (using a pen whose color is not the same as the color of your solutions), graded copy of the problem set you submitted for Part 1. You should grade using the solutions I provide and these rubrics. You can also come discuss grading with me or the TAs. Note that the number of points next to a problem informs you which rubric you should use. Here is an example of grading for the sample problem set. In the sample, the problem is an 11-point problem, so you should use the rubric for 11-point problems. There are three categories for 11-point problems, so the grade includes a subgrade for each part, and an explanation as necessary.
- You should submit a reflection on your experiences while working on and grading the problem set. Here is a worksheet with suggested questions to answer. For example, here is an example of a reflection for the sample problem set.

- After turning in your self-grade, we will give you our grade and comments for Part 1 of the problem set, using the same rubric you used for your self-grade (i.e. this one). (This will hopefully be done through Canvas.)
- Based on the feedback from your self-grade and from our comments and grade, you should tailor your study for the quiz that week.
- We will return the combined problem set and reflection with a final grade for Part 2. Part 2 will be graded using this rubric.

You grades for nearly all problem set questions will depend on the clarity of your writing and thinking, and not just on correctness. It is very hard to write a good problem set solution that is both clear and correct on the first try. I strongly encourage you to revise your problem set solutions at least once. One of the things that makes this easier is typing your solutions. I recommend LaTex, but it is not required. See these tutorials for a good introduction to LaTex.

If you find you are struggling with a problem and getting frustrated, take a break and come back to it, preferably a day later. Research indicates that sleep is very important for learning. I have often been surprised when a concept that I could not grasp one day suddenly became clear the next day. (A corollary of this is that you should not start your problem set the day before it is due.)

If you find during the self-grade or based on our grading of a problem set that you have made a serious mistake, I recommend looking at the solution, then putting the solution away and trying to solve the problem again. This practice will help you to learn. If you find that you need more practice, try looking for similar problems in the textbooks listed above, or ask me for suggestions.

I do not expect you to do all parts of all problem sets correctly. The problem set is an opportunity for you to practice and learn. You can still get an A in this course without getting 100% on the problem sets.

NOTE! This calendar is subject to change (except for past dates.) Please check regularly.

Jump to This Week

class: Reading/Class eval: Quiz or Test PS: Problem Set or Other Assignment

Topics: DCR:Divide and Conquer / Recursion DP:Dynamic Programming GD:Greedy GR:Graph NP:NP Problems

PS=Problem Set, PA=Programming Assignment

Jump to This Week

class: Reading/Class eval: Quiz or Test PS: Problem Set or Other Assignment

Topics: DCR:Divide and Conquer / Recursion DP:Dynamic Programming GD:Greedy GR:Graph NP:NP Problems

PS=Problem Set, PA=Programming Assignment

class Introductions Lecture Notes

PS Assign: Questionnaire (due Sept 15)

PS Assign: PS1 pdf/tex (due Sept 18 to Canvas)

PS Assign: PA1 (due Sept 25 to Canvas)

PS Assign: Questionnaire (due Sept 15)

PS Assign: PS1 pdf/tex (due Sept 18 to Canvas)

PS Assign: PA1 (due Sept 25 to Canvas)

class Self-Grade and Reflection, Proofs of Algorithm Correctness
Lecture Notes, Faulty Proof of Correctness, Solution for Proof of Correctness

PS Due: PS1

PS Assign: PS2 pdf/tex (due Sept 25 to Canvas) Old Version

PS Due: PS1

PS Assign: PS2 pdf/tex (due Sept 25 to Canvas) Old Version

class Closest Points, Master Method
Lecture Notes (Closest Points),
Lecture Notes (Master Method)

PS Due: PS2

PS Due: PA1

PS Assign: PS3 (tex) (due Oct 2 to Canvas)

PS Assign: PA2, QuickSortNums.txt (due Oct 11 to Canvas)

PS Due: PS2

PS Due: PA1

PS Assign: PS3 (tex) (due Oct 2 to Canvas)

PS Assign: PA2, QuickSortNums.txt (due Oct 11 to Canvas)

class Probability Crash Course Panopto Video, Lecture Notes (ppt from video)

Optional Readings: Mathematics for Computer Science Section IV, Introductory Statistics with Randomization and Simulation Appendix A

PS Due: Reflection/Grade PS3

Optional Readings: Mathematics for Computer Science Section IV, Introductory Statistics with Randomization and Simulation Appendix A

PS Due: Reflection/Grade PS3

classDynamic Programming: MWIS
Lecture Notes

PS Due: PS4

PS Assign: PS5 (tex) (due Oct 16)

PS Assign: PA3 (due Nov 8) Please use this file of unknown animals

PS Due: PS4

PS Assign: PS5 (tex) (due Oct 16)

PS Assign: PA3 (due Nov 8) Please use this file of unknown animals

classDP

eval Midterm self-scheduled from Oct. 11 to Oct. 13

eval Midterm self-scheduled from Oct. 11 to Oct. 13

No Class!

class Dynamic Programming: Knapsack
Lecture Notes

PS Assign: PS6 (tex) (due Oct 30)

PS Due: Reflection/Grade PS5

PS Due: Mid-semester Evaluation Survey

PS Assign: PS6 (tex) (due Oct 30)

PS Due: Reflection/Grade PS5

PS Due: Mid-semester Evaluation Survey

class Dynamic Programming: Sequence Alignment Lecture Notes

PS Due: PS6

PS Assign: PS7 (tex) (due Nov 6)

PS Due: PS6

PS Assign: PS7 (tex) (due Nov 6)

class Data Structures in Shortest Path Algorithms
Lecture Notes

PS Due: PA3

PS Due: Reflection/Grade PS8

PS Due: PA3

PS Due: Reflection/Grade PS8

class More Shortest Path Algorithms Lecture Notes on Dijkstra Heap Runtime,
Lecture Notes on Bellman Ford

PS Due: PS9

PS Due: PS9

No Class!

No Class!

class GR:

PS Assign: PS10 (due Dec 4)

PS Assign: PS10 (due Dec 4)

class NP:

PS Due: Reflection/Grade PS9

PS Due: Reflection/Grade PS9

class NP:

eval Quiz: PS9

eval Quiz: PS9

class NP:

PS Due: PS10

PS Due: PS10

class NP:

PS Due: Reflection/Grade PS10

PS Due: Reflection/Grade PS10

class NP:

eval Quiz: PS10

eval Quiz: PS10

Office: MBH 635

Office Hours:

Email: skimmel [at] middlebury [dot] edu

Office Hours:

- Drop-in: Mon 3-4, Tues 8:00-9:30 am, Wed 3-4, Friday 3-4
- By appointment: Thursday 9am-noon + other times. Click Here to book at least 12 hours in advance.

Email: skimmel [at] middlebury [dot] edu