# COMPSCI 311: Introduction to Algorithms

### Spring 2022

Welcome to the Spring 2022 homepage for COMPSCI 311: Introduction to Algorithms (4 credits).
The course will be co-taught by Marius Minea and Md. Abdul Aowal. The two sections will share TAs and graders, Moodle, Campuswire and Gradescope sites, and there will be common assignments, quizzes, and midterms, and same or similar finals.

Basic Information
Section 1: MW 2:30 - 3:45pm, Hasbrouck 124
Section 2: MW 4 - 5:15pm, Hasbrouck 134
Discussions: Friday (50 min.), see SPIRE for your section information.
Office hours: see schedule on Campuswire and Moodle

Course Staff

• Instructors: Marius Minea (marius at cs) and Md. Abdul Aowal (aowal at cs)
• TAs: Hiba Ahsan, Weiqi Feng, Hasnain Heickal, Ali Naseh, Md. Farhan Tasnim Oshim
• UCAs: Nitya Aryasomayajula, Pranav Garg, RuiLong Jiang, Jake Leone, Kirin Sarangkasiri, Animesh Saxena, Paarth Tandon, Jacob Urisman

Course Objectives, Prerequisites, and Learning Outcomes

This course will introduce you to algorithms in a variety of areas of interest, including graph and network algorithms, scheduling, searching, sorting, and string processing. To implement in code solutions to complex problems, we must first design such algorithms. This typically involves:

• formulating a clear problem definition
• proposing an algorithm
• proving that it correctly solves the problem
• analyzing its running time.
You will learn perform this process of algorithm design using several algorithmic paradigms, including greedy algorithms, divide and conquer, dynamic programming, and network flow. Finally, you will learn to recognize when no efficient algorithm solves the problem, understand NP-completeness and computational intractability, and see how approximation or randomized algorithms provide alternatives.

Prerequisites: COMPSCI 187 and either COMPSCI 250 or MATH 455. Mathematical experience (as provided by COMPSCI 250) is required. You should also be able to program in Java, C, Python, or some other closely related language.

Resources
Grading, requirements, exam schedule, and make-up policies
• Homework (40%: six assignments, 36%, and self-assessments after completing each assignment, 4%).
• Learning assessment quizzes for each topic (12%) -- usually weekly
• Discussion sections (8%)
• Midterm 1 (12%): Focus on first third of the class.
• Midterm 2 (12%): Focus on second third of the class.
• Final (16%): Covers all lectures.
Learning Goal Quizzes will be weekly and can be re-attempted. You may reattempt at most 4 quizzes. Each quiz consists of 5-10 multiple-choice questions. Most questions can be attempted twice, with 50% of the score for the second attempt. Quizzes are graded as passed or failed: a quiz is graded as passed if you earn at least 70% on the quiz. Each passed quiz earns a point.

This course will have two midterm exams and one final exam:
Midterm 1: Thursday, March 3, 7-9pm, location TBA
Midterm 2: Thursday, April 14, 7-9pm, location TBA
Final Exam (16%): time and location TBA (announced in SPIRE)

You must notify both instructors in advance if you are unable to take the exams at the scheduled time (e.g., due to illness). If a severe accident prevents you from communicating (or asking someone else to do it), you must notify the instructors as soon as you are able to. Failure to do this and missing the exam results in a grade of zero.

Tentative letter grade thresholds:
90: A
86: A-
82: B+
78: B
74: B-
70: C+
66: C
62: C-
58: D+
54: D
These thresholds may be adjusted based on the overall performance in the course, but will not be more strict.

Attendance and late work submission policy
You are expected to attend lectures -- this is the best way to engage in discussion and understanding of the material. If you cannot attend (e.g., for medical reasons), you are expected to watch the lecture recordings. Discussion attendance is mandatory and part of the course grade. If you cannot attend a discussion (e.g., for medical reasons), you must notify the TA leading your section ahead of time to determine how to make up the discussion activity. All homework will be due at 11:59 PM on the due date. You get one late day to use on one homework of your choice. Please allow time to check and make sure you've submitted everything properly, and avoid any unexpected issues (slow Internet connection, uploading the wrong file in a hurry, etc.) Also, expect homework problems to take several iterations of thinking and coming up with the solution, refining, etc., to complete. We suggest you begin working on them early, so you can ask any needed questions, discuss them in your study groups and use office office hours effectively.

Academic Honesty and Collaboration Policy
You are encouraged to form study groups, learn and discuss the course material jointly with others.
You must do learning assessment quizzes and exams on your own.
You may collaborate with a few other students on homework assignments, provided that (a) you indicate anyone with whom you worked and (b) the final presentation is entirely your own. As a guideline, to distinguish discussion from plagiarism, it is useful to divide work into an "ideas phase", in which you can discuss problems (verbally or perhaps using a whiteboard) but do not leave with shared written matter, and a "writeup phase", which you do entirely on your own. If you have questions about this matter, please ask.
You are encouraged to ask public questions, in office hours or on Campuswire. Your questions and the answers to them can be useful for others as well (and you are encouraged to help with answers). Public questions about homework should be of a general nature (clarification, applicable course material, asking for hints), and not involve details of your solution attempt. Use private questions otherwise if needed.

