Design and Analysis of Computer Algorithms - Fall 2024

Course Information

Course: 01:198:344 - Sections 01, 02, 03, 04, 10, 11, 12, 13

Instructor: Surya Teja Gavva (He/Him)

Email: firstname[at]math[dot]rutgers[dot]edu

Office: CORE 318A

Course Overview

Website: You can find all the course material here on Canvas. We will use Piazza for online discussions.

Prerequisites: CS 112 Data Structures, CS 206 Introduction to Discrete Structures. We assume a knowledge of basic concepts of programming and data structures, e.g., lists, stacks, queues, trees, as well as basic mathematics, e.g., elementary calculus, proof by induction, linearity of expectation, permutations, logarithms, and asymptotic notation (i.e., “big-Oh”, “big-Omega”).

Credits: 4 Credits

Lecture Schedule

Office Hours

Teaching Assistants

Haoyu Li: Thursday 4:00 PM - 5:00 PM, CoRE 334

Brian Zhang: Monday 6:45 PM - 7:45 PM, ARC-107

Hoang Long Tran: Thursday 4:00 PM - 5:00 PM, CoRE 334

Eric Jing: Wednesday 5:30 PM - 6:30 PM, CoRE 305

Jingyuan Huang: Thursday 4:00 PM - 5:00 PM, CoRE 334

Ismaeel Abdulghani: Friday 10:00 AM - 11:00 AM (Zoom)

Yingpei Mo: Wednesday 3:00 PM - 4:00 PM, Hill 204

Vineela Sunkara

Amet Vikram

Recitations

Section 01: Tue 4:05 PM - 5:00 PM, Busch SEC-205 (Haoyu)

Section 02: Thu 4:05 PM - 5:00 PM, Busch SEC-202 (Brian)

Section 03: Tue 7:45 PM - 8:40 PM, Busch SEC-207 (Long)

Section 04: Tue 5:55 PM - 6:50 PM, Busch SEC-207 (Eric)

Section 10: Thu 7:45 PM - 8:40 PM, Livingston BE-250 (Jingyuan)

Section 11: Tue 8:45 AM - 9:40 AM, Busch ARC-105 (Ismaeel)

Section 12: Mon 7:45 PM - 8:40 PM, Busch ARC-107 (Brian)

Section 13: Wed 7:45 PM - 8:40 PM, Livingston BRR-5085 (Yingpei)


Course Objectives

The main objective of this course is to strengthen your algorithmic thinking — enabling you to systematically and rigorously approach problems and develop efficient solutions through well-defined steps. To accomplish this, we will delve into key techniques for designing combinatorial algorithms and the mathematical methods used to analyze their complexity. While we will cover a variety of standard topics, it’s essential to view these as tools that serve our primary goal: refining your ability to think algorithmically. Below is a tentative list of the topics we will explore throughout the course, though not necessarily in this order:

Textbooks and References

There is no required textbook for this course. However, the following resources are highly recommended to enhance your understanding:


Lecture Schedule

