BYU Computer Science Department

CS 312, Sections 001 & 002
Algorithm Analysis
Winter 2008


InstructorEric Ringger

Class Pagehttp://faculty.cs.byu.edu/~ringger/CS312/


Schedule

Last updated: 2008 April 11

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 each homework assignment will be made available on Blackboard on or after the assignment's due date.

Date

Lecture

Topics

Reading
(Read before class)

Projects
(dates of availability)

Deadlines
(Homework due in class at start of class;
Project and improvement reports due by 5pm)

Week 1

1/7

1

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

---

 

---

1/9

2

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

Chapter 0; Sections 1.1 and 1.2

(Light) Project #1: Simple Fermat Primality Tester (for small integers)

Install Visual Studio (see directions in the course Syllabus)

1/10

-

Help Session: Project #1
Also: Intro. to Visual Studio & C#
[3pm in 1066 TMCB]

Project #1 Guidelines;
Intro. to C# on MSDN

 

---

1/11

3

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

Section 1.3

 

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

Week 2

1/14

4

Primality testing; Greatest Common Divisor

Section 1.4

 

HW #2: 1.25 in the textbook, then redo 1.25 using 126 for the exponent

1/16

5

Public Key Cryptography: RSA

Section 1.4

 

HW #3: 1.9, 1.18, 1.20 in the textbook

Early #1

1/18

6

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

Sections 2.1 and 2.2

Project #2: Divide & Conquer - Convex Hull

distro Project #1

Week 3

1/21

-

Holiday: Martin Luther King, Jr. Day

1/22

-

Help Session: Project #2
[3pm in 1066 TMCB]

Project #2 Guidelines

 

---

1/23

7

Intro. to Recurrence Relations;
Solving homogeneous RRs

Recurrence Relations Notes, Part I


HW #4: 1.27, 2.1, 2.5(a-e) in the textbook; for 2.5 (a-e), only find bounds using the Master Theorem

1/25

8

Non-homogeneous recurrence relations (with geometric forcing function)

Recurrence Relations Notes, Part II


HW #5: Part I (Section 1.2) Exercises in the RR Notes

1/25

-

Help Session: Project #2
[3pm in 1066 TMCB]

Project #2 Guidelines

 

---

Week 4

1/28

9

Recurrence relations: change of variable

Recurrence Relations Notes, Parts III & IV


HW #6: Part II (Section 2.3) Exercises in the RR Notes
Early #2

1/30

10

Theoretical and empirical analysis of mergesort and quicksort

Section 2.3

 

Project #2

2/1

11

Selection, Median;
Matrix multiplication with Strassen's algorithm

Sections 2.4 and 2.5

 

HW #7: Part III (Section 3.2) Exercises 1 and 2 in the RR Notes;
+ Analyze 3-part Mergesort using Recurrence Relations solution techniques;
+ 2.4 in the text book (using the Master Theorem where possible)

Week 5

2/4

12

Fast Fourier Transform (FFT)

Section 2.6

Project #3: Graph Algorithms - Separating Vertices, Bridges, and Biconnected Components

distro

Improvement #2

2/5

-

Help Session: Project #3
[3pm in 1066 TMCB]

Project #3 Guidelines

---

---

2/6

13

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

Chapter 3.1-3.2

  HW #8: 2.11 in the textbook

2/8

14

Directed Graphs, Linearization, Connectedness

Section 3.3

 

Keep working on HW #9 -- get a head start!
Here are some hints to keep you moving in the right direction.

Week 6

2/11

15

Strongly connected components

Section 3.4

 

HW #9: 3.31in the textbook; this is critical for Proj. #3

2/12

-

Help Session: Project #3
[3pm in 1066 TMCB]

Project #3 Guidelines

---

---

2/13

16

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

Sections 4.1-4.5

 

HW #10: 3.4 (graph ii only), 3.10, 3.15 in the textbook

2/13
-
Engineering and Technology Career Fair
[10am-3pm; Wilkinson Center ballroom]

2/15

17

Dijkstra's algorithm; Efficiency with various Priority Queue implementations;
Special cases for Shortest Paths;
Bellman-Ford algorithm

Sections 4.6-4.7

 

HW #11: 4.1in the textbook

Early #3

Week 7

2/18

-

Holiday: President's Day

2/19
Monday Instruction

18

