COMPSCI 311: Introduction to Algorithms
Welcome to the Spring 2025 homepage for COMPSCI 311: Introduction to Algorithms (4 credits; section 2).
The two sections are managed jointly, with similar lectures, and the same course staff, discussions, homework and exams.
Primary joint course page: https://people.cs.umass.edu/~sheldon/teaching/cs311/index.html
Class Location and times
Section 1: MW 2:30-3:45pm, ILC S131
Instructor: Dan Sheldon (sheldon at cs.umass.edu)
Section 2: MW 4:00-5:15pm, LGRC A301
Instructor: Marius Minea (marius at cs.umass.edu)
Discussions: | Fri 9:05-9:55am, LGRC A104A |
| Fri 10:10-11am, LGRT 121 |
| Fri 12:20-1:10pm, AgEng 119 |
| Fri 1:25-2:15pm, CS 142 |
Course staff
TAs: Md. Abdul Aowal (aowal at cs), Purna Dutta (purnadutta), Miguel Fuentes (mmfuentes)
Head UCAs: Aditya Khurmi, Aaron Tian
UCAs: Noah Ford, Ibrahim Hasaan, Kyle Lee, Henry Liu, Aiko Ma, Luke Taylor
Office hours: See schedule on Canvas and Campuswire. You are encouraged to attend office hours to discuss course material and get help and suggestions for solving problems.
Supplemental Instruction. The UMass Learning Resource Center provides a supplemental instruction program for this course. Your SI leader, Michael Yuan, will hold review sessions twice a week and post worksheets on a separate Canvas course where you will be enrolled. Participating in SI sessions is optional but highly recommended.
Course Technology
We use Campuswire for the class discussion forum, course communication, including any announcements, and for contacting intructors and TAs.
We use Canvas to post course material, including homework solutions, and grades.
We use Gradescope for homework submission and grading of homework and exams.
We use ClassQuestion for in-class questions which count towards your grade. Please sign up with your UMass email address. Class code for section 2: QBQKG.
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. More than just a list of classic algorithms, in this course you will learn and practice algorithm design and problem solving. To implement in code solutions to complex problems, we must first design such algorithms. We will learn how to do this, typically using the following steps:
- formulating a clear problem definition
- proposing an algorithm
- proving that it correctly solves the problem
- analyzing its running time.
You will learn to 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: CICS 210 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
- Required Textbook: Algorithm Design by Jon Kleinberg and Éva Tardos.
You are encouraged and expected to read the book sections corresponding to each lecture, which present how to come up with individual algorithms, how to reason about them, construct proofs, and analyze their complexity. This will help you perform the same steps when solving problems.
- Optional: Companion
slides for Kleinberg and Tardos
- Optional: Jeff Erickson. Algorithms. An excellent free textbook.
Grading, requirements, exam schedule, and make-up policies (tentative, to be confirmed in the first lecture)
- Participation (10%): Discussion (7%) and lecture participation (3%)
- Homework (12.5%): Weekly online assignments focused on learning-goal mastery
- Challenge Problems (25%): 6-7 problem sets, focused on algorithm design
- Self-assessment (2.5%): Review solutions to challenge problems and evaluate your own solutions
- Lecture questions (2%)
- Midterm 1 (10%), Thu Feb. 27, 7-9pm. Focus on first quarter of the class.
- Midterm 2 (10%), Thu Mar. 27, 7-9pm. Focus on second quarter of the class.
- Midterm 3 (10%), Thu Apr. 24, 7-9pm. Focus on third quarter of the class.
- Final (20%), Thu May 15, 8-10am, Marcus Hall 131. Covers all course material.
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+=10.0, A=9.5, B=8.5, C=7.5, D=6.5, F=0.
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 Weekly online assignments be posted on Gradescope and due on Mondays at 11:59pm (with possible changes, e.g., if Monday is a holiday).
Challenge Problem Sets will be posted and submitted on Gradescope. Tentative schedule (all dates subject to change until posted):
- Challenge Problems 1: due Thu 2/22 at 11:59pm
- Challenge Problems 2: due Thu 3/6 at 11:59pm
- Challenge Problems 3: due Thu 3/13 at 11:59pm
- Challenge Problems 4: due Thu 4/3 at 11:59pm
- Challenge Problems 5: due Thu 4/17 at 11:59pm
- Challenge Problems 6: due Thu 5/1 at 11:59pm
- Challenge Problems 7: due Thu 5/8 at 11:59pm
Schedule (tentative)
Week |
Date |
Topic |
Readings |
0 |
1/31 |
Discussion |
|
1 |
2/3 |
Introduction and Stable Matching |
Chapter 1 |
|
2/5 |
Algorithm Analysis |
Chapter 2.1, 2.2
|
|
2/7 |
Discussion |
|
2 |
2/10 |
Algorithm Analysis |
Chapter 2.4 |
|
2/12 |
Algorithm Analysis / Graphs |
Chapter 3.1, 3.2
|
|
2/14 |
Discussion |
|
3 |
2/17 |
HOLIDAY - PRESIDENTS' DAY |
|
|
2/19 |
Graphs |
Chapter 3.3, 3.4
|
|
2/20 |
Graphs (Monday schedule) |
Chapter 3.5, 3.6 |
|
2/21 |
Discussion |
|
4 |
2/24 |
Greedy |
Chapter 4.1
|
|
2/26 |
Greedy |
Chapter 4.2
|
|
2/28 |
Discussion |
|
5 |
3/3 |
Greedy |
Chapter 4.4 |
|
3/5 |
Greedy |
Chapter 4.5, 4.6
|
|
3/7 |
Discussion |
|
6 |
3/10 |
Divide and Conquer |
Chapter 5.1, 5.2
|
|
3/12 |
Divide and Conquer |
Chapter 5.4, 5.5
|
|
3/14 |
Discussion |
|
7 |
3/24 |
Divide and Conquer |
Chapter 5.2, 5.6
|
|
3/26 |
Dynamic Programming |
Chapter 6.1, 6.2
|
|
3/28 |
Discussion |
|
8 |
3/31 |
Dynamic Programming |
Chapter 6.3, 6.4
|
|
4/2 |
Dynamic Programming |
Chapter 6.6
|
|
4/4 |
Discussion |
|
9 |
4/7 |
Dynamic Programming |
Chapter 6.8
|
|
4/9 |
Network Flow |
Chapter 7.1, 7.2
|
|
4/11 |
Discussion |
|
10 |
4/14 |
Network Flow |
Chapter 7.2, 7.3
|
|
4/16 |
Network Flow |
Chapter 7.5, 7.10
|
|
4/18 |
Intractability (Monday schedule) |
Chapter 8.1
|
11 |
4/21 |
HOLIDAY - PATRIOTS' DAY |
|
|
4/23 |
Intractability |
Chapter 8.2, 8.3
|
|
4/25 |
Discussion |
|
12 |
4/28 |
Intractability |
Chapter 8.3 |
|
4/30 |
Intractability |
Chapter 8.4 |
|
5/2 |
Discussion |
|
13 |
5/5 |
Approximation Algorithms |
Chapter 11.1, 11.2 |
|
5/7 |
Randomized Algorithms / Review |
Chapter 13.1, 13.2, 13.4 |
|
5/9 |
Discussion |
|
Detailed Policies
Online Homework Assignments
Online Gradescope homework assignments will be due most Mondays and posted about a week in advance. These will focus on mastery of learning goals and are similar to the types of questions you can expect on exams.
Challenge Problems
These usually involve designing an algorithm for a 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.
Gradescope Submission
Challenge problems will be submitted via Gradescope. You must submit challenge problems as a single PDF file (see Gradescope instructions):
- You may type your answers (e.g., using LaTeX) and save to a PDF file;
- 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. You should view the file 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.
Grading rubric
Challenge problems will be graded with ✓+, ✓, ✓-, ✗, based on the EMRN rubric of R. Talbert:
- ✓+: The work meets or exceeds assignment expectations. Communication is clear and complete. Mastery of the concepts is evident. There are no non-trivial errors. This 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 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 forms a consistent and coherent whole.
- ✓-: Partial understanding of the concepts is evident, but there are significant gaps that remain.
Needs further work, more review, and/or improved explanations.
- ✗: There is not enough information to determine if there is understanding of the concepts. The
work is fragmentary, has significant omissions, or too many issues to correct individually.
The overall challenge problem grade will be determined as follows:
Grade |
Criteria |
A+ |
Complete at least 14 challenge problems with ✓ or better; including at least 7 with ✓+ |
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 ✓ or better |
D |
Complete at least 6 challenge problems with a ✓- or better; including at least 3 with a ✓ |
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.
Self-assessment
Solutions to challenge problems will posted to Canvas 24 hours after the submission deadline. A separate Gradescope assignment
will be open for submitting your self-asessment. Self-assessments will typically be 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 as directed on Gradescope.
Attendance and Participation
Attendance is required at lectures and discussion sections and will contribute to your participation grade.
You will receive credit for completing discussion exercises and answering questions during lectures:
- For lectures, each question is worth 1 point, with 80% credit for participation and 20% for correctness.
-
For discussions, worksheets will be submitted via Gradescope at the end of each discussion. Students will receive full credit for participation.
We reserve the right to change particpation grading (e.g., to grade discussion exercises for completeness or correctness) if engagement is a problem.
Excused Absences
Every student in 311 will automatically be excused from up to five lecture absences and up to two discussion absences. You do not need to contact the course staff. This will be implemented by dropping the lowest five lecture participation grades and lowest two discussion grades for all students. These are expected to cover feeling unwell, unforeseen circumstances, and other extenuating non-academic reasons.
If documented cases (severe illness, athletic events, etc.) require more than this absence allowance, please submit the Excused Absences questionnaire, attaching the relevant documentation.
Please use the registrar’s class absence policy for guidance when requesting absences and providing documentation.
Late work submission and makeup policy
Late work that is not excused will receive no credit. Any assigned work must be submitted by the due date. 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.).
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.
Any requests for extensions due to exceptional circumstances (severe illness, etc.) must be made before the deadline. When solutions have already been posted, it is a violation of academic honesty to look at them prior to submitting work.
Missed Exams
You must notify the instructor in advance if you are unable to take an exam 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 instructor as soon as you are able to. Failure to do this and missing the exam results in a grade of zero.
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 the instructor.
Collaboration
You are encouraged to form study groups, learn and discuss the course material jointly with others.
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.
- 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, including but not limited to solutions from other students, online sources, or AI models, 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 AI models), 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.
- 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.
Detailed Learning Goals
- 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
Academic Honesty
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.
This course assumes that all work submitted by students will be generated by the students themselves, working individually or in groups. Students should not have another person/entity do the writing of any portion of an assignment for them, which includes hiring a person or a company to write assignments and using artificial intelligence tools like ChatGPT.
University Statement
Since the integrity of the academic enterprise of any institution of higher education requires honesty in scholarship and research, academic honesty is required of all students at the University of Massachusetts Amherst. Academic dishonesty is prohibited in all programs of the University. Academic dishonesty includes but is not limited to: cheating, fabrication, plagiarism, and facilitating dishonesty. Appropriate sanctions may be imposed on any student who has committed an act of academic dishonesty. Instructors should take reasonable steps to address academic misconduct. Any person who has reason to believe that a student has committed academic dishonesty should bring such information to the attention of the appropriate course instructor as soon as possible. Instances of academic dishonesty not related to a specific course should be brought to the attention of the appropriate department Head or Chair. Since students are expected to be familiar with this policy and the commonly accepted standards of academic integrity, ignorance of such standards is not normally sufficient evidence of lack of intent
(https://www.umass.edu/studentsuccess/academic-integrity).
Accommodation Statement
The University of Massachusetts Amherst is committed to providing an equal educational opportunity for all students. If you have a documented physical, psychological, or learning disability on file with Disability Services (DS), you may be eligible for reasonable academic accommodations to help you succeed in this course. If you have a documented disability that requires an accommodation, please notify me within the first two weeks of the semester so that we may make appropriate arrangements. For further information, please visit Disability Services (https://www.umass.edu/disability/).
Title IX Statement
In accordance with Title IX of the Education Amendments of 1972 that prohibits gender-based discrimination in educational settings that receive federal funds, the University of Massachusetts Amherst is committed to providing a safe learning environment for all students, free from all forms of discrimination, including sexual assault, sexual harassment, domestic violence, dating violence, stalking, and retaliation. This includes interactions in person or online through digital platforms and social media. Title IX also protects against discrimination on the basis of pregnancy, childbirth, false pregnancy, miscarriage, abortion, or related conditions, including recovery. There are resources here on campus to support you. A summary of the available Title IX resources (confidential and non-confidential) can be found at the following link: https://www.umass.edu/titleix/resources. You do not need to make a formal report to access them. If you need immediate support, you are not alone. Free and confidential support is available 24 hours a day / 7 days a week / 365 davs a vear at the SASA Hotline 413-545-0800.
For purposes of Title IX reporting, your instructor in section 2 (Marius Minea) is considered a "responsible employee" or "mandatory reporter" as Undergraduate Program Director, with the following reporting requirements.
Inclusivity
We subscribe to our college's inclusivity statement:
At the Manning College of Information and Computer Sciences, we believe that you belong in computing. We welcome and value all individuals, regardless of previous computer science experience, age, citizenship, disability, sex, gender identity, military experience, political views, race, religion, or sexual orientation, while maintaining an environment that celebrates, welcomes, and honors those differences.
We're committed to supporting all our students through their journeys in computer and information sciences–especially students from identities and backgrounds that are still underrepresented in our field. Diverse perspectives on the challenges our society faces animate our vision of Computing for the Common Good. Your insight, talents, and skills are needed to protect and improve an ecosystem that relies on the combined efforts of the greatest technical minds, and we believe your place is here.
Use of chosen names and pronouns
Everyone has the right to be addressed by the name and pronouns that they use for themselves. Students can indicate their preferred/chosen first name and pronouns on SPIRE, which appear on class rosters. Please let me know what name and pronouns I should use for you if they are not on the roster. A student's chosen name and pronouns are to be respected at all times in the classroom.
Supplementary student support resources
CICS has its own tutoring program, which allows you to get help from students who have taken the course in the past. Submit a request here (usually available starting the second week of the semester).
Tutoring is also provided by the Learning Resource Center.
More student support resources are provided by the CCPH. If you feel you are struggling, do not hesitate to reach out to any of the course staff and we will help you find the best solution.