Syllabus

CS 427 Algorithm Analysis

Fall 2013

 Meeting Times Lect: 1:00 - 1:50 M, Tu, Wed, Th, HB 116 (Section 001) Labs: 1:00 - 1:50Th, HB 116 (Section 001), HB 204 & HB 209 Instructor Dr. Razvan Andonie, HB 219-B, Office hours TA Text Anany Levitin: Introduction to The Design & Analysis of Algorithms, Addison Wesley, 2012, Third Edition.

# Objectives

This course is a study of algorithm design, algorithm complexity analysis, and problem complexity analysis. Design techniques analyzed will include divide-and-conquer, dynamic programming, greedy algorithms, backtracking, and branch-and-bound. These techniques can be considered general problem solving tools, whose applications are not limited to traditional computing and mathematical problems. Two factors make this point particularly important. First, more and more computing applications go beyond the traditional domain, and there are reasons to believe that this trend will strengthen in the future. Second, developing students’ problem solving skills has come to be recognized as a major goal of college education. Among all the courses in a computer science curriculum, a course on the design and analysis of algorithms is uniquely suitable for this task because it can offer a student specific strategies for solving problems. The course is organized around some fundamental strategies of algorithm design and algorithm design will be taught on a par with analysis. Some more abstract but very important topics will be also included: NP-completeness, approximation algorithms, lower-bound limits.

Learning Outcomes

On completion of this course, the student will have:

 A basic understanding of algorithm design and problem solving using fundamental techniques. The student will be able to demonstrate the associations between problem solving, algorithm design, and complexity analysis. Applied algorithm design, analysis, and implementation in various applications. Developed creativity and strategy skills for problem solving.

 Exams (2 - 40% each) 80% Assignments (approx. 30; only some of them will be graded) 20% Extra-credit: class participation up to 5%

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.

# Lectures & Projects

The slides for lectures can be found in the shared directory on Neve. Be ready to spend about two hours to prepare for each class (Reading + Assignment). Exercises have hints at the end of the textbook!

Data Structures and Algorithms many useful links by Prof. Toussaint

# Course Schedule

 Date Topics Reading Assignments 9/25 General presentation Syllabus 9/26 Introduction Ch. 1 Ass. 1: Ex. 10 (a, b), pg. 8, due next class 9/30 Analysis framework - asymptotic notation 2.1- 2.2 Ass. 2: Ex. 9, pg. 18, due next class 10/1 Analysis framework - asymptotic notation 2.1- 2.2 Ass. 3: Ex. 3, pg. 59; Ex. 11, pg. 61, due next class 10/2 Mathematical analysis of nonrecursive algorithms 2.3 Ass. 4: Ex. 6, pg. 68, due next class 10/3 Mathematical analysis of recursive algorithms: backward substitution 2.4, App. B Ass. 5: Ex. 9, pg. 78, due next class 10/7 Mathematical analysis of recursive algorithms: homogeneous recurrences 2.5, App. B Ass. 6: Ex. 8, pg. 78, due next class 10/8 Mathematical analysis of recursive algorithms: heterogeneous recurrences, Master Theorem 2.5, App. B Ass. 7: Ex. 1, pg. 76, due next class 10/9 Brute-force algorithms 3.1-3.2 10/10 Exhaustive search 3.4 Ass. 8: Ex. 3, pg. 106, due next class 10/14 Depth-First and Breadth-First Search 3.5 Ass. 9: Ex. 10, pg. 121 (a, b, c), due next class 10/15 Decrease-and-conquer: Insertion sort 4.1 Ass. 10: Ex. 11, pg. 130, due next class 10/16 Faculty Development Day (no classes) 10/17 Topological sorting 4.2 Ass. 11: Ex. 9 & 10, pg. 137, due next class 10/21 Decrease-by-a-constant factor algorithms: binary search, fake-coin problem, multiplication a la russe, Josephus problem 4.4 Ass. 12: Ex. 1, pg. 142, due next class 10/22 Variable-size-decrease algorithms: selection problem, interpolation search 4.5 Ass. 13: Ex. 10, pg. 157, due next class 10/23 Variable-size-decrease algorithms: binary search trees, the game of NIM 4.5 Ass. 14: Ex. 12, pg. 157, due next class 10/24 Exam I (open book, no electronic devices) 10/28 Divide-and-conquer: mergesort, quicksort 5.1-5.2 Ass. 15: Ex. 13, pg. 167, due next class 10/29 Binary tree traversal, multiplication of large integers, Strassen's matrix multiplication, closest-pair problem 5.3-5.5 Ass. 16: Ex. 11, pg. 175; Ex. 11, pg. 182, due next class 10/30 Transform-and-conquer: presorting, Gaussian elimination 6.1-6.2 Ass. 17 (on Neve), due next class 10/31 Balanced search trees, Heapsort, Horner's Rule, binary exponentiation 6.3-6.5 Ass. 18: Ex. 7, pg. 206, due next class 11/4 Problem reduction 6.6 Ass. 19:  Ex. 2, pg. 205, due next class 11/5 Space-time tradeoffs: sorting by counting, string matching, hashing 7.1-7.3 Ass. 20: Ex. 12, pg. 234, due next class 11/6 Dynamic programming, Knapsack Problem, Memory Functions 8.1-8.2 Ass. 21: Ex. 2, pg. 267, due next class 11/7 Optimal binary search trees, Warshall, Floyd 8.3-8.4 Ass. 22:  Ex. 12, pg. 292, due next class 11/11 Veterans Day 11/12 Greedy algorithms: Prim, Kruskal, 9.1-9.2 Ass. 23:  Ex. 1, pg. 311; Ex. 7, pg. 312, due next class 11/13 Dijkstra (single-source shortest path) 9.3-9.3 Ass. 24 (on Neve) 11/14 Huffman trees 9.4 Ass. 25: Ex. 3, pg. 322; Ex. 10, pg. 343, due next class 11/18 Iterative improvement: Simplex 10.1 11/19 Iterative improvement: maximum matching in bipartite graphs, the stable marriage problem 10.3-10.4 Ass. 24 due Ass. 26: Ex. 3, pg. 384, due next class Understand the Dental Matching Program Algorithm 11/20 Lower-bound arguments, decision trees 11.1-11.2 Ass. 27: Ex. 10 pg. 400, due next class, not graded. Solution can be found here. 11/21 P, NP, and NP-complete problems 11.3 Ass. 28: Ex. 5, pg. 410, due next class 11/25 P, NP, and NP-complete problems 11.3 Ass. 29: Ex. 11, pg. 411, due next class 11/26 Backtracking: n-queens problem, subset-sum problem 12.1 11/27 Thanksgiving 11/28 Thanksgiving 12/2 Branch-and-bound: assignment problem, knapsack problem, traveling salesman problem 12.2 Ass. 30: Ex.51, pg. 440, due next class 12/3 Approximation algorithms for NP-hard problems 12.3 12/4 Algorithms for Solving Nonlinear Equations 12.4 12/5 Review 12/10 Final Exam (open book, no electronic devices) noon – 1:30

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. 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.

You should write the code for your programs yourself. Writing it yourself is the only way you will learn. Do not work together to solve the programming assignments to the extent that two programs are essentially the same solution. All program solutions turned in for credit are to be your individual work and should demonstrate your problem solving skills, not someone else's. 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.

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 oror 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.