CSE 331 Syllabus
Algorithms and Complexity
Fall 2026
Section A: Mondays, Wednesdays, and Fridays, 1:00–1:50 PM — O'Brian 104
Section B: Mondays, Wednesdays, and Fridays, 2:00–2:50 PM — Clemens 120
Please note
It is your responsibility to make sure you read and understand the contents of this syllabus. If you have any questions, please contact the instructor.
Acknowledgment
It is your responsibility to read and understand the course website and syllabus. The first quiz will cover the course website and syllabus and will be taken on UBLearns.
Academic Integrity
Penalty for academic integrity violation
In accordance with the current departmental policy on academic integrity violations, we will follow this procedure in CSE 331:
- If the violation is the student's second academic violation, then it will result in an automatic
Fletter grade in the course. - If the violation is the first ever academic violation, then (except for the exception below) it will result in a minimum of a
letter grade reductionin the course anda zero on the relevant assignment/exam. If the violation is serious enough, then it can result in anF in the course. While it gives us no pleasure in failing students, we will do so since we have to be fair to (the vast majority of) students who do not cheat. Please read the homework policies to make sure you follow all the rules and do not violate academic integrity. - If the violation involves the use of ChatGPT (or other generative AI tools), irrespective of whether it is the student's first violation or not, then it will result in an automatic
Fletter grade in the course.
Policy on improper distribution of course materials
All materials prepared and/or assigned by us for this course are for the students’ educational benefit. Other than for permitted collaborative work, students may not photograph, record, reproduce, transmit, distribute, upload, sell or exchange course materials, without our prior written permission. "Course materials" include, but are not limited to, all instructor-prepared and assigned materials, such as lectures; lecture notes; discussion prompts; study aids; tests and assignments (and their solutions); and presentation materials such as PowerPoint slides, Prezi slides, or transparencies; and course packets or handouts. Public distribution of such materials may also constitute copyright infringement in violation of federal or state law. Violation of this policy may additionally subject a student to a finding of "academic dishonesty" under the Academic Integrity Policy and/or disciplinary charges under the Student Code of Conduct.
For more details, please see the department policy on academic integrity .
Withdrawing a submission for academic integrity violation
Sometimes mistakes can happen so you have the option of withdrawing any of your Homework submission within 24 HOURS of the assignment deadline. You can do this by sending Prof. Carlson or Prof. Luo an email, e.g. by using the following template (thanks to Oliver Kennedy for providing us the template):
Email template for withdrawing submission
Dear Prof. Carlson or Prof. Luo,
we wish to inform you that we have violated CSE 331 policies on our submission for Question X on Homework/Assignment N. we wish to withdraw our submission to preserve academic integrity.
J.Q. Student
Person #12345678
UBIT: jqstuden
Sincerely, J
On receiving the above email, we will assign J a 0 on Question X on Homework/Assignment N but disregard any Academic Integrity issues with the problematic submission. Note that J is not required to present any details on how they violated academic integrity.
Accessibility Resources
If you have a diagnosed disability (physical, learning, or psychological) that will make it difficult for you to carry out the course work as outlined, or that requires accommodations such as recruiting note-takers, readers, or extended time on exams or assignments, you must consult with Accessibility Resources (: 60 Capen Hall, : 716-645-2608 (phone), : 716-645-3116 (fax)).
You must advise your instructor during the first two weeks of the course so that we may review possible arrangements for reasonable accommodations.
Instructor Information
Section A — Prof. Kelin Luo
Office: 306 Davis Hall
Office hours: Mon and Wed 12:00PM-12:50PM
Faculty profile
Section B — Prof. Prof. Charlie Anne Carlson
Office: 315 Davis Hall
Office hours: Wed and Fri 3:00PM-3:50PM
Faculty profile
Course Staff
Course Staff: TBA.
Contacting Course Staff
Course announcements and class discussion will use Piazza. The link to Piazza will be available on UBLearns. Please use the course communication channels announced on UBLearns to contact the instructional staff.
Lectures
You are expected to attend class and are responsible for the material discussed in the current semester.
Lecture recordings
Lectures will not normally be recorded unless a recording is requested for a good reason. Recordings from previous semesters may be available and you are free to watch them. However, previous semesters may cover different topics or material, so old recordings are not a substitute for attending the current lectures.
You may attend a lecture other than the one for which you are registered if there is space and doing so does not create a burden for the instructor.
Recitations
A1: Wednesday, 3:00–3:50 PM — Bell 337
A4: Wednesday, 5:00–5:50 PM — O'Brian 214
B1: Monday, 12:00–12:50 PM — Talbert 111
B2: Monday, 1:00–1:50 PM — Clemens 215
B3: Monday, 3:00–3:50 PM — Capen 108
Recitations provide an opportunity to review course material, work through problems, and ask questions in a smaller setting.
Recitations will not be recorded
Recitations will never be recorded.
You may attend a recitation other than the one for which you are registered if there is space and doing so does not create a burden for the instructor or course staff.
Course Description
Introduces paradigms for designing algorithms and fundamental limitations to what algorithms can do. Covers basic algorithm design paradigms of greedy algorithms, divide and conquer algorithms and dynamic programming, as well as a selection of advanced algorithmic topics, such as randomized algorithms, algorithms for distributed systems and basic algorithms for machine learning. Topics related to limitations of algorithms include NP-completeness and undecidability. Coverage includes analyzing algorithms via proofs and programming assignments to implement algorithms.
Ethical considerations of algorithms
Algorithms are increasingly pervasive in our daily lives. They are increasingly used in all aspects of society, from benign applications of recommending movies to more impactful application of determining sentencing in criminal justice systems. While most of us are in CSE because we like to build technology, given the pervasive nature to CSE, it is imperative for you to understand the societal and ethical implications of the algorithms and technology that you build. This is not to say that you necessarily have to be an activist looking out for societal implications of algorithms, but you should be aware that the algorithms you design will have real-life implications and that saying "you just designed the algorithm and cannot be responsible for how it is used" is, at best, a weak excuse. When developing algorithms (and the corresponding system) you will have to choose between many options. Being aware of the downstream ethical and societal implications would help you make better choices when designing your technology.
Thus, in this course, in addition to learning the technical fundamentals of algorithms (which are of course still very important), you will also look into societal implications in general and ethical implications of algorithms in real life. In particular, we will focus on how uses of algorithms affects real life. So e.g., we will be more interested in situations where algorithmic prediction of recidivism in criminal justice is biased and not e.g. ethical issues involved in stealing of algorithms and intellectual property rights.
You will work on ethical and societal implications of algorithms primarily in your Project.
Prerequisites and Credits
Data Structures (CSE 250), [Discrete Math (CSE 191) OR Intro to Higher Math (MTH 311)] and College Calculus II (MTH 142 or MTH 139). Ideally, you should have a grade of $C^-$ or above in these courses. If you do not satisfy this requirement, please come and see us.
This is a $4$ credit course.
(ABET ) Learning Outcomes
This course is required of all computer science students and after the completion of the course, students should demonstrate mastery of the concepts/skills/knowledge expressed in the following learning outcomes for computer science:
(4)recognize professional responsibilities and make informed judgments in computing practice based on legal and ethical principles.(5)Function effectively as a member or leader of a team engaged in activities appropriate to the program’s discipline.(6)Apply computer science theory and software development fundamentals to produce computing-based solutions. [CS]
| Course Learning Outcome | Program Outcomes / Competencies | Instructional Method(s) | Assessment Method(s) |
| Be able to design algorithms to solve given problems | ABET (6) | Lectures | Homeworks, Exams |
| Be able to prove correctness of designed algorithms | ABET (6) | Lectures | Homeworks, Exams |
| Be able to identify ethical and societal implications of algorithms | ABET (4) | Lectures | Project |
| Be able to effectively work in a team | ABET (5) | Lectures | Project |
The Student Outcomes from the Computing Accreditation Commission (CAC) of ABET have been adopted .
Program Outcome Support (Computer Science ABET Outcomes):
| Program Outcome | 1 | 2 | 3 | 4 | 5 | 6 |
| Support Level | No coverage | No coverage | No coverage | Demonstrate mastery of skill/concept | Demonstrate mastery of skill/concept | Demonstrate mastery of skill/concept |
References
We will be using the following textbook:
Required Textbook
Jon Kleinberg and Eva Tardos, "Algorithm Design ." Addison Wesley, 2005.
The following textbooks could be useful references:
- Thomas S. Cormen, Charles E. Leiserson, Ronald Rivest, and Clifford Stein, "Introduction to Algorithms (2nd Ed) ." MIT Press, 2001.
- Sanjoy Dasgupta, Christos H. Papadimitriou and Umesh Vazirani, "Algorithms ." McGraw Hill, 2007.
- Donald Knuth, "The Art of Computer Programming Volumes 1, 2, 3, 4 ." Addison Wesley.
- Alfred V. Aho John E. Hopcroft and Jeffrey Ullman, "Data Structures and Algorithms ." Addison Wesley, 1983.
- Richard E. Neapolitan, "Foundations of Algorithms (5e) ." Jones and Bartlett, 2015.
- Daniel J. Velleman, "How to Prove It: A Structured Approach (2nd Ed) ." Cambridge University Press, 2006.
However, note that for your homework submissions, the Kleinberg-Tardos book is the only allowed source. Please see the homework policy for more details.
Schedule
The course follows a 16-week academic calendar. Topics include stable matching and algorithm analysis; graphs and graph traversal; greedy algorithms; divide and conquer; dynamic programming; and computational complexity and reductions. We will also briefly discuss undecidability early in the semester.
See the detailed course schedule for lecture topics, assignments, recitations, quizzes, and exam dates.
Piazza
We will use Piazza for course announcements and class discussion. The link to the course Piazza will be available on UBLearns. Students are expected to check course announcements regularly.
Grading Policy
Your final course grade will be calculated using the following weights:
| Component | Weight |
|---|---|
| Project | 10% |
| Homeworks | 25% |
| Quizzes | 5% |
| Midterm I | 15% |
| Midterm II | 15% |
| Final Exam | 30% |
Letter Grades
Letter-grade cutoffs will be determined using a curve, subject to the following requirements:
- To receive an A in the course, you must earn a total course score of at least 90.00%.
- If your total course score is below 40%, you will automatically receive an F. A score of 40% does not automatically guarantee a D; the exact passing cutoff and other letter-grade cutoffs will be determined based on the final grade distribution, with 40% serving as the minimum possible passing cutoff.
We reserve the right to change these grading policies or cutoffs during the semester only when the change strictly increases students' grades. We will not make a grading-policy change that lowers any student's grade.
Project
Project Submissions
The coding portions of the project will be submitted through Autolab. All non-code project work will be uploaded to UBLearns. When an assignment asks for separate files, you must upload the requested files separately. All non-code submissions must be in PDF format. LaTeX is preferred, but documents prepared in Word are also acceptable. Handwritten work is permitted only if it is very legible and submitted as a high-quality scan.
Group Score
As part of your project, you will also work in a group to complete a series of programming tasks and then reflect on your design choices (as well as the project). These will contribute to the group score part of the project, which is worth $5\%$ of your grade (which is divided into the coding component and the reflection component).
Coding Component
Coding Component Grade
The coding component of your project will be worth $4\%$ of your grade. Everyone in the group will have the same score for the coding component of the group score.
As mentioned earlier, as part of your project you will work in a group to complete a series of programming tasks. All of these tasks will be based on one real-life case study. Unlike the programming questions on the homework, the coding mini project will have you solve problems for which there is no provable optimal solution and where you will have to balance multiple goals. More importantly, you will have to deal with some ethical and societal issues (see reflection component of the project).
For more details, please see the project page.
Reflection Component
Reflection Component Grade
The reflection component of your project will be worth $1\%$ of your grade. Everyone in the group will have the same score for the reflection component of the group score.
As part of your project, in addition to completing a series of programming tasks, your group will reflect on ethical and societal considerations of your coding assignments (and more generally the project).
For more details, please see the project page.
Individual Component
At the end of the project, you will rate your own and your other group members' contributions to the project. For more details, please see the project page.
Individual Component Grade
The individual component of your project will be worth $5\%$ of your grade.
Surveys and the Individual Component of the Project Grade
Your survey scores will be converted into a fractional score $\rho\in [0,2]$. We will reveal the exact algorithm after the surveys are submitted but roughly if everyone in the group did equal work (as reflected by the survey responses), then all group members will have $\rho=1$. Otherwise, those that did more work will have a $\rho$ value closer to $2$ and those that did less will have $\rho$ value closer to $0$.
The survey part of the grade will be calculated as $\rho\cdot$group score, where group score is the sum of the coding and reflection components. If this score exceeds $5\%$, it will be capped at $6\%$.
The project will assess student outcomes (4) and (5).
Homeworks
Homework assignments will be released on Wednesdays according to the course schedule and will be due on the Wednesday indicated on the schedule. Homework 0 will be graded for feedback but will not count toward the final course grade.
Homework Submissions
Code-based work, such as the coding portion at the end of each homework, will be submitted through Autolab. All other homework work will be uploaded to UBLearns. When an assignment asks for separate files, you must upload the requested files separately.
All non-code submissions must be in PDF format. LaTeX is preferred, but documents prepared in Word are also acceptable. If you choose to handwrite your work, it must be very legible and the scan must be high quality.
Late submissions
No late submissions will be accepted. The entire homework schedule is available on the schedule page, so please plan accordingly. The two lowest scores for each of the three homework components across the eight graded homework assignments will be dropped. We strongly encourage you to save these drops for times later in the semester when you may be especially busy or for possible sick days.
See the homework policy page for more details on how the final homework grade will be calculated.
For more details, including information about circumstances that may result in a letter-grade reduction in the course, please see the homework policy document. The line between collaboration and cheating can be blurry; when in doubt, play it safe. The homework is designed around work that we believe is important for you to do yourself rather than busy work. The course generative-AI policy therefore applies to homework submissions.
All homework assignments assess student learning outcome (6).
Quizzes
There will be 12 quizzes during the semester. Some weeks will not have a quiz. Quizzes will be taken on UBLearns and will be announced in class. The first quiz will cover the course website and syllabus.
Quiz Grade
Quizzes are worth 5% of the final course grade. The two lowest quiz scores will be dropped.
The quizzes will assess student learning outcome (6).
Exams
There will be two in-class midterms and a final exam.
- Midterm I: Friday, October 2 — 15% of the final course grade.
- Midterm II: Friday, October 30 — 15% of the final course grade.
- Final Exam: Wednesday, December 9 — 30% of the final course grade.
- Section A Final Exam Time and Location: 8:00 AM - 11:00 AM, Obrian 104
- Section B Final Exam Time and Location: 3:30 PM - 6:30 PM, Clemen 120
Each midterm will take place during the regular class meeting. For each midterm and the final exam, you may bring one 8.5 × 11 inch sheet of paper and may use both sides.
Study Time
In this course, as in any course, you are expected to put in additional time beyond the scheduled class times. Professors generally expect that for each credit hour a typical student will put in 2–3 hours of time each week outside of class. Since this is a 4-credit course that translates into 8–12 hours of time outside of scheduled times, each week. During this time you should review your lecture notes, attend office hours as needed, and work on assignments. As a rough guide, you should expect to spend at least the following time working on this course, each week:
| Lectures | 3 hours |
| Recitation | 1 hour |
| Individual/group study | 2 hours |
| Assignments | 6 hours |
Miscellaneous Notes
Here are some other policies/suggestions to keep in mind:
-
Your grade
Your grade will solely depend on your performance in this semester: you will not get any opportunity to do extra work to improve your grade. It is your responsibility to make sure you understand what is expected of you. This course will require a fair bit of work so if you are busy this semester, please plan accordingly.
- If there is a genuine reason for re-grading, please contact the person who graded your homework/exam within a week of when the graded material is handed back.
- See advice from CSE 331 TAs on how to do well in this course.
- If you are not super comfortable with proofs then you will need to put in some extra work to do well in class. The important thing to remember in this case is that you are not good at algorithms yet:
- Feel free to make up a group of three students and stick with it for all your homeworks and the mini project. You can also use the group as your study group for the course. Piazza offers a mechanism to search for groupmates.
Critical Campus Resources
Sexual Violence
UB is committed to providing a safe learning environment free of all forms of discrimination and sexual harassment, including sexual assault, domestic and dating violence and stalking. If you have experienced gender-based violence (intimate partner violence, attempted or completed sexual assault, harassment, coercion, stalking, etc.), UB has resources to help. This includes academic accommodations, health and counseling services, housing accommodations, helping with legal protective orders, and assistance with reporting the incident to police or other UB officials if you so choose. Please contact UB’s Title IX Coordinator at 716-645-2266 (phone) for more information. For confidential assistance, you may also contact a Crisis Services Campus Advocate at 716-796-4399 (phone).
Mental Health
As a student you may experience a range of issues that can cause barriers to learning or reduce your ability to participate in daily activities. These might include strained relationships, anxiety, high levels of stress, alcohol/drug problems, feeling down, health concerns, or unwanted sexual experiences. Counseling, Health Services, and Health Promotion are here to help with these or other issues you may experience. You can learn more about these programs and services by contacting:
Counseling Services
120 Richmond Quad (North Campus), 716-645-2720 (phone)
Health Services
4350 Maple Road (at Sweet Home Rd.) , 716-829-3316 (phone)
Health Promotion
114 Student Union (North Campus), 716-645-2837 (phone)
Preferred Name
If you would like to be addressed by a name that is different from the one in UB records, please let us know and we will use your preferred name in our communications with you. Furthermore, you will be able to use your preferred name in all of your exams and quizzes (the homeworks will be submitted online so this issue should not come up there).
Diversity
The UB School of Engineering and Applied Sciences considers the diversity of its students, faculty, and staff to be a strength, critical to our success. We are committed to providing a safe space and a culture of mutual respect and inclusiveness for all. We believe a community of faculty, students, and staff who bring diverse life experiences and perspectives leads to a superior working environment, and we welcome differences in race, ethnicity, gender, age, religion, language, intellectual and physical ability, sexual orientation, gender identity, socioeconomic status, and veteran status.
Suggestions or Comments?
we would be happy to get feedback from you. You can either talk/send email to us, or use Piazza.