# Graduate Algorithms (CSCI 5454), Fall 2018

## Instructor

• Sriram Sankaranarayanan (srirams@….)

• Office Hours: To be announced.

## Course Staff

• Ilam Subbiah (Graduate Course Assistant).

• S.S.L (Grader – anonymous to students. All grade related questions should be addressed to the instructor or the other course staff.).

## Course Syllabus

This is a graduate course on algorithms. We will focus on studying basic algorithms at a finer level of detail and more advanced algorithms and data structures.

### Topics Covered

• “Concrete” Mathematics:

• Solving Recurrences,

• Basic Combinatorics (review) and

• Probability Theory.

• Algorithm Design Approaches

• Divide and Conquer

• Dynamic Programming

• Greedy Algorithms

• Randomized Algorithms

• Approximation Algorithms

• Data Structures

• Balanced Trees

• Hashtables

• Amortized Analysis

• Union-Find Data Structures

• Fibonacci Heaps

• Graph Algorithms

• Shortest Path (Review)

• Flow Problems.

• Complexity Theory: P vs NP

• Advanced Topics (Subject to Change)

• Combinatorial Optimization: Randomization and Approximation.

• Geometric Algorithms

• String Algorithms

• Quantum Algorithms

### Prerequisites

We will assume that the student has already taken an undergraduate level course on algorithms, and is therefore familiar with the following topics from day one.

Students lacking these pre-requisites are strongly encouraged to take CSCI 3104 first.

Stuff you should already have learned and reviewed for this course.

• Big-O, Big-Omega, Big-Theta notations, and their meanings.

• Basic data structures: Heaps, and Binary Search Trees.

• Algorithm Design Approaches:

• Divide and Conquer including analysis using recurrences

• Greedy Algorithms

• Dynamic Programming Algorithms

• Algorithms for the following primitives:

• Sorting: bubblesort, mergesort, heapsort, quicksort.

• Searching

• Graph Algorithms: Depth/Breadth First Search, Shortest Paths, Spanning Trees.

• P vs NP: definitions and familiarity NP complete problems.

### Programming

We will set programming assignments in Python3. These assignments will require basic knowledge of writing programs in Python3.

• Python3 functions, and control loops.

• Data structures: lists, dictionaries and sets.

• Classes and Inheritence.

• Ability to write small projecs in Python3, test and debug.

## Textbook

We will use the textbook by Cormen, Leiserson, Rivest and Stein (CLRS). https://mitpress.mit.edu/books/introduction-algorithms.

## Schedule

 ID Date Topics Covered Book Sections 1 Tu, 8/28 Introduction to Algorithms. The Stable Marriage Problem Jupyter Notebook 2 Th, 8/30 Asymptotic Notation (recap), Recurrences (recap) Ch. 3, 4 3 Tu, 9/4 Asymptotic Notation and Recurrences (continued) Ch. 4, Appendix C 4 Th, 9/6 Probabilistic Analysis (Random Variables, Expectations and Indicators) Ch. 5 5 Tu 9/11 Divide and Conquer algorithms: Karatsuba multiplication, closest pair of points 6 Th 9/13 Fast Fourier Transforms (FFTs) 7 Tu 9/18 Quicksort: randomized and deterministic pivot selection. Treaps 8 Th 9/20 Treaps and Skip Lists 9 Tu 9/25 Amortized Analysis 10 Th 9/27 Fibonacci Heaps and Splay Trees 11 Tu 10/2 Sriram travelling to EMSOFT 2018: online lecture posted. Revision: dynamic programming basics 12 Th 10/4 Sriram travelling to EMSOFT 2018: online lecture posted. 13 Tu 10/9 Review: Greedy Alg. and Basic Graph Alg. Videos posted 14 Th 10/11 - same - Videos posted 15 Tu 10/16 Shortest Path Algorithms: Bellman-Ford, Dijkstra CLRS 16 Th 10/18 Shortest Path Algorithms: All pairs shortest paths CLRS 17 Tu 10/23 Linear and Integer Programming CLRS 18 Th 10/25 NP-Completeness and Intractability CLRS 19 Tu 10/30 NP-Completeness CLRS 20 Th 11/1 Approximation Algorithms: Scheduling Jeff Erickson's Notes 21 Tu 11/6 Approximation Algorithms: Vertex Cover Jeff Erickson's notes 22 Tu 11/13 Approximation Algorithms: k-Center 23 Th 11/15 Quantum Computation: Basics 24 Tu 11/27 Quantum Algorithms 25 Tu 11/29 Grover's Search Algorithm 26-30 Student Project Presentations

