CS 1501 Syllabus for Summer 2008 (208-7)

Information without a CLASS # is tentative and may be significantly altered. Reexamine this page frequently, as additional references, Web links, examples and other information may be added throughout the term. Please also see the Algorithm Animations page (thanks to Jonathan Beaver), which demonstrates many of the algorithms covered throughout the course.

CLASS #

DATE

REFERENCES

TOPICS/OTHER INFO

1

May 13

Sedgewick Chapter 6, 7

Intro to the course and course information sheet, converting algorithms to programs, comparing algorithm implementations, algorithm analysis

2

May 15

Sedgewick Chapter 44

Intro to Exhaustive Search, pruning, recursion and backtracking -- 8 Queens Example

3

May 20

Sedgewick Chapter 14, 17 

Review of simple searching methods; intro. to digital search trees; radix search tries, multiway radix search tries; Patricia trees

4

May 22

 

Sedgewick Chapter 16

De la Briandais (DLB) trees – idea, examples and detailed implementation; comparison to regular multiway radix search tries

Intro. to hashing; collisions; avoiding collisions and the Pigeonhole Principle; basic collision resolution schemes (open addressing, closed addressing)

5

May 27

Sedgewick Chapter 36

Reducing collisions with a good hash function; Horner's method to hash strings

Linear probing idea; clustering and its effects; double-hashing (improvement over linear probing, implementation issues); problems with delete when using open addressing;

6

May 29

 

Sedgewick Chapter 19

Closed addressing using separate chaining
Hashing Handout

Intro to String Matching; Brute force algorithm; KMP algorithm; Rabin Karp algorithm

7

June 3

 

Sedgewick Chapter 22

Boyer-Moore mismatched character heuristic; comparison of Boyer-Moore and other string matching
String Matching Handout

Intro. to Compression, Lossy vs. Lossless compression

8

June 5

 

Huffman Compression: idea, block codes vs. variable length codes (and the prefix property), entropy and compressibility, building the Huffman tree, correctness (satisfies prefix property), quality, encryption and decryption

 

9

June 10

lzw.txt
lzw2.txt
lzw3.txt

LZW Compression – encryption, decryption
LZW implementation issues: Dictionary implementation, bits for codewords, action when out of codewords, I/O of byte fragments
Comparison of compression schemes

http://marknelson.us/1989/10/01/lzw-data-compression/  -- Info on LZW (including link to source code)
http://en.wikipedia.org/wiki/Information_entropy -- Wikipedia article on information entropy
http://www.cs.sfu.ca/cs/CC/365/li/squeeze/ -- General info on lossless compression

 

10

June 12

compare.txt

Finish LZW and lossless compression
Limits of compression and information entropy

Start Integer Multiplication – Gradeschool algorithm

MIDTERM EXAM MATERIAL ABOVE THIS LINE

11

June 17

karat.txt

 

Power.java

Integer multiplication:  Simple divide and conquer algorithm; recursive algorithm analysis; Karatsuba integer multiplication

Exponentiation (simple and divide and conquer); linear in the value of a number vs. linear in the number of bits)

12

June 19

 

MIDTERM EXAM

13

June 24

gcd.txt

gcd (simple and Euclid's algorithm); extended gcd (general idea only)

Intro to Encryption, simple encryption algorithms (Caesar cipher, substitution cipher), better block encryption algorithms (Vigenere cipher, Vernam cipher)
http://en.wikipedia.org/wiki/Vigen%C3%A8re_cipher
http://www.pro-technix.com/information/crypto/pages/vernam_base.html

Public Key encryption: Need for, basic idea of, RSA as the most common example, RSA key generation http://www.cs.pitt.edu/~kirk/cs1501/notes/rsademo/index.html, RSA use and its runtime.
http://en.wikipedia.org/wiki/RSA

14

June 26

 

Finish RSA (uses – digital envelope and digital signature; verification of keys)
http://www.rsasecurity.com/rsalabs/node.asp?id=2152
http://www.youdzone.com/signature.html

15

July 1

Sedgewick Chapter 29, 30

graphs1.txt

Intro to Graphs, graph definitions, limits on number of edges, graph representations (adjacency matrix vs. adjacency list), Depth-First Search and Breadth First Search in detail
 DFS and BFS

16

July 3

 

Sedgewick Chapter 31

Biconnectivity and Articulation Points
Articulation Points

Weighted graphs, Minimum Spanning Trees, Priority First Search (PFS) , Implementation of Prim's MST algorithm – naďve implementation

17

July 8

 

Prim’s MST algorithm: better implementation using PFS – details of PFS implementation; difference in alg. for adjacency list and adjacency matrix; Dijkstra’s shortest path and how PFS differs for it

PFS.cpp

18

July 10

Sedgewick Chapter 11

Sedgewick Chapter 33

Priority Queues – simple implementation; Heap implementation; Implementing a heap using an array; adding indirection to allow for update() function
pq.h pqtest.cpp pqtest.out

Network Flow:  Introduction and definitions; Ford-Fulkerson approach using augmenting paths

19

July 15

 

 

Sedgewick Chapter 45

Network Flow implementation details; augmenting paths with "backward flow"; Edmonds-Karp approach of BFS or PFS to find an augmenting path
Flow.java flowtest1.txt flowtest2.txt flowtest3.txt

Unsolvable problems, intractable problems, P, NP and NP-completeness

20

July 17

 

Finish NP-completeness discussion;  Local Search Heuristics for NP-complete problems; Ex: 2-OPT for TSP problem
twoopt.c

21

July 22

 

Sedgewick Chapter 42

Finish 2-OPT discussion

Idea of dynamic programming; Fibonacci Example
fibo.java
Dynamic programming for pseudo-polynomial solutions of NP-Complete problems: subset sum example
subset.java

22

July 24

 

Knapsack problem, its branch and bound solution and its dynamic programming solution
Knap.java

23

July 29

 

Edit distance problem and its dynamic programming solution
http://www.merriampark.com/ld.htm

24

July 31

 

EXAM TWO