Syllabus

CS 528 Advanced Data Structures and Algorithms

Fall 2014

Meeting Times

Lect: 11:00 - 11:50 M, Tu, Wed,  HB 112

Lab: 11:00 – 11:50 Th

Instructor

Dr. Razvan Andonie, HB 219-B, Office hours

Textbooks

Introduction to Algorithms, 3 rd Edition, by Thomas Cormen, Charles Leiserson, Ronald Rivest, and Clifford Stein, for lectures.

A Primer on Scientific Programming with Python, 3rd Edition, by Hans Petter Langtangen, Springer, 2012.

 

Objectives

This course is a continuation of previous undergraduate classes (programming, data structures, and algorithms) and has the role of reviewing but also introducing more advanced topics. As a first computer science course in the Computational Science Master’s Program, it will bring students which may come with different computational background to the same basic level. It focuses on the understanding and design of fundamental algorithms, with a more thorough presentation of time and space complexity.

 

Topics

Growth of functions: asymptotic notation.

Divide-and conquer: the maximum-subarray problem, Strassen’s algorithm for matrix multiplication, solving recurrences, the master theorem for solving recurrences.

Probabilistic analysis and randomized algorithms.

Sorting and order statistics: heapsort, quicksort, sorting in linear time, median and order statistics

Data structures: stacks, queues, linked lists, hash tables, binary search trees, red-black trees, augmented data structures.

Dynamic programming: matrix-chain multiplication, longest common subsequence, optimal binary search trees.

Greedy algorithms: Huffman codes, matroids and greedy methods, task-scheduling as a matroid.

Grading

Homeworks and class participation

40%

Programming projects (3, 10% each)

30%

Final project

30%

Grade Distribution:

95 - 100   A

90 - 94     A-

87 - 89     B+

83 - 86     B

80 - 82     B-

77 - 79     C+

73 - 76     C

70 - 72     C-

67 - 69     D+

63 - 66     D

60 - 62     D-

0  - 59      F

 

If you must miss an exam, contact your instructor prior to the exam to schedule a time to make it up. Late submission of assignments is generally not accepted. No partial credit for late assignments will be offered.

Lecture Resources

Some excellent video lectures following this textbook are available from MIT's Open Courseware, along with assignments, readings, solutions, and so forth. The same videos are also available for download through iTunes University in iPod/iPhone-ready formats. MIT OpenCourseWare (MIT OCW) is an initiative of the Massachusetts Institute of Technology (MIT) to put all of the educational materials from its undergraduate- and graduate-level courses online. The lectures of many courses are available in video format, freely downloadable.

 

Very interesting are also the MIT Open Courseware on the mathematics of computational science. We are not going to focus on these topics, since they will be subject of other courses.

Laboratory & Software

The Laboratory serves as a first introduction to computer programming of scientific applications, using the high-level Python language. The applications are taken from mathematics, numerical calculus, statistics, physics, biology, and finance. By blending programming, mathematics and scientific applications, the laboratory projects lay a solid foundation for practicing computational science.

We use Python. To install Python, use the WinPython installation package. Use the included Spyder scientific development environment.  You may install the 32 or 64 bit version, but it is better to install Python 2 (not 3), because the examples in the textbook are in Python 2. This software is available in the lab. A good link for scientific programming in Python is Numeric & Scientific Computation with Python. Here are some excellent Python Scientific lecture notes.

Other Python Resources: Python high-performance container datatypes, Problem Solving with Algorithms and Data Structures using Python

Final Project

The Final Project should be submitted as a technical report and presented in class. It will be graded as follows: 1/3 Python code, 1/3document, and 1/3 presentation. The report document should contain: problem description, benchmarking, figures, and discussion. Tables and a list of references are a plus. Using LaTeX brings an extra-credit of 10% to the project’s grade. Guidelines can be found at here. The presentation should be made with 10-15 slides, in about 15 minutes, including questions and answers. Presentation guidelines can be found here. Submit the report by email and place your source code and your executable version in a Final Project folder in your account.

Course Schedule

Date

Topic

Readings

Textbook: Leiserson

Assignments

9/25

Introduction

Syllabus

 

9/30

Getting started: analyzing algorithms, insertion sort, mergesort

Ch. 1 & 2

Video Lecture 1

Ex. 2.1-3, 2.3-2, 2.3-3, 2.3-4, 2.3-5, due next class

(not graded)

10/1

Correctness of algorithms. correctness of insertion sort and bubble sort

Ch. 2

10/2

Growth of functions

Ch. 3

Video Lecture 2

Ex. 3.1-4, 3.1-5, 3-3, due next class

(not graded)

10/7

Growth of functions, divide and conquer

 

10/8

Divide and conquer

Ch. 4

Video Lecture  3

Ex. 4.1-2, 4.1-5, 4.2-7, due next class

Ex. 4.1-3, due next Lab.

(not graded)

10/9

Divide and conquer

 

10/14

Mathematical analysis of recursive algorithms

Solving Recurrence Equations review (on Neve)

