Introduction to Algorithms

Section 01: Sheldon / Section 03: Barrington

Welcome to the Fall 2021 homepage for CMPSCI 311: Introduction to Algorithms. Below find basic information, coursework and schedule, and detailed course policies.

Section 01 | Tuesday, Thursday 11:30-12:45pm Goessmann Lab 20 Instructor: Dan Sheldon (sheldon at cs.umass.edu ) |

Section 03 | Tuesday, Thursday 4:00-5:15pm Ag. Engineering Bldg 119 Instructor: David Mix Barrington (barring at cs.umass.edu ) |

Required Textbook | Algorithm Design, 1st edition by Jon Kleinberg and Eva Tardos |

Moodle | https://umass.moonami.com/course/view.php?id=22708 |

Gradescope | https://www.gradescope.com/courses/299373 |

Piazza | https://piazza.com/umass/fall2021/compsci3110103/ |

TAs | Zhanna Kaufman (zhannakaufma at umass.edu) Yunfei Luo (yunfeiluo at umass.edu) Hasnain Heickal (hheickal at cs.umass.edu) Sylee Dandekar (sdandekar at cics.umass.edu) Cooper Sigrist (csigrist at umass.edu) |

Office Hours | Complete list |

- Midterm 1: Wednesday, September 22 from 7–9pm in ILC N-151 and ILC S-331
- Midterm 2: Wednesday, October 20 from 7–9pm in Mahar auditoriam (MAH0108)
- Midterm 3: Wednesday, November 10 from 7–9pm, place TBD
- Final exam: Tuesday, December 14 from 6–8pm in ILC N-151

Weekly online assignments be posted on Gradescope and due on Fridays at 11:59pm.

Challenge problem sets will be posted here and submitted on Gradescope:

- Challenge Problems 1: due Fri 9/17 at 11:59pm
- Challenge Problems 2: due Fri 10/1 at 11:59pm
- Challenge Problems 3: due Fri 10/15 at 11:59pm
- Challenge Problems 4: due Fri 10/29 at 11:59pm
- Challenge Problems 5: due Mon 11/15 at 11:59pm
- Challenge Problems 6: due Fri 12/3 at 11:59pm

(due dates tentative until posted; typically posted 2 weeks before due date, plus or minus a couple days)

Here is an approximate schedule for the course. This is subject to change and will be updated as we go. Slides will be added after class—links will be broken until they are added. Note that lectures will include a mixture of slides and board work, and material presented on the board is not necessarily reflected in the slides. Another set of slides that roughly matches the material we cover can be found here.

Week | Date | Topic | Reading and Background | |
---|---|---|---|---|

1 | Lec 01 | 9/2 | Introduction and Stable Matching | Chapter 1 |

Dis 01 | 9/3 | |||

2 | Lec 02 | 9/7 | Algorithm Analysis | Chapter 2.1, 2.2 |

Lec 03 | 9/9 | Algorithm Analysis | Chapter 2.4 | |

Dis 02 | 9/10 | |||

3 | Lec 04 | 9/14 | Algorithm Analysis / Graphs | Chapter 3.1, 3.2 |

Lec 05 | 9/16 | Graphs | Chapter 3.3, 3.4 | |

Dis 03 | 9/17 | |||

4 | Lec 06 | 9/21 | Graphs | Chapter 3.5, 3.6 |

Lec 07 | 9/23 | Greedy | Chapter 4.1 | |

Dis 04 | 9/24 | |||

5 | Lec 08 | 9/28 | Greedy | Chapter 4.2 |

Lec 09 | 9/30 | Greedy | Chapter 4.4 | |

Dis 05 | 10/1 | |||

6 | Lec 10 | 10/5 | Greedy | Chapter 4.5, 4.6 |

Lec 11 | 10/7 | Divide and Conquer | Chapter 5.1, 5.2 | |

Dis 06 | 10/8 | |||

7 | Lec 12 | 10/12 | Divide and Conquer | Chapter 5.4, 5.5 |

Lec 13 | 10/14 | Divide and Conquer | Chapter 5.2, 5.6 | |

