**Time:**Section 1: MWF 10:30-11:35, Section 2: MWF 1:00 - 2:05

**Location:**CSI G12

**Professor:**David Galles

**Office:**HR 542

**Office Hours**: TR 10:00 - 12:00, W 2-3 or by appointment

Though these are my stated office hours, I am in my office most of the day.

If my door is open (and it usually is), I am happy to talk with students.

**Phone:**422-5951

**Email:**galles@usfca.edu

**Text**:

Required: Cormen, Leiserson, Rivest, Stein *Introduction
to Algorithms, 3rd Edition*

**Prerequisite:**

CS 245 - Data Structures and Algorithms or
Equivalent

**Grading Policy**

Grades will be given according to scores on
written homework assignments, midterms and finals, according to the
following percentages.

Assignment | Percentage | Date |

Homework | 40% | Approx. Weekly |

Midterm 1 | 15% | 10/04/2013 |

Midterm 2 | 15% | 11/18/2013 |

Final | 30% | TBA |

Grades will be on a straight scale, with *approximately*:

A | 90% and above |

B | 80%-89% |

C | 70%-79% |

D | 60%-69% |

F | 59% and below |

These are percentages are upper limits -- thus a score of 90 is guaranteed to get at least an A-, 80 is guaranteed to get at least a B-, and so on.

**Finals and Midterms**

Both midterms and the final will be partially open
note. You will be allowed to use your notes *for this class*,
solutions to previous homework assignments, and the text for this
course -- but you will **not** be allowed to use other texts or other
resources.

**Academic Honesty**

You are not allowed to search the web for
solutions to the homework assignments. You are not allowed to use
any solutions to previous version of this class in completing your
homework assignments -- if you have any old solutions, throw
them out now! While it is acceptable to discuss the
homework problems with other students, you should not tell another
student the solution to a problem, and you should write up the
solutions to your homework problems on your own. You should never
look at the solutions of other students, or allow them to use your
solutions.

**Late Policy**

Late homeworks WILL NOT BE ACCEPTED. If you
have difficulty with an assignment, or some type of time conflict, the
correct time to see me is *before* it is due. Trying to get
an extension on the due date itself will lead to sympathy from the
instructor, but no extension.

**Learning Objectives**

Upon sucssesful completion of this course, you
should be able analyze the running time and space requirements for
complex algorithms, both recursive and iterative. You will
understand a variety of fundamental computer science algorithms, and
be able to modify them to solve related problems. Most
importantly, you will improve your "algorithmic thinking" skills,
and be better able to create novel algorithms for new problems.

*Tentative* Course Outline

The following is subject to change, given the interests/knowledge of the students

Introductions

Algorithm Basics

Mathematical Foundations

O(), Ω(), o(), ω() Θ()

Recurrence Relations

Proof Techniques

Randomized Algorithms

Sorting & Selection

Heapsort, Quicksort, Randomized Quicksort, Mergesort

Selection Problem

O(n lg n) Quicksort (worst case)

sub-O(n lg n) sorting

counting sorts, radix sort, bucket sort

Modifying Data Structures

Read/Black Trees & Interval Trees

Leftest Heaps

Fibonacci Heaps

Dynamic Programming

Relation to Divide and Conquer

Fibonacci Numbers

Matrix Chain Multiplication

Longest Common Subsequence

Polygon Triangulation

Greedy Algorithms

Scheduling

Huffman Codes

Proving Correctness

Matroids

Amortized Analysis

Basic Concepts

Aggregate method

Accounting method

Potential Method

Graph Algorithms

Graph representations

BFS / DFS

Spanning Trees

Shortest Path

Maximum Flow

Other Topics (Time permitting)

String Matching

RSA & Encription

Computational Geometry

Approximation Algorithms