CS 371: Design and Analysis of Algorithms

Class times: 11:00-11:50am MWF
Professor: Richard Liston
Office: Pfahler 101G
Phone: 610-409-3000 x2497
Email Address: rliston at ursinus dot edu
Office Hours:
  • Tue, 10-12
  • Tue, 2-4
  • Wed, 2-4
  • other hours by appointment
Prerequisites: MATH 111, CS 174, MATH 236W
Text (required): Introduction to Algorithms, 2nd Edition
by Cormen, Leiserson, Rivest and Stein

Course Objectives

The course catalog description of CS 371 is as follows:
Complexity of algorithms, searching and sorting algorithms, tables, hashing, recursion, tree and graph algorithms.

Algorithms are at the heart of Computer Science. In this course we will learn about elegant ways to accomplish important computer programming tasks. We will learn that there are fundamental limits on our ability to perform certain tasks. We will acquire the tools necessary to evaluate the performance of different algorithms. We will also continue honing our programming skills by implementing many of the algorithms we will be studying. The programs we write will demonstrate the power of the algorithms we study.


Attendance Policy

On-time attendance is required at all class meetings. Class participation ensures that all class members are absorbing the material, so it makes up a portion of your grade.

Grading

Class participation and attendance 10%
Two in-class exams (20% each) 40%
Homeworks and projects 30%
Final exam 20%

Each item will be worth 100 points, with the final grade weighted as indicated above. The final grade will be out of 100 points, with the letter grades assigned as A=90-100, B=80-89, C=70-79, D=60-69, F=below 60. A plus (+) or minus (-) may be added to the grade for work that is at the top or bottom of the range. The professor reserves the right to raise the final grade of students who have demonstrated earnest attempts at achieving the objectives of the course. The following table outlines the grading criteria for work done in this course:

A Concepts are clearly understood and can be applied in new and creative ways.
Solutions to advanced problems are consistently found.
Solutions are elegant, rather than "brute force".
Solutions are clear, concise and complete.
Programs run correctly on all inputs.
Code is well-commented and easy to read (well-formatted).
B Concepts are clearly understood and applied correctly on standard problems.
Solutions are sometimes elegant.
Solutions are clear, concise and complete.
Programs run correctly on all inputs.
Code is well-commented and easy to read (well-formatted).
Better program solutions may exist.
C Concepts are fairly well understood and generally applied correctly on standard problems.
Solutions tend to be awkward.
Solutions are sometimes missing some steps.
Solutions require some deciphering.
Programs run correctly on most inputs.
Code is commented but requires some deciphering.
D Student is making an effort, but concepts are generally not well understood and applied incorrectly.
Solutions are missing key steps or insights.
Programs are largely incorrect.
Comments and formatting are difficult to understand.
F Programs do not build correctly.
Little effort is being applied.
Student is missing classes or not turning in assignments.

Partial Credit: you should always work for finding complete, correct solutions to the problems. However, partial credit may be given for partial solutions where you are on the right track as long as the omissions or difficulties are stated explicitly.
Office Hours: Please make use of the office hours for any reason at all throughout the course.
Late Assigments: Projects, homeworks and labs that are not turned in on time may be turned in up to 24 hours after the due date for a maximum of 1/2 credit. To be fair to students who have met the deadline, the posted due date and the 24 hour grace period are firm. This policy is solely intended to accomodate extreme circumstances. Handing in late assignments delays returning the graded material to the rest of the class. It is highly recommended that you turn in all assignments on time.


Coding Style

Any reasonably competent software development environment uses a standard coding style. In my courses we adopt a coding standard, "C/C++ Coding Standard", that you are expected to follow. In this course I will not be explicitly checking your code against each point of this Coding Standard, but points will be deducted for code that substantially deviates from these guidelines.


Academic Integrity

You will turn in all your homeworks and code individually, and everything you turn in must be your own work. All code turned in must be commented with your name, the date, the course number and name, and a short description of the file. When you sign the code you are saying that you wrote it all and that you can answer detailed questions about every line. Do not try to disguise the fact that you are turning in someone else's code. It is better to turn in a non-working project than to risk dismissal. Refer to the handout, "Academic Integrity in Computer Science at Ursinus College" for more information, and ask me if you have any questions. Any suspicion of violation of the Academic Integrity Policy will be referred to the Dean.


Inclement Weather Policy

If it becomes necessary to cancel class due to inclement weather I will make every attempt to send an email to all class members, so please check your email if there is any question. If you are commuting to campus, please provide me with your telephone number so I can call to let you know if class is cancelled due to inclement weather.

CS 371 Schedule, Fall 2008

(Schedule subject to change)
Week Beginning Lecture Topics Reading Notes
Aug 25 Administrivia and Course Intro
Introduction to Algorithms
Pseudocode
Sorting
Insertion Sort
Merge Sort
Course Syllabus
Chapter 1
Chapter 2, Section 1
Dual Booting
Sep 1 Algorithm Analysis
Algorithm Design
Growth of Functions
Notation
Chapter 2, Sections 2,3
Chapter 3
 
Sep 8 Recurrences
Substitution
Recursion-Tree
Master Method
Chapter 4, Sections 1-3  
Sep 15 Sorting Algorithms
Heapsort
Priority Queues
Quicksort
Chapter 6
Chapter 7, Sections 1,2,4
 
Sep 22 Linear Time Sorting
Counting Sort
Radix Sort
Bucket Sort
Chapter 8  
Sep 29 Medians and Order Statistics
Minimum and Maximum
Selection
Chapter 9, Sections 1,3  
Oct 6 Stacks, Queues and Linked Lists
Hash Tables
Binary Search Trees
Red-Black Trees
Chapters 10-13  
Oct 13 Dynamic Programming
Assembly-line Scheduling
Chapter 15 No Class Oct 13-14: Fall Holiday
Oct 20 Matrix-chain Multiplication
Longest Common Subsequence
Optimal BSTs
Chapter 15 (cont.)  
Oct 27 Greedy Algorithms
Activity-selection
Huffman Codes
Chapter 16  
Nov 3 Graph Algorithms
Breadth-first Search
Depth-first Search
Topological Sort
Strongly Connected Components
Chapter 22  
Nov 10 Minimum Spanning Trees
Kruskal's Algorithm
Prim's Algorithm
Chapter 23  
Nov 17 Single-source Shortest Paths
Bellman-Ford Algorithm
Chapter 24, Sections 1-3  
Nov 24 Dijkstra's Algorithm Chapter 24, Section 5 Nov 26-28: NO CLASS (Thanksgiving recess)
Dec 1 String Matching
Robin-Karp Algorithm
Finite Automata
Final Exam Review
Chapter 32, Sections 1-3 Dec 5: Last day of classes;
Last day to drop a course
  FINAL EXAM   FINAL EXAM:
Mon Dec 8, 1-4pm

Richard Liston