Dis 07 | 10/15 | |||

8 | Lec 14 | 10/19 | Dynamic Programming | Chapter 6.1, 6.2 |

Lec 15 | 10/21 | Dynamic Programming | Chapter 6.3, 6.4 | |

Dis 08 | 10/22 | Ace the Coding Interview | ||

9 | Lec 16 | 10/26 | Dynamic Programming | Chapter 6.6 |

Lec 17 | 10/28 | Dynamic Programming | Chapter 6.8 | |

Dis 09 | 10/29 | |||

10 | Lec 18 | 11/2 | Network Flow | Chapter 7.1, 7.2 |

Lec 19 | 11/4 | Network Flow | Chapter 7.2, 7.3 | |

Dis 10 | 11/5 | |||

11 | Lec 20 | 11/9 | Network Flow | Chapter 7.5, 7.10 |

11/11 | No Class — Veteran’s Day | |||

Dis 11 | 11/12 | |||

12 | Lec 21 | 11/16 | Intractability | Chapter 8.1 |

Lec 22 | 11/18 | Intractability | Chapter 8.2, 8.3 | |

Dis 12 | 11/19 | |||

13 | Lec 23 | 11/23 | Intractability | Chapter 8.3 |

11/25 | No class — Thanksgiving | |||

11/26 | No discussion — Thanksgiving | |||

14 | Lec 24 | 11/30 | Intractability | Chapter 8.4 |

Lec 25 | 12/2 | Approximation Algorithms | Chapter 11.1, 11.2 | |

Dis 13 | 12/3 | |||

15 | Lec 26 | 12/7 | Randomized Algorithms / Review | Chapter 13.1, 13.2, 13.4 |

*(subject to change until classes begin)*

CS 187 and CS 250 are important prerequisites. These provide familiarity with basic data structures and mathematical reasoning. You should be able to program in Java, C, or a related language.

The required textbook is Algorithm Design, 1st edition by Jon Kleinberg and Eva Tardos. It will be used for readings and homework problems.

Students will complete:

- Weekly online homework assignments, focused on learning goal mastery
- 5–6 sets of “challenge problems”
- Three evening exams
- One final exam
- Readings
- Weekly discussion exercises
- ~
~~Weekly Moodle quizzes~~~

The grade percentages are as follows:

**Participation**(~~10%~~11%): Discussion and in-class participation (iClicker)**Moodle quizzes**(5%): Weekly, focused on engagement with course material**Homework**(~~10%~~11%): Weekly online assignments on Gradescope focused on learning-goal mastery**Challenge problems**: (~~20%~~21%): Roughly bi-weekly, focuses on algorithm design**Self-assessments**(~~5%~~6%): Review solutions to challenge problems and self-assess your own solutions**Test 1**(10%): Focuses on first quarter of class**Test 2**(10%): Focuses on second quarter of class**Test 3**(10%): Focuses on third quarter of class**Final**(20%): Covers all course materials**Free point**(1%): for being you

(Updated 9/24: Moodle quizzes dropped and categories grade adjusted)

To compute the final grade, all grades will be mapped to a ten point scale and then averaged:

- Numeric grades will map linearly to 0–10; for example, a percentage grade of 93% will map to 9.3 and 68% will map to 6.8.
- Letter grades (e.g., for challenge problems) will map as follows: A=9.5, B=8.5, C=7.5, D=6.5, F=5.5. These correspond to the
*middle*of the grade range, so that the average of two neighboring letter grades falls exactly on their boundary: in other words, the average of an A and B is 9.0, which is considered the dividing line between B+ and A–.

The overall average grade will be rounded to the nearest hundredth, and then grade ranges for final letter grades will be approximately: A (9.33-10.00), A- (9.00-9.32), B+ (8.67-8.99), B (8.33-8.66), B- (8.00-8.32), C+ (7.67-7.99), C (7.33-7.66), C- (7.00-7.32), D+ (6.67-6.99), D (6.00-6.66), F (0-5.99). The instructors reserve the right to adjust grade thresholds, but will not increase the minimum score required to receive any letter grade.

