1 CPSC 320: Intermediate Algorithm Design and Analysis July 9, 2014
2 Course Outline Introduction and basic concepts Asymptotic notation Greedy algorithms Graph theory Amortized analysis Recursion Divide-and-conquer algorithms Randomized algorithms Dynamic programming algorithms NP-completeness
3
4 Huffman’s Algorithm
5 Huffman’s algorithm
6 Time Complexity and Correctness
7 Graph Theory
8 Graphs
9 Graph definitions
10 Data Structure Adjacency list Each node contains a list of pointers to its edges Each edge contains references to its endpoints Adjacency matrix A matrix contains one row and one column for each node Each entry contains a reference to the corresponding edge, or null Comparison: Adjacency ListAdjacency Matrix Check if nodes are adjacent Space usage
11 Dijkstra’s Algorithm
12 Shortest path in Graphs
13 Dijkstra’s Algorithm
14 Dijkstra’s Algorithm
15 Time Complexity
16 Correctness Proof by induction on set of visited nodes Discussion