As members of the College of Information and Computer Sciences at UMass Amherst we expect everyone to behave responsibly and honorably. In particular, we expect each of you not to give, receive, or use aid in examinations, nor to give, receive, or use unpermitted aid in any academic work. Doing your part in observing this code, and ensuring that others do likewise is essential for having a community of respect, integrity, fairness, and trust.
If you cheat in a course, you are taking away from your own opportunity to learn and develop as a professional. You also hurt your colleagues, and this will hurt people you will work with in the future, who expect an honest and responsible professional.
As faculty, we pledge to use academic policies designed for fairness, avoiding situations that are conducive to violating academic honesty, as well as unreasonable or unusual procedures that assume dishonesty.
We will follow the university's Academic Honesty Policy and Procedures established by the university to ensure that the learning environment is both honest and fair. Integrity is essential in all aspects of higher education, academic dishonesty is prohibited in all university programs, including this course. Academic dishonesty as defined by the University's Academic Honesty Policy includes but is not limited to:

• Cheating - the intentional use or attempted use of trickery or deception in one's academic work.
• Fabrication - intentional falsification and/or invention of any information or citation
• Plagiarism - knowingly representing the words or ideas of another as one's own work
• Facilitating Dishonesty - knowingly helping or attempting to help another commit an act of academic dishonesty.
Any violation of the Academic Honesty Policy could result in a failing grade in the course and initiation of the formal Academic Honesty Procedures of the University. Students are expected to be familiar with these policies, if you have any questions please email the course instructors for clarification.
The College of Information and Computer Sciences explicitly forbids any redistribution (including publicly available posting on an internet site) of any CICS course materials (including student solutions to course assignments, projects, exams, etc.) without the express written consent of the instructor of the course from which the materials come. Violations of this policy will be deemed instances of “facilitating dishonesty” (since a student making use of such materials would be guilty of plagiarism) and therefore may result in charges under the Academic Honesty Policy.

Accomodations
Both the University of Massachusetts Amherst and your course staff are committed to providing an equal educational opportunity for all students. If you have a physical, psychological, or learning disability documented with Disability Services, please communicate your needs to us in the first two weeks of the semester so that we may make any necessary accommodations. If you are not sure if you qualify for an accommodation or if you have any questions on the topic of accommodations please contact Disability Services for more information.

Communication policy and response frequency We use Campuswire for communication. We will attempt to answer all questions within 24 hours and often much sooner. However, you should not rely on last-minute questions for help on homework. When needed, use private instructor-only posts rather than e-mail, this will make them more readily seen, and any of the staff team can answer them. For sensitive private matters, email both instructors.

Equity and Inclusion Statement
We are committed to fostering a culture of diversity and inclusion, where everyone is treated with dignity and respect. This course is for everyone. This course is for you, regardless of your 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, or work experience.
Because of that, we should realize that we will be bringing different skills to the course, and we will all be learning from and with each other. We may have different background and skills in courses taken, mathematical, algorithmic, coding or testing background, ways to communicate orally and in writing, working alone or in groups, or plans for professional careers.
Please be kind and courteous. There’s no need to be mean or rude. Respect that people have differences of opinion, and work and approach problems differently. There is seldom a single right answer to complicated questions. Please keep unstructured critique to a minimum; any criticism should be constructive.
Disruptive behavior is not welcome, and insulting, demeaning, or harassing anyone is unacceptable. In particular, we don’t tolerate behavior that excludes people in socially marginalized groups. If you feel you have been or are being harassed or made uncomfortable by someone in this class, please contact a member of the course staff immediately, or if you feel uncomfortable doing so, contact the Dean of Students office.
This course is for all of us. We will all learn from each other. Welcome!

Schedule
This is a tentative schedule which might suffer changes. See also the page for Spring 2021.

1 Introduction and Stable Matching Chapter 1.1
2 Algorithm Analysis and Asymptotics Ch 2.1, 2.2
3 Algorithm Analysis, Graphs Ch 3.1, 3.2
4 Graphs Ch 3.3, 3.4
5 Graphs Ch 3.5, 3.6
6 Greedy Algorithms Ch 4.1
7 Greedy Algorithms Ch 4.2, 4.3
8 Greedy Algorithms Ch. 4.4
9 Greedy Algorithms Ch. 4.5, 4.6
10 Divide and Conquer Ch. 5.1, 5.2
11 Divide and Conquer Ch. 5.4, 5.5
12 Divide and Conquer Ch. 5.2
13 Dynamic Programming Ch. 6.1, 6.2
14 Dynamic Programming Ch. 6.3, 6.4
15 Dynamic Programming Ch. 6.6
16 Dynamic Programming Ch. 6.8
17 Network Flow Ch. 7.1, 7.2
18 Network Flow Ch. 7.2, 7.3
19 Network Flow Ch. 7.5
20 Intractability Ch. 8.1
21 Intractability Ch. 8.2, 8.3
22 Intractability Ch 8.3
23 Intractability Ch 8.4
24 Approximation Algorithms Ch 11.1, 11.2
25 Randomized Algorithms Ch 13.1, 13.2, 13.4
26 Approximation/Randomization/Review