**Online homework assignments**should be completed independently. These are focused on mastering learning goals, and are similar to what will appear on tests. You are allowed/encouraged to ask for help from course staff or other students to learn how to solve the problems, but should eventually complete the problems on your own. Copying, sharing, or viewing any solutions that are not your own is a violation of course policy.**Challenge problems**. Collaboration is allowed. These problems take time to understand and solve, and you can benefit from developing ideas and solutions in small groups.**However, each student must write their own solutions, and no collaboration is allowed while writing the solutions.**Writing solutions on your own will cement understanding of the problem and demonstrate mastery of the solution.**Looking at solutions from other students or any other source (including the web), or collaborating to write solutions, is considered a violation of the Academic Honesty Policy.**It is easy to tell when a student has referred to solutions that are not their own.**Moodle quizzes**: No collaboration is allowed, but you may use the book and lecture notes.**Discussion**: Exercises during discussion sections will be completed in assigned groups.**Exams**: Closed book and no electronics.

The course staff will pursue academic honesty charges for any suspected violation of course collaboration and cheating policies.

You will receive credit for completing discussion exercises and answering iClicker questions during lectures:

- For lectures, each iClicker question during is worth 1 point, with 80% credit for participation and 20% for correctness. Lectures in the first two weeks (i.e., the first three lectures) will not be counted. After that, the lowest three grades will be dropped.
- For discussions, worksheets will be collected at the end of each discussion. Students will receive full credit for participation. The lowest two grades will be dropped.

In effect, this means you can miss three lectures and two discussions with no penalty.

We reserve the right to change particpation grading (e.g., to grade discussion exercises for completeness or correctness) if engagement is a problem.

To request an excused absence (e.g., for illness, conflict with recognized university activities, religious holidays, or other things beyond the student’s control), fill out this private questionnaire on Moodle. iClicker questions and discussion exercises for excused absences will be dropped when computing your average.

In the event of disruptions due to COVID-19, modifications to the participation policy may be announced.

~~Quizzes will be issued before the weekend and must be submitted before 8pm on Monday. No credit will be given for late quizzes, but the lowest scoring quiz will be dropped.~~~

(Update Sep 24): Moodle quizzes have been discontinued and grade categories adjusted accordingly.

Online Gradescope homework assignments will due most Fridays and posted about a week in advanced. These will focus on mastery of learning goals and mimic the types of questions you can expect on exams.

These usually involve designing an algorithm for a novel problem and proving it correct. They assess your ability to apply the more concrete learning goals to solve new problems, and to use logic and language to precisely communicate your solution and justify why it is correct.

Challenge problems will be graded as one of ✗, ✓–, ✓, or ✓+ using the rubric described below. Grades of ✓ and ✓+ indicate mastery and will contribute to your homework grade as follows:

Grade | Criteria |
---|---|

A | Complete at least 12 challenge problems with ✓ or better; including at least 6 with ✓+ |

B | Complete at least 8 challenge problems with ✓ or better; including at least 4 with ✓+ |

C | Complete at least 6 challenge problems with a ✓ |

D | Attempt at least one challenge problem on each assignment |

For example, to earn a C you should aim to complete one challenge problem per assignment with a ✓ or better. To earn an A, you should aim to complete two per assigment with ✓ or better with one a ✓+. Since you don’t need to complete every problem, you are encouraged to focus your efforts on producing high-quality solutions to the problems you feel confident about. There is no benefit to guessing or writing vague answers to a problem you don’t know how to solve.

This rubric is based on Mark Talbert’s EMRN rubric:

Mark | Criteria |
---|---|

✓+ | The work meets or exceeds the expectations of the assignment. Communication is clear and complete. Mastery of the concepts is evident. There are no non-trivial errors. This work could be used as a classroom example. For an algorithm design problem: the algorithm is correct and clearly communicated, the running-time is correctly analyzed, and a convincing proof of correctness is given. There may be minor mistakes or omissions but no significant logic gaps. |

