CSE 331 Syllabus
Algorithms and Complexity
Spring 2020
Time and location: Mondays, Wednesdays and Fridays, at 2:00-2:50pm, Knox 109 (No physical classes after the spring break. Lecture videos will be put on the schedule by (or immediately after) the class time).
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 grade for 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.
For more details, please see the department policy on academic integrity .
Instructor Information
A. Erdem Sariyuce
- :
erdem "at" buffalo "dot" edu
- :
323 Davishttps://ub.webex.com/meet/erdem : Mondays and Wednesdays, 3:00-3:50pm.- : Mondays 4:00-4:50pm and Wednesdays 3:00-3:50pm.
It is preferable to set up an appointment (by email) if you want to talk to me outside of my office hours. However, you can drop by if my office door is open.
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:
Hans Bas
- : Tue 12:00-12:50, Thu 12:00-12:50
: Salvador Lounge (Davis Hall 2nd floor)https://ub.webex.com/meet/hansbas- Language:
Python
Elijah Einstein
- : Tue 1:00-1:50, Fri 3:00-3:50
: Salvador Lounge (Davis Hall 2nd floor)https://ub.webex.com/meet/elijahei- Language:
Java
Jessica Grogan
- : Tue 4:00-4:50, Thu 1:00-2:30
: Salvador Lounge (Davis Hall 2nd floor)https://ub.webex.com/meet/jrgrogan- Language:
C++
Johnny Guo
- : Thu 2:30-5:30
: Salvador Lounge (Davis Hall 2nd floor)https://ub.webex.com/meet/johnnygu- Language:
Java
Nick Kobis
- : Mon 4:00-4:50, Fri 10:00-11:50
: Salvador Lounge (Davis Hall 2nd floor)https://ub.webex.com/meet/njkobis- Language:
C++
Rishi Nalapareddy
- : Tue 10:00-10:50, Wed 11:00-11:50, Thu 11:00-11:50
: Salvador Lounge (Davis Hall 2nd floor)https://ub.webex.com/meet/cnallapa- Language:
Java
Liam Orr
- : Thu 9:00-10:50
: Salvador Lounge (Davis Hall 2nd floor)https://ub.webex.com/meet/liamorr- Language:
Python, Java
Jacob Santoni
- : Tue 2:00-3:50
: Salvador Lounge (Davis Hall 2nd floor)https://ub.webex.com/meet/jlsanton- Language:
Java
Veronica Vitale
- : Mon 12:00-12:50, Wed 12:00-12:50
: Salvador Lounge (Davis Hall 2nd floor)https://ub.webex.com/meet/vjvitale- Language:
Python, Java
Xuanhua Zhang
- : Tue 5:00-5:50, Fri 12:00-12:50
: Salvador Lounge (Davis Hall 2nd floor)https://ub.webex.com/meet/xuanhuaz- Language:
C++, Java
Winnie Zheng
- : Tue 9:00-9:50, Wed 10:00-10:50
: Salvador Lounge (Davis Hall 2nd floor)https://ub.webex.com/meet/wzheng29- Language:
Java
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). You can find also find the lecture videos (as well as lecture videos from Fall 2018 and Fall 2019) on the schedule page. There will not be any physical classes after the spring break (starting Mar 23).
Recitations
Recitation video will be put on the schedule page (next to recitation notes) at the beginning of each week. There will not be any physical meetings for recitations starting Mar 23. Recitation times will be used as additional office hours by the TA leading the recitation and only the questions related to recitation notes will be discussed. You should have signed up for one of these seven recitation sections:
- Mondays, 10:00-10:50am
(Norton 214)OH by Nick Kobis for recitations-related questions - Mondays, 3:00-3:50pm
(Talbert 103)OH by Nick Kobis for recitations-related questions - Mondays, 5:00-5:50pm
(Talbert 103)OH by Liam Orr for recitations-related questions - Tuesdays, 11:00-11:50am
(Baldy 108)OH by Hans Bas for recitations-related questions - Wednesdays, 4:00-4:50pm
(Park 440)OH by Hans Bas for recitations-related questions
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 were 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 during the Mini 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 | Mini Project |
Be able to effectively work in a team | ABET (5) | Lectures | Mini 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.
Schedule
We will have roughly 13 weeks worth of classes. 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. 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.
There will be an entry for each lecture and homework. Sometimes, the entries may include side comments or stories that I feel are relevant to the course (but are not directly related to the lectures). Also there will be a weekly True/False poll/question to prepare you better for True/False questions on the exams (which you guys will generally not see on the homeworks). Try to work on these problems on your own to prepare better for the exams.
We will also 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.)
Grading Policy
Here is the split of grades:
Course Component | $\%$ of grade |
Mini Project | $5\%$ |
Homeworks | $35\%$ |
Quizzes | $5\%$ |
Exams | $55\%$ |
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.
Mini Project
Your task
Your goal is to produce a 3 minute video (shorter is OK) on YouTube that talks about ethical impact of algorithms (good and/or potentially bad) on society. Your video should talk about one specific case study and has to be done in groups of size EXACTLY 3. In addition each member of the group will have to fill in a survey once the final version of the group video has been submitted.
What exactly constitutes a case study?
A case study consists of an algorithm (or a class of related algorithms) that solves a real-life problem. So when you choose a case study you have to pick both the algorithm(s) and the problem that they solve. There is some amount of leeway on what constitutes a class of algorithms but the class has to be fairly specific-- in particular, you should be able to write about the algorithms at the level of algorithm ideas you write in your homeworks. For example these two examples are OK:
- Pagerank is a specific algorithm used by Google to solve the specific problem of ranking its search results. This is OK as a case study since both the algorithm and the problem are very specific.
- Collaborative filtering is a class of algorithms that is used to recommend movies (e.g. on Netflix ). In this case we have a class of related algorithms that is used to solve a specific problem of recommending movies.
The following are examples that are not OK as case studies (since they are too general):
- Machine learning algorithms are used in recommending movies. Here machine learning algorithms is not specific enough.
- Collaborative filtering is a class of algorithms that is used in recommender systems. Here the problem of recommending systems is too broad.
For more details, please see the mini project page.
The video mini-project will assess student outcomes (4)
and (5)
.
Homeworks
Homeworks will be released on Mondays by 9:00am Fridays on the CSE 331 web page and will be due via Autolab by 8:00am the second Monday, giving you 10 days. 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). Homework $0$ will be released by the first day of class and will be due by 8:00am on Monday, February 3, 2020. 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. (The entire homework schedule is on the schedule page, so please plan accordingly.) However, the three lowest scores on your homeworks will be dropped. I strongly encourage you to save these three 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 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. The quizzes will be from 2:00-2:10pm on Friday, March 6 and Monday, May 4. The quiz 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.
The second quiz will be at 2:00-2:15pm on Monday, May 4. It'll be a rehersal for the final exam and the majority of the grade will be related to uploading the solutions properly. It'll be take-home kind of exam, where the questions are released at 2:00pm and the solutions will be uploaded to AutoLab by 2:15pm. Students will write the solutions to blank sheets, take legible photos, and upload those to AutoLab (typing is okay too). More details will be given the week before the quiz 2.
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 $40\%$ of your grade.
The quizzes will assess student learning outcomes (6)
.
Exams
Exam Grade
The mid-term is worth $22\%$ of your grade and the final exam is worth $33\%$ of your grade. However, if it is to your advantage, then the final exam will be worth $55\%$ 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 mid-term exam will be split across two lectures. The in-class exams will from be 2:00-2:50pm on Wednesday, March 11 and Friday, March 13 in the usual meeting place and time. 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 is split over two lectures to give you appropriate amount of time to finish the exam.
Final exam
The final exam will be held in Knox 109 (the usual meeting place) on Monday, May 11 from 3:30-6:00pm. (Note that the exam is for two and a half hours and not for three hours.) 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.)
The final exam will be a take-home kind of exam for 3 hrs during the scheduled final exam time (Monday, May 11 from 3:30-6:30pm). Questions will be released at 3:30pm and the solutions will be uploaded to AutoLab by 6:30pm. Students will write the solutions to blank sheets, take legible photos, and upload those to AutoLab (typing is okay too). More details will be given the week before the final exam
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 this blog post from Fall 2009 on some tips on how to do well in this course (hint: work hard!)
- 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:
- The $5\%$ of the grade for the video mini project will be some of the easiest points in the entire course. Do not miss on those by forgetting about the deadlines.
- 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 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 .