BYU Computer Science Department

CS 312, Section 001
Algorithm Analysis
Spring 2007


InstructorBrian Price

Class Pagehttp://rivit.cs.byu.edu/~bprice/CS312


Schedule

Last updated: 2007 April 17

Topics, readings, and homework assignments will be fine-tuned as we progress through the semester.  Hyperlinks will be added.  Check this web page frequently.

Optional readings are enclosed in (parentheses).

Note: Keys to homework assignments are available on Blackboard.

Date

Lecture

Topics

Reading
(Read before class)

Homework, Projects
(out)

Deadlines
(homework due at start of class; projects and improvements due at 5pm)

Week 1

5/2

1

Course objectives;
What is an algorithm?;
Algorithm efficiency;
The Three Questions; Asymptotic notation

Asymptotic notation: Duality, Limit rule;
First Foray in Analysis: Algorithms for Arithmetic

Sections 0, 1.1

Install Visual Studio 2005

HW #1: 0.1 (a-e, g, m), 0.3 (a,b)

---

5/4

2

Asymptotic notation: Max rule;
Modular arithmetic, including Modular exponentiation

Primality testing

Luther's slides

Sections 1.2, 1.3

HW #2: 1.25 (replace 125 with 126 for the exponent), Simple Fermat primality tester for small numbers

HW #1

Week 2

5/7

3

Public Key Cryptography: RSA

Divide & Conquer Multiplication;
Master Theorem;
Examples: Convex Hull, Binary Search

Sections 1.4, 2.1 and 2.2

Project #1: Divide & Conquer - Convex Hull

distro

HW #2

HW #3: 1.27, 2.1, 2.5(a-f)
Use the Master Theorem.

5/9

4

Intro. to Recurrence relations;
Solving homogeneous RRs

Non-homogeneous recurrence relations

Recurrence Relations Notes, Part I

Recurrence Relations Notes, Part II

HW #4: Part I Exercises (Section 1.3), Part II Exercises (Section 2.3)

HW #3

5/11

5

Recurrence relations: change of variable

Analysis of mergesort, quicksort

Recurrence Relations Notes, Parts III & IV

Section 2.3

HW #5: Part III Exercises (Section 3.2) #1-2, Problem 2.4 in book (using Master Theorem where possible)

HW #4

Week 3

5/14

6

Selection, Median;
Matrix multiplication

Fast Fourier Transform (FFT)

Sections 2.4, 2.5, 2.6

HW #6: Cancelled

Project #1

HW #5

5/16

7

Graph algorithms: Formulating problems as graphs;
Depth-first Search and Connected Components

Directed Graphs, Strongly Connected Components

Chapter 3

Project #2: Graph Algorithms - Separating Vertices

distro

Improvement #1

Read the Project #2 Guidelines and understand problem #3.31

HW #7: 3.4 (graph ii only), 3.15

HW #6

5/18

8

Worked example of algorithm for finding strongly connected components

Breadth-first search; Shortest Paths; Dijkstra's algorithm

Sections 3.4, 4.1-4.5

Work through Problem 3.31 for Project #2

HW #8: 4.1

HW #7

Week 4

5/21

9

Dijkstra's algorithm; Efficiency with various Priority Queue implementations;
Two special cases

Greedy algorithms:
Coins;
Minimum spanning trees,
Kruskal's algorithm;
Representing disjoint sets

Sections 4.6-4.7, 5.1

HW #9: Cancelled

HW #8

5/23

10

Prim's algorithm for MST;
Huffman Encoding

Review: Mid-Term Exam

Sections 5.2

List of Topics to Study

Project #3: Intelligent Scissors

distro

Project #2

HW #10: Cancelled HW #9

 5/24

Mid-Term Exam in Testing Center

5/25

5/25

11

Dynamic Programming;
Binomial Coefficients;
Coins;
Extracting solutions

(Divisible) Knapsack

Sections 5.3, 5.4, 6.1, 6.2

HW #11: link

Improvement #2

Week 5

5/28

-

Holiday: Memorial Day

5/30

12

Optimality in DP;
Edit Distance;
Gene Sequence Alignment

0/1-Knapsack

Sections 6.3, 6.4

HW #12: find optimal alignment by hand of ATGCC and TACGCA, and this

---

6/1

13

Chain Matrix Multiplication;
Recursion and Memory functions (Memoization)

Follow-up: Mid-Term Exam

Section 6.5

Project #4: Gene Sequence Alignment

distro Project #3
HW #11

Week 6

6/4

14

All-Pairs Shortest Paths

Linear Programming; Standard Form

Section 6.6;
(Section 6.7)

Section 7.1

HW #13: 7.1, 7.2 Improvement #3
HW #12

6/6

15

Flows in Networks

Flows in Networks (cont.)

Section 7.2-7.4

HW #14: 7.10 HW #13

6/8

16

Simplex Algorithm

Review: Tractability, P, NP, and NP-Complete

Section 7.6;
Linear Programming Notes (Important for the Project)

Section 8.2: pp. 243-247 

(Light) Project #5: Linear programming

Project #4
HW #14

Week 7

6/11

17

Back-tracking search: Graph coloring, 8 Queens;
Feasibility functions

Guided search;
Bound functions;
Branch and Bound search for Job Assignment

Sections 9.1-9.2 Project #6: Solving the TSP with Branch & Bound distro Improvement #4
HW #15: 9.2 (use 0-1 Knapsack instead of Rudrata Path)

6/13

18

Solving the TSP with Branch and Bound

Solving the TSP with Branch and Bound (cont.)

B&B for TSP Notes

HW #16: here

and this too

Project #5

HW #15

6/15

19

A* Search and Admissible Heuristics;
and relation to B&B

Randomized Algorithms;
Monte Carlo Algorithms; Amplification of stochastic advantage

Russell & Norvig 4.1-4.2

"Virtual Chapter" (beginning with the gray box on p. 29)

See last slide in the lecture notes; not to be turned in; good practice for final exam.

HW #16

Week 8

6/18

20

Numerical Probabilistic Algorithms;
Las Vegas Algorithms

Review: Final Exam

List of study topics

---

Project #6

Last day of classes

No late work accepted after this date

 6/19

-

Reading days

 6/20
Wednesday

-

Final Exam: 1:00pm-2:50pm in Classroom