✓ | Understanding of the concepts is evident through correct work and clear, audience-appropriate explanations. Some revision or expansion is needed, but no significant gaps or errors are present. No additional instruction on the concepts is needed. For an algorithm design problem: the major components of the algorithm are correct, and a running-time analysis and proof are given. All parts of the solution are communicated in a way that a peer who didn’t already know the solution could understand it. There may be some logic gaps, but, on balance, the solution “hangs together”. |

✓– | Partial understanding of the concepts is evident, but there are significant gaps that remain. Needs further work, more review, and/or improved explanations. |

✗ | Not enough information is present in the work to determine whether there is understanding of the concepts. The work is fragmentary of contains significant omissions. Or, there are too many issues to justify correcting each one. |

Here is a link to a flow chart illustration of the rubric.

Challenge problems will be submitted via Gradescope. You must **submit challenge problems as a single pdf** (see Gradescope instructions):

- You may type your answers (e.g., using LaTeX) and save to a pdf;
- Or, you may
*neatly*write your solutions and scan them.*All scans must be high-quality*: rotated correctly, with enough contrast, and readable at a standard letter size. Please follow the Gradescope scanning guide; in particular, use a**recommended free scanning app**(typically Evernote Scannable for iOS or Genius Scan for Android). You should view the pdf once you submit to ensure it meets these standards.

Work that is not submitted in the correct format, is unreadable, or is excessively messy risks not being graded.

Intructors will post solutions to moodle 24 hours after the homework submission deadline and release the Gradescope assignment back to students for self-assessment. Each problem will be temporarily graded as “awaiting self-assessment”. Self-assessments are due 3 days after the submission deadline and 48 hours after solutions are posted. For each problem attempted, you must:

- Give yourself an assessment mark, either ✗, ✓–, ✓, or ✓+, based on the rubric above.
- Provide a short reflection on why you earned that mark, such as
- “My solution was on point and very similar to the posted solution”
- “I was confused by the definition of…”
- “I incorrectly assumed that …”

- (optional) Ask specific questions to prompt instructor or TA feedback, such as:
- “Can you check if this is actually a counterexample?”
- (indicate part of a proof you’re unsure of) “I didn’t know how to phrase this – is what I wrote on track?”

- (optional) Provide one hint for the problem (to your past self or future student)
- Submit the self-assessment by opening a regrade request on Gradescope for the problem and typing the text of your self-assessment in the text box for the regrade request. Here is a link to instructions on submitting a regrade request on Gradescope.

Late work that is not excused will receive no credit. A small grace period (on the order of 10 minutes) will generally be granted to accommodate technical issues, but it is best not rely on this.

Every student may use up to *three* “late days” to excuse late work (either online assignments or challenge problems):

- a late day allows you to submit one assignment up to 24 hours late without penalty
**at most one late day can be used per assignment**(solutions will be posted 24 hours after the due date)

To use a late day, you do not need to notify course staff; just submit within 24 hours after the due date, and we will automatically deduct one late day from your total.

In exceptional circumstances, students may be granted extensions by the instructors. If so, it is a violation of course policies to look at posted solutions prior to submitting work.

The discussion section will be used every week except when noted on the course schedule and will consist of exercises to practice solving problems in small groups. Attendance is required.

(Numbers 2 and higher correspond to chapters in Kleinberg and Tardos.)

**Cross-Cutting**. Develop skills in abstract reasoning and communication about algorithms- Use logic to reason about algorithms
- Use self-regulated learning to solve challenging problems that require multiple cycles of planning, executing, assessment, and adaptation
- Use language, pseudocode, and mathematical notation to understand and communicate precisely about algorithms

**Basics of Algorithm Analysis**. Use asymptotic order notation (big-O, big-Omega, and big-Theta) to analyze running times and compare growth rates- Prove statements about asymptotic order notation
- Compare growth rates of different functions
- Analyze the running time of algorithms

**Graphs**. Understand graph definitions, graph traversal algorithms, and how they are used as building blocks of algorithms- Work with graph definitions and execute traversal algorithms on example graphs
- Design algorithms using graph traversal

