Beruflich Dokumente
Kultur Dokumente
Spring 2004
MW 11:00-12:15, SN 014
http://blackboard.unc.edu
Jack Snoeyink TA: SN 333, 962-1969 snoeyink@cs.unc.edu Office Hours: M 12:15-1, Tu 3:30-5pm Instructor: Nathan Fisher SN 037 fishern@cs.unc.edu M 2-3pm, W 2-3:30
Course Overview
Intro to algorithm design, analysis, and applications
Algorithm Analysis Asymptotic Notation, Recurrence Relations, Probability & Combinatorics, Proof Techniques, Inherent Complexity. Data Structures Lists, Heaps, Graphs, Trees, Balanced Trees, Hash Tables. Sorting & Ordering Mergesort, Heapsort, Quicksort, Linear-time Sorts (bucket, counting, radix sort), Selection, Other sorting methods. Algorithmic Design Paradigms Divide and Conquer, Dynamic Programming, Greedy Algorithms, Graph Algorithms, Randomized Algorithms.
Intro - 2 Comp 122,
Primary Focus
Develop thinking ability.
problem solving skills. (algorithm design and application) formal thinking. (proof techniques & analysis)
Intro - 3
Comp 122,
Intro - 4
Comp 122,
Goals
Be very familiar with a collection of core algorithms. Be fluent in algorithm design paradigms: divide & conquer, greedy algorithms, randomization, dynamic programming, approximation methods. Be able to analyze the correctness and runtime performance of a given algorithm. Be familiar with the inherent complexity (lower bounds & intractability) of some problems. Be intimately familiar with basic data structures. Be able to apply techniques in practical problems.
Intro - 5
Comp 122,
y y y y y y y y
Algorithmics: The Spirit of Computing, Harel How to Solve It, Polya. The Design and Analysis of Computer Algorithms, Aho, Hopcroft and Ullman. Algorithms, Sedgewick. Algorithmics: Theory & Practice, Brassard & Bratley. Writing Efficient Programs & Programming Pearls, Bentley. The Science of Programming, by Gries. The Craft of Programming, by Reynolds.
Intro - 6
Comp 122,
Prerequisites
Official:
MATH 81 / OR 41 Discrete Mathematics. COMP 121 Data Structures.
Specifically, Ill assume that you know, or can recall with a quick review, these chapters of CLRS:
Section 3.2: growth of functions Chapter 10: elementary data structures Section 11.1-11.2: list search
Desirable:
Elementary Probability We will introduce the basics of counting with probabilities, found in appendix C.
Intro - 7
Comp 122,
Course Roadmap
Algorithmics Basics (2) Divide and Conquer (3) Randomized Algorithms (3) Sorting and Selection (6) Search Trees (3) Graph Algorithms (4.5) Greedy Algorithms (4) Dynamic Programming (2) Special Topics (1)
Intro - 8
Comp 122,
Divide-and-Conquer (3)
Designing Algorithms. (Chapter 2.3) Recurrences. (Chapter 4) Quicksort. (Chapter 7)
Goals
Know when the divide-and-conquer paradigm is an appropriate one. Know the general structure of such algorithms. Express their complexity using recurrence relations. Determine the complexity using techniques for solving recurrences. Memorize the common-case solutions for recurrence relations.
Intro - 10 Comp 122,
Understand the difference between average-case and worst-case runtime, esp. in sorting and hashing.
Intro - 11
Comp 122,
Intro - 14
Comp 122,
Intro - 15
Comp 122,
Intro - 16
Comp 122,
Goals See how core algorithms can be put to use in realworld applications.
Intro - 17
Comp 122,
Intro - 18
Comp 122,
Homework Assignments
Homework due on Weds (which ends at midnight). Handin-problems due at Nathans office, sn057. Quiz problems are not turned in, but may be quizzed on in the last 10 minutes of Weds class. Homework submitted after grading begins will not be accepted. Lowest score will be dropped Can discuss in groups, but each student must turn in his or her own written solution. Please, be neat, clear, precise, formal.
Grading on correctness, simplicity, elegance & clarity.
Intro - 19 Comp 122,
Communication
Visit instructor during office hours, by appointment, or email correspondence.
Include COMP122 in subject of email for easy identification.
Schedule, lecture notes, assignments, and gradebook are on UNCs blackboard site; log in with your onyen. http://blackboard.unc.edu
direct link
Intro - 20 Comp 122,
Basic Courtesy
Contribute to, but dont distract from class lectures and discussions. If you must arrive late or leave early, please take an aisle seat quietly. Write your assignments neatly, legibly, & formally. Use a stapler if you have several pages.
THANK YOU!!!
Intro - 21 Comp 122,
Intro - 22
Comp 122,
Chapters 1, 2, and 3
Appendix A (Textbook: CLRS)
Intro - 23
Comp 122,