Homework 1 (on Neve), due next class

(not graded)

10/15

Mathematical analysis of recursive algorithms

 

10/16

Faculty Development Day (no classes)

 

 

10/21

Mathematical analysis of recursive algorithms

 

 

10/22

Randomized algorithms

Ch. 5 (5.1 – 5.3))

Video Lecture 4

 

10/23

Probabilistic analysis and of randomized algorithms: indicator random variables

 

Ex. 5.2-5, due next class

(not graded)

10/28

Heapsort

Ch. 6

 

10/29

Test (not graded)

 

10/30

Quicksort

Ch.7

 

11/4

Linear-time sorting: lower bounds, counting sort, Radix sort

Ch. 8

Video Lecture 5

Problem 3-4 (a – f), due next class

(graded)

11/5

Linear-time Sorting: Bucket sort

 

Problem 4-1 (a – g), due next class

(graded)

11/6

Order statistics, median

Ch. 9

Video Lecture 6

 

11/11

Veterans Day

No classes

 

11/12

Elementary data structures

Ch. 10

 

11/13

Hashing

Ch. 11 (11.1 – 11.3)

Video Lecture 7

 

11/18

Hashing

Ch. 11 (11.4 – 11.5)

Video Lecture 8

 

11/19

Binary search trees

Ch. 12

Video Lecture 9

 

11/20

Dynamic programming: matrix-chain multiplication, elements of dynamic programming

Ch. 15 (15.1 – 15.3)

Video Lecture 15

Ex. 15.2-1, due next class

(graded)

11/25

Dynamic programming: longest common subsequence, edit distance, Viterbi algorithm

Ch. 15 (15.4)

Ex. 15.3-6

Problems 15-5, 15-7 & 15-10

 

11/26

Greedy algorithms: elements of greedy strategy, Huffman codes

Ch. 16 (16. 1 – 16.3)

Video Lecture 16

 

11/27

Thanksgiving

No classes

 

12/2

Greedy algorithms: matroids, task-scheduling

Ch. 16 (16.4 – 16.5)

 

12/3

Amortized analysis

Ch. 17

Video Lecture 13 & Video Lecture 14

Problems 17-3, 17-4 & 17-5

 

12/4

Data structures for disjoint sets,

Ch. 21 (21.1 – 21.3)

 

Laboratory Schedule

Date

Topic

Readings

Textbook: Langtangen

Assignments

9/26

Introduction to Python

Introduce Project 0 (not graded): Exercises 1.1 – 1.4

Ch. 1-2

Resources for "A Primer on Scientific Programming with Python”

 

10/3

Introduce Project 1 (graded): Exercises 2.24, 3.16, 3.17

Ch. 3-4

Project 0 due

10/10

Introduce Project 2 (graded): Exercises 5.22 & 5.29.

Ch. 5

Project 1 due

10/17

Project 2

 

 

10/24

Introduce Project 3 (graded): Exercises 8.20 & 8.28.

Ch. 8

Project 2 due

10/31

Project 3

 

 

11/7

Introduce Project 4 (graded): Exercises A.20 & A.26.

Appendix A

Project 3 due

11/14

Introduce Final Project (graded). Choose one of the following exercises: 8.41 or 8.45.

 

Project 4 due

11/21

Final Project

 

 

11/28

Thanksgiving

No classes

No classes

12/5

Final Project presentation

 

Final Project due

 

Honor Code: All work turned in for credit, including exams and all components of the project, are to be the work of the student whose name is on the exam or project. For all project components, the student can receive assistance from individuals other than the instructor only to ascertain the cause of errors. Thus you can get help if you need it to figure out why something doesn't work. You just can't get help from anyone, other than the instructor or TA, to figure out how to make something work. All solutions turned in for credit are to be your individual work and should demonstrate your problem solving skills, not someone else's. Help each other understand and debug the programming assignments. However, you should write the code for your programs yourself. Writing it yourself is the only way you will learn. Since everyone is writing their own code, no two programs should be the same or so similar that I could convert one to the other by a simple mechanical transformation (e.g. changing variable names and comments). I consider this plagiarism and a violation of academic code. The following text should appear on all assignments: “I pledge that I have neither given nor received help from anyone other than the instructor for all program components included here.

First violation: Students must meet with the instructor. In most cases, the grade will be split between the authors of the copied programs. Second violation: Students will receive no credit for the assignment, an incident letter will be placed on file in the Computer Science Department, and the matter referred to the Computer Science Department Chair.

Class Attendance: Class attendance is expected and recorded.

ADA Statement: Students with disabilities who wish to set up academic adjustment in this class should give me a copy of their "Confirmation of Eligibility for Academic Adjustment" from the Disability Support Services Office as soon as possible so we can discuss how the approved adjustment will be implemented in this class. Students without this form should contact the Disability Support Services Office, Buillon 205 or dssrecept@cwu.edu or 963-2171.

Caveat: The schedule and procedures for this course are subject to change. It is the student's responsibility to learn of and adjust to changes.