**Greedy algorithms**. Design greedy algorithms and understand greedy proof techniques- Evaluate greedy rules for optimality
- Prove correctness of greedy algorithms
- Reason about shortest paths, cuts, cycles, and spanning trees in graphs
- Work with Dijkstra’s, Prim’s, and Kruskal’s algorithms in examples

**Divide-and-Conquer**. Understand the divide-and-conquer design technique and analyze the running-time of recursive algorithms.- Use unrolling, recursion trees, and the master theorem to solve recurrences
- Verify the solution to a recurrence using induction
- Design divide-and-conquer algorithms and argue correctness

**Dynamic Programming**. Design dynamic programming algorithms- Write a recurrence for the optimal value of a dynamic programming problem
- Translate a recurrence into an iterative algorithm to compute the optimal value
- Modify an iterative algorithm for the optimal value to recover the optimal solution

**Network Flows**. Understand network flows and use them to design algorithms- Work with cuts and flows and execute the Ford-Fulkerson algorithm in example networks
- Design algorithms to solve network flow applications

**Intractability**. Reason about intractability- Design polynomial-time reductions between pairs of problems
- Prove that a problem is NP-complete using polynomial-time reductions

- We will use Piazza for the class discussion forum and contacting instructors and TAs. [link]
- We will use Moodle for quizzes and posting HW solutions and grades. [link]
- We will use Gradescope for submitting and returning homework and exams. [link]

Students and course staff in CS 311 are expected to do their part to slow the spread of COVID-19 and minimize risk of illness for all community members. It is important to remember that community members may be vulnerable or live with vulnerable individuals.

Students and course staff in CS 311 must comply with all university policies regarding COVID-19, including taking the COVID-19 Daily Self-Checklist and self-isolating (don’t come to class) if you have any symptoms, test positive, or are in contact with someone who tests positive and meet the criteria for self-isolation (see FAQs). If you are in any doubt, **please do not come to class**:

- All lectures will be recorded and posted to Echo360; in addition, pre-recorded videos from last year covering the same material will be posted
- You can request an excused absence from any course meeting by filling out this questionnaire. Having any symptom on the self-checklist is considered a valid medical reason for an excused absence. You will not be penalized for any missed iClicker questions, discussion exercises, etc.

As of the start of the Fall 2021 semester, **everyone must wear a mask to all indoor course meetings**, including lectures, discussion sections, exams, and office hours. For more details, see the face covering FAQ for the start of the Fall 2021 semester. The only exceptions to the face-covering policy are:

- Employees who receive a medical exemption through the Accessible Workplace Office (see face-covering FAQ)
- Students who receive a medical exemption through the Disability Services Office (see face-covering FAQ). If you have a valid medical exemption, you must notify the instructors and present documentation prior to attending a meeting without a face covering.
- A vaccinated instructor can choose to go unmasked while teaching if they can maintain at least six feet of distance from where students are sitting in the classroom (see Provost’s memo from 8/20/2021)

If a student in CS 311 does not comply with public health protocols (e.g. does not wear a mask), the course staff will first remind them of the protocols and their importance, and ask them to comply. If a student refuses to comply after being reminded by course staff, they will be asked to leave the course meeting; if they refuse, the course staff may elect to end the course meeting to allow other students and staff to leave, and then resume the course meeting on zoom after a short delay (if logistics permit).

If a student demonstrates repeated violations of public health protocols after reminders, course staff will submit a referral to the Student Conduct and Community Standards Office (SCCS) in the Dean of Students Office.

Please read the CICS inclusivity statement, copied here:

We celebrate the diversity in our community and actively seek to include and listen to voices that are often silenced in the computing world. We welcome all individuals regardless of age, background, citizenship, disability, sex, education, ethnicity, family status, gender, gender identity, geographical origin, language, military experience, political views, race, religion, sexual orientation, socioeconomic status, and work experience.

If you have a disability and would like to request accommodations, please contact Disability Services, located in 161 Whitmore Hall, (413) 545-0892. If you are eligible, they will grant you accommodations and notify the instructors.