Week Date Day Notes Topics Reading/HW
1 September 3 Tuesday First day of class Introduction, Algorithms [Chapter-0]
September 5 Thursday Proof of correctness, RAM model, time complexity, Asymptotic Notations [CLRS, Chapters 1, 2, 3]
2 September 10 Tuesday Insertion Sort, Bubble Sort, Merge Sort, Recurrence Relations
September 12 Thursday Divide and Conquer: Merge Sort, Karatsuba's algorithm, Strassen's algorithm, Recursion Tree Method HW-1 released on 9/14, [CLRS Chapter 4]
3 September 17 Tuesday Recursion Trees, Master Theorem, Binary Search, Tower of Hanoi [Chapter-1], [Chapter-2]
September 19 Thursday 2-Sum, 3-Sum, Max Profit, Linear Time Selection
4 September 24 Tuesday Linear time Select, Quick Sort [CLRS, Chapter 7, 8, 9]
September 26 Thursday Randomized Quick Sort, Comparison Based sorting lower bound, Counting Sort
5 October 1 Tuesday Variation of Binary Search, Data Structures - stacks/queues, heaps, Hashmaps HW-1 Due
October 3 Thursday Heaps -- top K elements, Hashmaps, Randomized hashing, universal hash families [CLRS, Chapter 10,11]
6 October 8 Tuesday Dynamic Programming: MinBills, Subset Sum, Subset Sum with fixed Size, 0/1 Knapsack, LIS, LCS [Chapter-3]
October 10 Thursday Greedy Algorithms: Unit weight, fractional Knapsack, Class Scheduling, File Reordering, Huffman Encoding [Chapter-4]
7 October 15 Tuesday More Greedy Algorithms: File Merging, Container with Most water, Job Sequencing with Deadlines, Coin Change
October 17 Thursday Midterm Review
8 October 22 Tuesday Midterm MIDTERM
October 24 Thursday Graphs, Euler Circuits, Matchings, Graph Reduction, BFS, DFS [Chapter-5]
9 October 29 Tuesday Graph Search, BFS, shortest path, Bipartite testing, Tree Diameter [Chapter-6]
October 31 Thursday DFS, cycle detection, topological sort, Strongly Connected Components
10 November 5 Tuesday Multisource BFS, Kosaraju's Algorithm for SCC, Bridges, Minimum Spanning Trees
November 7 Thursday Kruskal, Prim, Boruvka, Union-Find, Shortest Path [Chapter-7]
11 November 12 Tuesday Fibonacci Heaps, Dijkstra, Bellman-Ford [Chapter-8]
November 14 Thursday Bellman-Ford, Floyd-Warshall
12 November 19 Tuesday Floyd-Warshall, Shortest Path in DAGs [Chapter-9]
November 21 Thursday Johnson's Algorithm, Network Flow, Ford-Fulkerson's method
13 November 26 Tuesday (Thursday Classes meet as usual) Ford-Fulkerson, MaxFlow-MinCut, Edmonds-Karp [Chapter-10]
November 28 Thursday Thanksgiving Recess No class
14 December 3 Tuesday Edge Disjoint Paths, Vertex Disjoint Paths, Bipartite Matching, Scheduling [Chapter-11]
December 5 Thursday P vs NP, NP hard, NP complete, 3-SAT [Chapter-12]
15 December 10 Tuesday Last regular class NP hardness reductions
December 12 Thursday Reading Day No class
December 17 Tuesday FINAL EXAM 12:00 - 3:00 PM (sections 1-4)
8:00 - 11:00 PM (sections 10-13)

COURSE/UNIVERSITY POLICIES

This course is dedicated to creating an inclusive, respectful, and supportive learning environment where every student is welcomed and valued, regardless of background, identity, or abilities. Discrimination, harassment, or any form of disrespect are not welcome. My goal is to ensure that all students feel safe, included, and able to fully engage in their learning, regardless of race, ethnicity, religion, gender, sexual orientation, or any other personal attribute.

I am committed to fostering a space where everyone can thrive, and I value your input to help achieve this. Please feel free to share your thoughts on what I can stop, start, or continue doing to make sure every student feels respected and empowered to actively participate in our learning community.

Students with Disabilities

If you need any accommodations, I encourage you to contact me as early as possible so that we can work together to support your learning. For more information on how to request accommodations, please visit https://ods.rutgers.edu/myaccommodations/letter-of-accommodations. You can also find the full policies and procedures at http://ods.rutgers.edu/.

Rutgers CS Diversity and Inclusion Statement

Rutgers Computer Science Department is committed to creating a consciously anti-racist, inclusive community that welcomes diversity in various dimensions (e.g., race, national origin, gender, sexuality, disability status, class, or religious beliefs). We will not tolerate micro-aggressions and discrimination that creates a hostile atmosphere in the class and/or threatens the well-being of our students. We will continuously strive to create a safe learning environment that allows for the open exchange of ideas and cherished freedom of speech, while also ensuring equitable opportunities and respect for all of us. Our goal is to maintain an environment where students, staff, and faculty can contribute without the fear of ridicule or intolerant or offensive language.

If you witness or experience racism, discrimination or other offensive behavior, you are encouraged to bring it to the attention of the undergraduate program director and/or the department chair. You can also report it to the Bias Incident Reporting System here.

Religious Accommodation

If you need to miss a class or assignment due to a religious holiday, just let me know in writing at least two days in advance, and your absence will be excused. I’m happy to work with you to make sure you can catch up on any missed work or arrange for an alternative date for exams or assignments. Please feel free to reach out if you need any additional time or support around religious observances.

Academic Integrity

The students are expected to follow Rutgers and CS Department academic integrity policies for all their work in this course. More information can be found at https://academicintegrity.rutgers.edu/ and https://www.cs.rutgers.edu/academics/undergraduate/academic-integrity-policy.

I understand that coursework can be challenging, and it’s natural to seek help, but please remember that using external resources like Chegg, ChatGPT, or similar websites to obtain solutions for homework, quizzes, or exams is against the University’s Academic Integrity policy. My goal is to support your learning journey, so if you ever feel stuck or need help, please reach out to me!

