

Henry S. Baird Spring 2012 Course Design & Analysis of Algorithms CSE/Math 340 (3 credits) CRNs: 11264 (CSE); 13275 (Math) Algorithms are methods for solving information processing problems. Every algorithm must be automatable (for example, a computer can run it), and provably correct (that is, it must find the right answer for every instance of the problem it solves). We also often want it to run as fast as possible, and use as little memory as possible, even on huge instances. Fast algorithms for hard, practically important problems are among the key discoveries of computer science research. This course presents algorithms for searching, sorting, manipulating graphs and trees, scheduling tasks, finding shortest paths, matching patterns in strings, etcand gives proofs of their correctness and analysis of their runtime and memory demands. General strategies for designing algorithmse.g. recursion, divideandconquer, greediness, dynamic programmingare stressed. Limits on algorithm efficiency are explored through elementary NPcompleteness theory. Prerequisites: Calculus II (Math 22 or Math 32) and Discrete Structures (CSE/Math 261); or close equivalents (in which case, check with instructor). To review your Discrete Structures background, look at the textbook's Appendix sections A.12, B.13, C.1., & D.1. (Note to undergraduate students: this is a required (core) course for several undergraduate degree programs: B.S. in CS (in RCEAS); B.A. in CS (in CAS); and the B.S. in Computer Science & Business (in RCEAS & CBE). (Note to all students: there is a graduatelevel version of this course, CSE/Math 441, which covers more topics and is significantly harder; no student may take both of these two courses for credit.) Course objective: On completing this course, students will be able to design algorithms and apply knowledge of complexity; and, more generally, to apply mathematics to CS problems. They will be sufficiently familiar with the theory, practice, notation, and vocabulary of algorithm design and analysis to be able to locate in the literature (or design from scratch) provably correct andto the extent possibleefficient algorithms to solve a wide range of problems. They will understand how to judge whether or not a new problem is likely to have an efficient algorithm. They will also have a grasp of basic engineering issues arising in the implementation, adaptation, and application of algorithms. Textbook: T. Cormen, C. Leiserson, R. Rivest, & C. Stein, Introduction to Algorithms, 3rd Edition, The MIT Press, Cambridge, Massachusetts, 2009 (ISBN13 9780262033848 hardcover, or 9780262533058 paperback). You do not need to buy the companion Java CDROM. A desk copy may be consulted in the CSE Dept office PL 354 (but cannot be taken away). Another extra copy is available in Dr. Baird's office (PL308), when he's there (but, again, it can't be taken away). We follow the textbook closely. Lectures may discuss only the most important topics in a section of the textbook, but students are expected to study the corresponding section completely. Unless stated otherwise, all material in covered sections is relevant to homework and tests. Lectures: Mondays/Wednesdays/Fridays, 11:10 AM  12:00 noon, in Packard Lab classroom 416. Attendance and Quizes: Attendance at lectures is not required. There may be, however, Pop Quizes, and a missing quiz results in zero points. Homework: There are weekly written homework assignments, due normally on Friday morning, to be handed in as hardcopy at the start of the class. There are no programming assignments. For part of each Friday's class, students are invited to present their solutions on the blackboard, for which they will receive 5 points credit (whether or not their solution is correct); this 'presentation' credit is added to the HW+Quiz score, up to a fixed maximumand so can make up for points lost. Exams: There are twohour inclass exams (Friday February 17 and Friday March 30) and a final threehour exam (Thursday May 3, 811 AM): these are closedbook, written exams. Exams are not repeated: if under extraordinary circumstances a student cannot take an exam, it is assigned the average grade of the other two exams. Grading: 80% Exams (20% 1st hour exam, 20% 2nd hour exam, 40% final exam); 20% Homeworks + Quizzes + Presentations. Instructor: Henry Baird, Prof., CSE Dept, hsb2@lehigh.edu. Office: Packard Lab 380. Office Hours: Wednesdays 12:101:00 PM, or by appointment. Graders: (1) for students with surnames AM: Evans Kosgei ekk211@lehigh.edu Office Hours: Wednesdays 12 PM in this "office": Desk 3 on the 6th floor of Packard Lab. Or, by appointment. (2) for students with surnames NZ: Office Hours: Wednesdays 45 PM in "temporary office" Packard Lab 355. Or, by appointment. Course Site: CSEMATH34000SP12Design & Analysis of Algorithms. We will use the online Course Site system to email announcements & distribute lecture notes, homeworks, grades, etc. Once you enroll in the course, browse coursesite.lehigh.edu, login using your Lehigh id and password, and you should see that you have access to this course. If you can't login, email the instructor immediately. Topics Covered (probable; chapters in textbook): Algorithm Basics: Definitions, Properties (Ch. 1) Algorithm Performance Analysis (Ch. 2) Insertion Sort & MergeSort Growth of Functions (Ch. 3) Divide and Conquer (Ch, 4) Recurrences & their Solution Sorting: Heapsort, Priority Queues (Ch. 6) Quicksort (Ch. 7) Lower Bounds, Sorting in Linear Time (Ch. 8) Data Structures: Stacks, queues, lists, graphs, trees (Ch. 10; review) Dictionaries; Hashing (Ch. 11) DisjointSets Union/Find (Ch. 21) Graph Algorithms: Breadfirst & Depthfirst Search (Ch. 22) Topological Sort Shortest Paths: BellmanFord, Dijkstra (Ch. 24) Greedy Algorithms: Huffman Trees (Ch. 16) Minimum Spanning Trees: Kruskal (Ch. 23) Dynamic Programming: Matrixchain multiplication (Ch. 15) AllPairs Shortest Paths: FloydWarshall (Ch. 25) P, NP, NPcompleteness: The Complexity Classes P & NP (Ch. 34) Polynomialtime Reductions among Problems NPcomplete Problems, P=NP? Approximation Algorithms (Ch. 35) Miscellaneous (as time permits): String Matching: KMP, RabinKarp (Ch. 32) Computational Geometry: Convex Hull (Section 33.3) Polynomials & the Fast Fourier Transform (Ch. 30) If you have any questions, ask the instructor: Henry Baird, hsb2@lehigh.edu. Accommodations for Students with Disabilities: If you have a disability for which you are or may be requesting accommodations, please contact both your instructor and the Office of Academic Support Services, University Center 212 (6107584152) as early as possible in the semester. You must have documentation from the Academic Support Services office before accommodations can be granted.


