## CS231: Introduction to the Design and Analysis of Algorithms

#### Fall 2004: Mon, Wed 2:30 - 3:55 in Searles 223

This course is an introductory undergraduate course on the design and analysis of algorithms building on the concepts from CS210 (Data Structures). It introduces a number of basic algorithms for a variety of problems such as searching, sorting, selection and graph problems like spanning trees and shortest paths. It discusses analysis techniques, such as recurrences and amortization, as well as algorithm design paradigms such as divide-and-conquer, dynamic programming, and greedy algorithms.

Prerequisites: CS210 and either Math189 or CS200 (or permission of the instructor)

Instructor: Laura Toma
Office: 219 Searles Hall
Email: ltoma AT bowdoin.edu (replace AT with @)

Office hours: M,W after class 4-6pm. I will normally be in the office the evening before homework is due, but do not take it for granted and do not rely on it! Also, you can drop by for a quick question any time I am in the office (and in a good mood). Or, just send me an email to setup a (different) time.

Class Email: csci231 AT bowdoin.edu (replace AT with @)

Class webpage: http://www.bowdoin.edu/~ltoma/teaching/cs231/fall04/

Main Topics:

• Mathematical foundation (growth of functions, summations, recurrences)
• Sorting algorithms (insertion sort, mergesort, quicksort, heapsort, bucket sort, radix sort)
• Searching and data structures (binary search trees, red-black trees, augmented search trees, skip lists)
• Priority queues (heap)
• Amortized Analysis (splay trees)
• Paradigms (divide-and-conquer, greedy, dynamic programming)
• Graph Algorithms (traversal, minimum spanning tree, shortest paths)
• NP-Completeness (basics)

Course material:

• Cormen, Leiserson, Rivest and Stein, Introduction to Algorithms, 2nd Edition, McGraw Hill, New York, 1990. (bugs).
• Handouts

Other good reference books include:

• D. Kozen, The Design and Analysis of Algorithms, Springer Verlag,1991.
• A. Aho, J. Hopcroft, and J. Ullman, Design and Analysis of Algorithms,Addison Wesley 1974.
• G. Brassard and P. Bratley, Algorithmic - Theory and Practice, Prentice Hall, 1988.
• R. Tarjan, Data Structures and Network Algorithms, SIAM Publications,1983.

• Homework assignments (approx. 30%).
• Two in-class exams (20% each) and a final exam (30%).
• Class participation (tiebreaker).

Assignments

Homework assignments will be made available online as the semester progresses. Since solutions are handed out the day the homework is due, no credit is given for homework problem solutions received late. For special situations contact Laura (in advance).
Homework policy:

• Write your name on each sheet.
• Write the solutions in the space provided.
• Collaboration is allowed, even encouraged, provided that it helps you study better. Remember that exams are individual! The names of the collaborators should be listed along with the solutions and solutions must be written up individually.
• Homework should be submitted at the beginning of class on the due date.
• You are encouraged to type the solutions!