Compliance & Title IX

Rutgers faculty are committed to helping create a safe learning environment for all students and for the university as a whole. If you have experienced any form of gender or sex-based discrimination or harassment, including sexual assault, sexual harassment, relationship violence, or stalking, know that help and support are available. Rutgers has staff members trained to support survivors in navigating campus life, accessing health and counseling services, providing academic and housing accommodations, and more. The University strongly encourages all students to report any such incidents to the University. Please be aware that all Rutgers employees (other than those designated as confidential resources such as advocates, counselors, clergy, and healthcare providers as listed in Appendix A to Policy 10.3.12) are required to report information about such discrimination and harassment to the University. This means that if you tell a faculty member about a situation of sexual harassment or sexual violence, or other related misconduct, the faculty member must share that information with the University's Title IX Coordinator. If you wish to speak to a confidential employee who does not have this reporting responsibility, you can find a list of resources in Appendix A to University Policy 10.3.12. For more information, visit https://nbtitleix.rutgers.edu/.

Attendance and Participation

Regular attendance is strongly encouraged, as in-class discussions and activities significantly contribute to your understanding of the material. Participation in class discussions and group activities is expected and contributes to your overall engagement with the course.

Absence Policy

If you need to miss a class, I encourage you to connect with a classmate to catch up on any missed material—this way, you’ll stay on track with the course. If you know you’ll have to miss an exam, please let me know as soon as possible. Missing an exam should only happen in the case of a genuine, verifiable emergency. If you find yourself in a truly difficult situation, I’m here to work with you. In such cases, while we may not have a makeup exam, your final exam may carry more weight to accommodate the missed assessment. Please don’t hesitate to reach out if you’re facing challenges. (Verifiable means providing documentation, such as a detailed doctor’s note with the doctor's name and contact information, or a notice of a court appearance, showing that you couldn’t attend the exam).

Email Policy

Please begin the subject line of all your emails to course staff with “[CS344F24]” to help us keep track of your messages. We strive to respond within 24 hours on weekdays and 48 hours on weekends. For questions about course materials or lecture clarifications, we encourage you to post on Piazza, where our entire course team can assist you more promptly.

Names and Pronouns

If you have a preferred name other than what is listed on the roster, kindly let me know. This course affirms people of all gender expressions and gender identities. Feel free to correct me on your preferred gender pronoun. If you have any questions or concerns, please do not hesitate to contact me.

Typesetting, Latex Resources


All homework must be typeset; handwritten submissions will not be accepted. We highly recommend using LaTeX for this purpose. You can download LaTeX for free here. For the purpose of this course, you do not even need to install LaTeX and can instead use an online LaTeX editor such as Overleaf.

Two great introductory resources for LaTeX are Getting started with TeX, LaTeX, and friends by Allin Cottrell (for general purpose LaTeX) and LaTeX for Undergraduates by Jim Hefferson (for undergraduates mathematics) accompanied by the following cheatsheet (note that this document use "MATH MATH " notation compared to the perhaps more widely used "$ MATH $" -- both are completely fine in LaTeX). You can also use this wonderful tool Detexify by Daniel Kirsch for finding the LaTeX commands of a symbol (just draw the symbol!). If you are interested in learning more about LaTeX (beyond what is needed for this course), check the Wikibook on LaTeX and the Wikibook on LaTeX for Mathematics.


COURSE STRUCTURE

Grading

The breakdown of grades for the course is as follows:

Component Percentage
Assignments 40%
Quizzes 10%
Midterm 20%
Final Exam 30%
Extra credit 10%
Total 100%

Quizzes

To help you stay on track with the course, there will be weekly quizzes on Canvas that go along with the lectures. Each quiz will include multiple-choice or similar types of questions focused on the material we’ve covered that week. Think of these quizzes as gentle reminders to review the topics regularly. They’re designed to be quick—if you’ve gone over the material, you should be able to finish in under 15 minutes.

These quizzes also give me a way to check in on how the class is doing and make sure everyone is staying engaged. Quizzes should be done individually and you are not allowed to discuss these questions with other students in the class.

Homework Assignments

In this course, homework assignments play a crucial role in enhancing and refining your algorithmic thinking abilities. These assignments will consist of a few carefully selected algorithmic problems for you to tackle, along with mathematical proofs to construct. Consider the homework as your primary opportunity to practice and apply the concepts learned in lectures, pushing your skills further and solidifying your understanding of the material.

Timing:

We'll have six or seven homework assignments throughout the course, and you can find the tentative schedule for when they’ll be released and due on the course calendar. Generally, homework will be posted on a Tuesday, giving you two weeks to complete it, with submissions due by 11:59 pm on the following Tuesday. Occasionally, the schedule might shift a bit, so please keep an eye on the course calendar to stay updated.

Typesetting:

Homework assignments will be released on Canvas and must be submitted there as a single PDF file with your solutions in order. All homework must be typeset; handwritten submissions will not be accepted. We highly recommend using LaTeX for this purpose. It’s a valuable skill that helps you create clear, well-organized proofs, and it's also easier to edit your work. Simple LaTeX instructions and templates will be provided, and the course staff are available to assist you with any LaTeX-related questions. Using LaTeX also makes grading easier and more efficient. To encourage this, students who submit all their homework using LaTeX will receive a +5% bonus at the end of the semester.

Groups:

You have the option to work on each homework assignment either individually or in groups of two or three students. Here's how the group policy works:

Collaboration Policy

You are welcome—and even encouraged—to discuss assignments with your classmates. However, it’s important that each student (or group) completes their work independently. If you’re unsure about how to maintain academic integrity, consider following the "Gilligan's Island rule": after collaborating with others on an assignment, put aside all notes, take a break for about an hour (perhaps by watching a couple of episodes of Gilligan's Island), and then return to recreate your solutions entirely on your own. This approach ensures that you fully understand the material and are submitting your own work. Please note that the department uses plagiarism detection software, and any violations will be reported to the Office of Student Conduct.

Extra Credit

There will be extra credit assigned by the instructor and the TAs. You will get 5% credit for typesetting in LaTeX. Certain homework assignments may feature additional challenging questions. These are intended for students interested in delving deeper into the topics covered in the course and are much more difficult than the standard questions, sometimes extending beyond the course material. While these questions won't count toward your regular homework grade, they can earn you extra bonus credit at the semester's end.

Exams

Think of these exams as a blend between quizzes and assignments, designed to help you assess and deepen your understanding of the course material. Remember, the aim of exams is to reinforce your learning, not just to assign grades.

The use of tablets, calculators, phones, or other electronic devices is not allowed during the exams and quizzes. You are allowed one page of handwritten notes. The workspace should include only this paper and plenty of blank paper.

A missed exam draws zero credit. However, emergencies will be considered upon submitting a university-issued written verification to the Instructor.

Midterm:

The midterm counts for 20% of the grade. It will be tentatively on October 22.

Final:

The final exam (cumulative) counts for 30% of the grade. It will be held at the end of the semester according to the University schedule. Further details on the timing and format of the final exam will be released later in the semester.

     

       
       

RESOURCES

CAVE and Learning Centers

I encourage everyone to use CAVE and our learning centers. If you're comfortable with the material, use this opportunity to share your knowledge and help others. If you're looking to deepen your understanding, connect with peers who can offer different perspectives. By working together, we can all enhance our learning!

Basic Needs Security

If you or someone you know is experiencing basic needs insecurity, please see the following resources at http://basicneeds.rutgers.edu. At some point in a college student’s educational journey, they may face challenges in accessing adequate amounts of food, housing, financial, or other resources. Any student who has difficulty affording groceries or accessing sufficient food to eat every day, or who lacks a safe and stable place to live, is urged to contact the Offices of the Dean of Students for support by emailing deanofstudents@echo.rutgers.edu.

Student Wellness Resources

Counseling, ADAP & Psychiatric Services (CAPS):
(848) 932-7884
17 Senior Street, New Brunswick, NJ 08901
http://www.rhscaps.rutgers.edu/
CAPS is a University mental health support service that includes counseling, alcohol and other drug assistance, and psychiatric services. CAPS offers a variety of services including individual therapy, group therapy and workshops, crisis intervention, referrals to specialists in the community, and consultation and collaboration with campus partners.

Violence Prevention & Victim Assistance (VPVA):
(848) 932-1181
3 Bartlett Street, New Brunswick, NJ 08901
http://www.vpva.rutgers.edu/
The Office for Violence Prevention and Victim Assistance provides confidential crisis intervention, counseling, and advocacy for victims of sexual and relationship violence and stalking to students, staff, and faculty. To reach staff during office hours when the university is open, or to reach an advocate after hours, call 848-932-1181.

Useful Resources


Student Resources


Primality Check

Enter a number to check: