CSE 331 Syllabus
Algorithms and Complexity
Spring 2024
Time and location: M, W and F, 12:00-12:50pm, NSC 201.
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
Once you have read the syllabus carefully, please fill in the Syllabus quiz on Autolab. As an incentive for you to fill in this form, you will not receive any feedback on your assignments till you successfully answer AT LEAST 18 out of the 20 questions in the quiz. (You can attempt the quiz as many times as you want.) Note that in addition to this syllabus, the quiz will also ask questions based on the homework policies.
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
F
letter grade in the course. - If the violation is the first ever academic violation, then it will result in a minimum of a
letter grade reduction
in the course andzero in the relevant assignment/exam
. If the violation is serious enough, then it can result in anF in the course
. While it gives me no pleasure in failing students, I will do so since I 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, irrespective of whether it is the student's first violation or not, then it will result in an automatic
F
letter grade in the course.
Policy on improper distribution of course materials
All materials prepared and/or assigned by me 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 my 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 .
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.
COVID-19
COVID-19 related policies and guidelines
Please follow UB/SUNY protocols regarding COVID-19. This page has an overview of updates and policies .
Please follow the rules specified in Student Compliance Policy for COVID-19 Public Health Behavior Expectations :
Specifically, please pay attention to the following part of the rules outlines above.
Should a student need to miss class due to illness, isolation or quarantine, they are required to notify their faculty to make arrangements to make up missed work.
Please note though that since we drop the lowest two homeworks, there will be no extension/makeup for late homeworks. But we can schedule a makeup exam if you need to miss it due to medical reasons.
Lectures, recitations and exams will be held in-person. There will be a mix of in-person and virtual office hours. These are subject to change based on current UB/SUNY policies.
Instructor Information
Nasrin Akhter
- :
nasrinak "at" buffalo "dot" edu
- : Davis 303
- : 716-645-4740
- : M W 3:30-4:30pm
It is preferable to set up an appointment (by email) if you want to talk to me outside of my office hours.
TA Information
Here are your wonderful CSE 331 TAs!
If you have a question specific to a language
make sure you go talk with a TA who has that language
listed for them (please note that if there is (secondary)
after a language then it means that the TA might not be able to answer all questions in that language but they will consult with the CSE 331 staff and get back to you with an answer).
(An (i) indicates an in-person off hour and a (v) indicates a virtual-only office hour. Virtual office hours will be on zoom. All Zoom meeting room links will be posted on Piazza .

ester Rozensky
- : Tuesdays 12:00-2:00pm (i), Fridays, 6:30-8:00pm (i)
- : Salvador Lounge
- Language:
Python

Sebastian Calo
- : Mondays, 3:00-4:00pm (i), Tuesdays, 2:00-3:00pm (i)
- : M: Baldy 125, Tu: Clemen 215
- Language:
Python



Ahana Bhattacharya
- : Mondays 1:00-2:00pm (i), 4:00-5:00pm (i)
- : 1pm: Baldy 125, 4pm: Salvador Lounge
- Language:
Python

Billy Qu
- : Wednesdays, 3:30pm-4:30pm (i), Fridays 4:00am-5:00pm (i)
- : Salvador Lounge
- Language:
Java, Python
Sujal Singh
- : Wednesdays, 11:00am-12:00pm (i), Fridays, 3:00-4:00pm (i).
- : W: Clemen 215, F: Baldy 125
- Language:
Python


Adi Dwibedi
- : Wednesdays, 1:00-2:00pm (i), Thursdays 1:00-2:00pm (i).
- : Salvador Lounge
- Language:
Python, C++


Mary Chen
- : Tuesdays, 4:00-5:00pm (i), Thursdays 5:00-6:00pm (v).
- : Salvador Lounge
- Language:
Python



Alex Sherman
- : Mondays, 5:30am-6:30pm (i), Tuesdays, 11:00am-12:00pm (i).
- : M: Baldy 125, Tu:Salvador Lounge
- Language:


Vincent Chan
- : Mondays, 2:00am-3:00pm (i), Thursdays, 9:30-10:30am (i).
- : M: Baldy 125, Th: Baldy 105
- Language:
C++, Python





Thang Trinh (Mark)
- : Wednesdays, 5:00am-6:00pm (i), Fridays, 10:30-11:30am (i).
- : W: Baldy 125, F: Clemen 117
- Language:
Python

Contacting Course Staff
You should first try and post your question on Piazza . If you need to send an email, please send it to cse-331-staff "at" buffalo.edu
: this will send email to the TAs and me.
The TAs have been instructed to not respond to individual email except in the case of re-grading requests. (The individual email of the TA who graded a particular HW question can be found on Autolab.)
Lectures
The lecture will be videotaped and then uploaded to UBLearns (to access them, go to the CSE 331 page on UBLearns and then select Classroom Recordings
from the course menu and then Classroom Recordings Powered by Panopto
to open the portal).
Recitations
You should have signed up for one of these six recitation sections:
- A1, Mondays, 4:00-4:50pm (Norton 210)
- A2, Mondays, 10:00-10:50am (Clemen 17)
- A3, Tuesdays, 12:30-1:20pm (Clemen 103)
- A4, Wednesdays, 5:00-5:50pm (Capen 210)
- A5, Tuesdays, 9:30-10:20am (Clemen 102)
- A6, Mondays, 6:00-6:50pm (Norton 209)
Attending the recitations is very important, as it will go over a high level idea on how to solve (part) of homework problems and/or cover material that could not be covered well in the lecture due to time constraints. Also the recitations will provide an opportunity to ask your questions in a smaller gathering.
Recitations will not be video taped
Unlike the lectures, the recitations WILL NOT be recorded.
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 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.
Pre-requisites and Credits
Data Structures (CSE 250 ), [Discrete Math (CSE 191 ) OR Intro to Higher Math (MTH 311 )] and College Calculus II (MTH 142 ). Ideally, you should have a grade of $C^-$ or above in these courses. If you do not satisfy this requirement, please come and see me.
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
Here is a tentative list of topics that we will cover (KT refers to the textbook):
- Introduction [KT, Chap 1] (2 weeks).
- Graph Basics [KT, Chap 3] (1.5 weeks).
- Greedy Algorithms [KT, Chap 4] (2.5 weeks).
- Divide and Conquer Algorithms [KT, Chap 5] (2 weeks).
- Dynamic Programming [KT, Chap 6] (2.5 weeks).
- NP-completeness [KT, Chap 8] and undecidability (2.5 weeks).
A more detailed schedule appears here.
Piazza
We will be using Piazza for all CSE 331 related announcements. You will find the access code on UBLearns. If you are attending the course, you must check Piazza regularly. I would strongly urge you to enable email notifications on Piazza (it is on by default). These announcements will include the ones that inform if and when classes/office hours are re-scheduled etc.
We will be using Piazza for class discussion. The system is highly catered to getting you help fast and efficiently from classmates, the TAs, and myself. Rather than emailing questions to the teaching staff, I encourage you to post your questions on Piazza. If you have any problems or feedback for the developers, email team@piazza.com. To familiarize yourself with the system, look at their help page .
You will need to sign up for Piazza. To do so, go to the sign up page .
Few other points:
- You can post anonymously but note that you will be anonymous to students only. Your identity will be known to me and the TAs.
- Please make sure that you use your UB email to sign up-- this is to make sure that I can verify your identity if necessary.
- You can write posts that are private to just the instructors but if we feel that the answer would be relevant to the class then we reserve the right to make the post public. (If you would like not to have your name in the public version of your private post, please post anonymously in the private post too. Note by the first point, we will still know your identity.)
Piazza Response policy
Please note the following rules regarding response time to student questions on piazza:
- Any question posted between Friday at 5pm and Monday 9am might not get an answer from CSE 331 staff before Monday 9am.
- On weekdays, we will aim to respond to student question within four hours unless the question is posted between 7pm and 9am, in which case we might only be able to respond after 9am.
Please note that the above does not means that we will never answer questions posted in the evening/night times as mentioned above-- it's just that we might not always be able to respond within four hours. Based on previous years, I do expect there to be reasonable response time in the evening times as well-- it's just that OUR response times might be more variable.
Grading Policy
Here is the split of grades:
Course Component | $\%$ of grade |
Project | $10\%$ |
Homeworks | $25\%$ |
Quizzes | $5\%$ |
Exams | $60\%$ |
Letter Grades
To get an A in the course, you will have to obtain a total of $90.00\%$ or more. The rest of the letter grades will be determined based on a curve.
Incompletes
Please see the university rules on an incomplete . I will not consent to an incomplete except in provably extreme circumstances.
Project
The project page will be available soon.
Coding Component
Coding Component Grade
The coding component of your project will be worth $4\%$ of your grade.
As part of your project you will also work in 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).
Reflection Component
Reflection Component Grade
The reflection component of your project will be worth $2\%$ of your grade.
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).
Survey Component
Survey Component Grade
The survey component of your project will be worth $4\%$ of your grade.
At the end of the project, you will rate your own and your other group member's contribution to the project.
The project will assess student outcomes (4)
and (5)
.
Homeworks
In general, homeworks will be released on Fridays (with a few possible exceptions) on the CSE 331 web page and will be due via Autolab by 8:00pm next Friday. In addition, there will be a Homework $0$, which will be graded but will not count towards your final grade. Homework $0$ is just to give you feedback on your solutions so that you can avoid your mistakes in the homeworks that will count towards your grade (and also for us to test out Autolab). Submitting Homework $0$ is optional.
Autolab submissions
All homework submissions will happen on Autolab . The homework will consists of one programming question (which can be submitted in C++, Java or Python and will be autograded by Autolab and two proof based questions (which will have to be submitted in PDF format on Autolab and will be graded by the TAs).
Late submissions
No late submission will be accepted. However, the two lowest scores on your (in total eight) homeworks will be dropped. I strongly encourage you to save these two homeworks till the end of the semester when you will be very busy with projects etc. or for possible sick days.
See the HW policy page for more details on how your final homework grade will be calculated.
For more details (including on how not to get 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 safe. Not only is cheating bad in principle, in practice it is highly unlikely that you'll do well in the exams unless you have worked hard on the homeworks on your own. It is highly recommended that you do not try to test my claim out on yourself.
All homeworks assess student learning outcomes (6)
.
Quizzes
There will be two quizzes: both in class. Please see the schedule to find the dates. The quizzes will consist of one or two true/false (with justification) questions. Such questions will be on the exams but are not on homeworks and hence, these quizzes will be an opportunity for you to try and solve such questions before the exams (and under some time pressure). You will also gain experience working on true/false questions with a weekly such question that will be posted on Piazza.
Quiz Grade
The quizzes are worth $5\%$ of your grade. However, if it is to your advantage, I will drop the quiz scores and bump up the homeworks to $30\%$ of your grade.
The quizzes will assess student learning outcomes (6)
.
Exams
Exam Grade
The mid-term is worth $25\%$ of your grade and the final exam is worth $35\%$ of your grade. However, if it is to your advantage, then the final exam will be worth $60\%$ of your grade.
No makeup exams will be given except in provably extreme circumstances. Please note the following additional policies/suggestions with respect to makeup exams:
- Notify your instructor 24 hours prior to the exam via e-mail if you are going to miss an exam. If it is medically impossible for you to give prior notice, please obtain a note from a physician detailing the period (and the reason) you were medically incapable of communicating with the instructor.
- If you miss an examination because of sickness or similar reasons, visit a physician and obtain a note detailing the period and the reason you were medically incapable of taking the exam.
- The exam dates are stated below. Please plan your travel and other activities accordingly.
- Exam times are stressful and one could forget about the exam time. Please make sure you arrange for multiple reminders so that you do not forget about the exam(s). This is another reason to religiously follow Piazza as there will be numerous reminders about the exam when it gets close to the actual exam date.
The exams will assess student learning outcomes (6)
.
Mid-term exam
The in-class mid-term exam will most likely be split across two lectures. Please see the schedule to find the dates. The exam will be closed book and notes. However, you can bring in a single 8.5x11 inch paper (you can use both sides). (The sheet can be typed as long as the sheet is readable.) The exam may be split over two lectures to give you an appropriate amount of time to finish the exam.
Final exam
Again the exam will be closed book and notes but you can bring in two 8.5x11 inch sheets. (Again, the sheets can be typed as long as they are readable.)
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 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 project. You can also use the group as your study group for the course. Piazza offers a mechanism to search for group-mates.
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, TTY: 716-645-2616, : 716-645-3116).
You must advise your instructor during the first two weeks of the course so that we may review possible arrangements for reasonable accommodations.
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 for more information. For confidential assistance, you may also contact a Crisis Services Campus Advocate at 716-796-4399.
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
- 202 Michael Hall (South Campus), 716-829-5800
Health Services
Michael Hall (South Campus), 716-829-3316
Health Promotion
114 Student Union (North Campus), 716-645-2837
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. Further, 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?
I would be happy to get feedback from you. You can either talk/send email to me, or use Piazza .