The course work will consist of (a) weekly problem sets that will involve solving algorithmic problems and some coding; (b) spot exams; (c) final project; and (d) participation.

### Problem Sets (45% of the grade)

Each week, we will have a problem set provided to you as a Jupyter (IPython) notebook. This will include questions that involve writing small python3 programs and answering more descriptive questions that may involve algorithm design, mathematical analysis or proofs.

To do this: you should first download and install Jupyter on your machine. See Jupyter Notebook Install Guide

You must also download and test out some notebooks we will provide.

### Spot Exams (25% of the grade)

We will have 2 spot exams spread out through the semester. They will test material that you have learned and go on for one hour each.

Tentatively we have scheduled spot exams for the following dates (subject to change).

• Thursday, October 18, 2018.

• Tuesday, November 13, 2018.

#### Logisitics for Exams

1. The exam will be delivered in-class for students in the regular on-campus section.

2. Students enrolled in the distance section, but are resident on/near campus will attempt the exam from 6:30 - 7:30 PM on campus.

3. Students who live too far away will need to email the instructor and agree on a setup by week two. For such students, this may involve signing up for a proctoring service.

4. Accomodations such as alternative exam timings will only be provided for students with a letter from the campus disability services or valid documented medical reasons (a doctor's note is needed). Students receiving the accomodation will need to be mindful of the instructor's limited time and the overall resource limitations.

### Final Project (25% of the grade)

A final project will account for 25% of the grade. It will involve working in teams of up to two students who will understand and implement an algorithm beyond what has been covered in class. The project may be presented in class over a 15 minute slot, or submitted as a 15 minute video produced by the students, that can be posted on youtube. If the student is unable to post a video, they can produce a PDF writeup of upto 4 pages.

#### Logistics for Final Project

1. Teams of two and topics will be finalized by November 1, 2018.

2. All projects will be due on December 8, 2018. No extensions are possible.

3. Presentations will be held in class for 15 minutes starting the week after the thanksgiving break. In class presentations are voluntary but highly appreciated. We expect about 16 projects to be presented.

4. All projects not presented in class, will be posted as a video so that the instructor and course staff may grade them.

More details will be available as the deadline nears.

### Participation (5% of the grade)

Participation will be judged for on campus students in terms of attendance in class and asking questions. For students in the distance section, participation will be in terms of helpful posts on the forums asking questions and responding to them.

Final grades will be calculated using the cumulative scores with the appropriate weightage.

## Collaboration Policy

You are welcome and encouraged to work together in learning the material. However, please read the following statement clearly. Violating the course policy will result in a failing grade in the entire class and a trip to a honor code hearing. It may also debar you from being a TA or RA in the department for at least a semester.

1. Resources Available To You: You are allowed to consult the instructor, course staff and classmates. If you worked with your classmates, your assignment must clearly acknowledge who you worked with. When you work with others, you are expected to understand the solution and write it up on your own, in your own words. Same goes for programming assignments.

2. Resources Forbidden To You: Googling for a solution, asking students not in the class, posting on stack exchange, or hiring outside help.

3. Plagiarism is forbidden: the assignments and code that you turn in should be writtencomposed entirely on your own. You should not need to consult sources beyond your textbook, class notes, posted lecture slides and notebooks, programming language documentation, and online sources for basic techniques. Copyingsoliciting a solution to a problem from the internet or another classmate constitutes a violation of the course's collaboration policy.

4. Do not search for a solution online: You may not actively search for a solution to the problem from the internet. This includes posting to sources like StackExchange, Reddit, Chegg, etc.

5. StackExchange Clarification: Searching for basic techniques in PythonPandasNumpy is totally fine. If you want to post and ask “How do I group by two columns, then do something, then group by a third column” that's fine. What you cannot do is post “Here's the DataFrame my prof gave me. I need to convert Age in Earth years to Martian years and then predict the person's favorite color. Give me code!”. That's cheating.

6. When in doubt, ask: We have tried to lay down some rules and the spirit of the collaboration policy above. However, we cannot be comprehensive. If you have doubts about this policy or would like to discuss specific cases, please ask the instructor. If it has not been described above, you should discuss it with us first