Greedy algorithms:
Coins;
Minimal spanning trees,
Kruskal's algorithm

Section 5.1

 

Project #3

2/20

19

Representing disjoint sets;
Analysis of Kruskal's;
Prim's algorithm for MST

Section 5.1

 

---

2/22

20

(Divisible) Knapsack;
Huffman Encoding

Section 5.2; (Sections 5.3-5.4)

Project #4: Intelligent Scissors

distro

Improvement #3

Week 8

2/25

21

Dynamic Programming;
Binomial Coefficients;
Coins;
Extracting solutions

Sections 6.1-6.2

 

HW #12: described in separate document

2/26

-

Help Session: Project #4
[3pm in 1066 TMCB]

Project #4 Guidelines

---

---

2/27

-

Review: Mid-Term Exam

Study List of Topics for Mid-Term Exam

  ---

2/28

Mid-Term Exam in Testing Center

2/29

3/1

Week 9

3/3

22

Optimality in DP;
Edit Distance;
Gene Sequence Alignment

Section 6.3

 

HW #13: described in separate document

Early #4

3/5

23

0/1-Knapsack

Section 6.4

 

Project #4

3/7

-

Follow-up: Mid-Term Exam

---

  HW #14: described in separate document

Week 10

3/10

24

Chain Matrix Multiplication;
Extra: Recursion and Memory functions (Memoization)

Section 6.5

Project #5: Gene Sequence Alignment

distro Improvement #4

3/11

-

Help Session: Project #5
[3pm in 1066 TMCB]

Project #5 Guidelines

---

---

3/12

25

All-Pairs Shortest Paths; Floyd's Algorithm

Section 6.6; (Section 6.7)

 

HW #15: described in separate document

3/14
Happy p Day!

26

Linear Programming; Standard Form

Section 7.1

 

HW #16: described in separate document

3/15

-

College of Physical and Mathematical Sciences
Spring Research Conference

[8am in 1104 JKB]

Week 11

3/17

27

Flows in Networks

Section 7.2

  HW #17: 7.1, 7.2 in the textbook
Early #5

3/19

28

Flows in Networks (cont.); Examples; Bipartite Graphite Matching

Sections 7.3-7.4

 

Project #5

3/21

29

Simplex Algorithm

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

  HW #18: 7.10 in the textbook

Week 12

3/24

30

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

Section 8.2: pp. 243-247 

(Light) Project #6: Linear Programming

Improvement #5

3/25

-

Help Session: Project #6
[3pm in 1066 TMCB]

Project #6 Guidelines

---

---

3/26

31

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

Sections 9.1-9.2

 

Keep working on Project #6 -- finish early!

3/28

32

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

Section 9.1.2  

HW #19: described in separate document

Early #6

Week 13

3/31

33

Solving the TSP with Branch and Bound

Branch &Bound for TSP Notes
(Useful for the Project)

Project #7: Solving the TSP with Branch & Bound distro Project #6

4/2

34

Solving the TSP with Branch and Bound (continued);
Include-Exclude State Space
Extra slides with hints on implementing Include-Exclude State Space

 

HW #20: described in separate document

4/3

-

(Rescheduled) Help Session: Project #7
[3pm in 1066 TMCB]

Project #7 Guidelines

---

---

4/4

35

Best-first Search;
A* Search and Admissible Heuristics
and relation to Branch & Bound

Russell & Norvig 4.1-4.2 [available under Course Materials on BlackBoard]

 

HW #21: described in separate document

Week 14

4/7

36

Randomized Algorithms;
Monte Carlo Algorithms;
Amplification of Stochastic Advantage

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

 

Early #7

4/9

37

Amplification of Stochastic Advantage (cont.)

---   ---

4/11

38

Numerical Probabilistic Algorithms;
Las Vegas Algorithms

---

 

HW #22: described in separate document

Week 15

4/14

-

Last day of CS 312
Review: Final Exam

Study List of Topics for Final Exam

 

Project #7
(No Improvement #7)

4/15

-

Last day of Winter Instruction  (no CS 312)

  No late project reports accepted after this date

4/16

-

Reading days

4/17

4/18
Friday

-

Final Exam for Section 002: 11:00am-2:00pm in Classroom

4/19
Saturday

-

Final Exam for Section 001: 2:30pm-5:30pm in Classroom