Final Exam Topics Topic Text Chapter -------------------- ------------- Algorithmic Pseudo-code........... 2 Rate of Growth of Functions and Asymptotic Notation........... 3 Recurrences....................... 4 The substitution method......... 4.1 The recursion-tree method....... 4.2 The master method............... 4.3 Sorting Algorithms Insertion-sort.................. 2 Merge-sort...................... 2 Heap-sort....................... 6.1-6.4 Quicksort....................... 7 Quicksort and Partition....... 7.1 Quicksort performance......... 7.2 Randomized Quicksort.......... 7.3 Sorting in Linear Time.......... 8 Lower bounds for sorting...... 8.1 Counting sort................. 8.2 Radix sort.................... 8.3 Bucket sort................... 8.4 Dynamic sets Priority Queue Implementations Binary Heaps.................. 6.5 Insert Extract-Min Binomial Heaps................ 19 Binomial Trees Binomial-Link Union Insert Extract-Min Decrease-Key Delete Fibonacci Heaps............... 20 Structure of Fibonacci Heaps Unordered binomial trees The potential function The maximum degree Mergeable-heap operations Insert, Find Minimum, Union Extract-Min, Consolidate Decrease-Key, Delete Bounding the maximum degree Elementary Data Structures...... 10 Stacks and Queues............. 10.1 Linked Lists.................. 10.2 Implementing Pointers & Objs.. 10.3 Representing Rooted Trees..... 10.4 Hash Tables..................... 11 Direct-address tables......... 11.1 Hash Tables................... 11.2 Collision Resolution Chaining Open Addressing........... 11.4 Hash Functions (skip 11.3.3).. 11.3 Binary Search Trees............. 12.1-12.3 Tree-Walk Search Insert Delete Minimum Successor Topic Text Chapter -------------------- ------------- Red-Black Trees................. 13 Red-Black Properties.......... 13.1 Rotations..................... 13.2 Insertion (and Fixup)......... 13.3 Deletion (and Fixup).......... 13.4 B-Trees......................... 18 Search Insert Split-Child Insert-Non-Full Delete Algorithm Analysis Dynamic Programming............. 15.1 Assembly-line scheduling <--- skip this spring 04 Amortized Analysis.............. 17.1-17.3 Aggregate analysis The accounting method The potential method Graphs Implementations................. 22.1 Adjacency List Adjacency Matrix Graph Search Breadth-First................. 22.2 Depth-First................... 22.3 Topological Sort............ 22.4 Minimum Spanning Trees.......... 23 Generic-MST safe edges light edges MST-Kruskal MST-Prim Single-Source Shortest Paths.... 24.1-24.3 Bellman-Ford Algorithm DAG Algorithm Dijkstra's Algorithm All-Pairs Shortest Paths........ 25.1-25.2 Shortest paths and matrix multiplication The Floyd-Warshall Algorithm Number-Theoretic Algorithms....... 31.0 Measure of input size Elementary notions.............. 31.1 Z = integers Z_n = integers mod n Z_n* Euler's phi function Powers of an element............ 31.6 Euler's theorem Fermat's theorem Powers by repeated squaring The RSA Cryptosystem............ 31.7 Public-key Cryptosystems The RSA Cryptosystem Possible Types of Exam Problems: (1) Writing Pseudocode (2) Runtime analysis of algorithms (3) You should be able to trace the algorithms and operations on the data structures that we have discussed. (4) Short answer (5) "Prove that ..." Especially questions from the Exercises and Problems in the Assignments. Materials allowed at exam: Two 4"x6" note cards (or equivalent) The following list contains examples of the kinds of questions listed above. The following is a list of Exercises and Problems from the text. Questions like these will appear on exams (in a slightly altered form). If they fall into one of the categories above, that is noted; the ones that have appeared in class assignments are marked with *'s. Page 13 Exercises: 1.2-2 (4) (but easier to calculate) 1.2-3 (4)* (but easier to calculate) Problems: 1-1 (first column) (4)* Pages 20-21 Exercises: 2.1-1 (3) 2.1-2 (1) 2.1-3 (1,5) Page 27 Exercises: 2.2-3 (2) Pages 36-37 Exercises: 2.3-2 (1)* 2.3-5 (2)* Page 50 Exercises: 3.1-4 (5)* 3.1-5 (5)* Page 57 Exercises: 3.2-3 (5)* 3.2-7 (5)* Pages 57-58 Problems: 3-1 parts a., b., and c. (5)* Page 67 Exercises: 4.1-1 (5) Page 75 Exercises: 4.3-1 (4) 4.3-3 (5) Pages 129-130 Exercises: 6.1-1 (4) 6.1-2 (5)* 6.1-5 (4) 6.1-6 (4) Page 135 Exercises: 6.3-1 (3) 6.3-2 (4) 6.3-3 (5)* (too hard for exam) Pages 136,138 Exercises: 6.4-1 (3) Pages 140-142 Exercises: 6.5-1 (3) 6.5-2 (3) 6.5-3 (1)* (Part 1, Assignment 3) Page 148 Exercises: 7.1-1 (3) Page 153 Exercises: 7.2-1 (5) Pages 167-168 Exercises: 8.1-1 (4) 8.1-2 (5) (in Ex. 3.2-3 above) Pages 167-168 Exercises: 8.3-1 (3) Page 177 Exercises: 8.4-1 (3) Pages 228-229 Exercises: 11.2-2 (3) Pages 244-245 Exercises: 11.4-1 (3) 11.4-2 (1) Page 256 Exercises: 12.1-1 (4) 12.1-2 (4) 12.1-4 (1) 12.1-5 (5) Pages 259-260 Exercises: 12.2-1 (4) 12.2-2 (1) 12.2-3 (1) 12.2-5 (5) Trace BST insertion/deletion (3) Pages 276-277 Exercises: 13.1-2 (3,4) 13.1-5 (5)* 13.1-6 (4)* 13.1-7 (4) Pages 278-279 Exercises: 13.2-1 (1)* (Assignment 4) Page 287 Exercises: 13.3-1 (4) 13.3-2 (3)* 13.3-3 (4) Pages 293-294 Exercises: 13.4-3 (3) (like Assignment 4, last problem) 13.4-5 (4) Pages 330-331 Exercises: <-- won't ask for spring 04, but 15.1.1 is a 15.1-1 (1) good kind of question; ans: like Print-Path p. 538 15.1-2 (5) 15.1-3 (5) (Too hard for an exam) Pages 409-410 Exercises: 17.1-1 (4) 17.1-3 (4) Pages 409-410 Exercises: 17.3-2 (4) Pages 440-441 Exercises: 18.1-1 (4) 18.1-2 (4) 18.1-4 (5) 18.1-5 (4) Pages 447-449 Exercises: 18.2-1 (3) (Trace B-tree insertion/deletion) 18.2-3 (1) Page 452 Exercises: 18.3-1 (3) (Trace B-tree insertion/deletion) 18.3-2 (1)* (Assignment 5, I won't ask it on the final) Page 461 Exercises: 19.1-1 (4) 19.2-1 (4) Pages 471-473 Exercises: 19.2-1 (1)* (merge linked list) 19.2-2 (3) 19.2-3 (3) Pages 488-489 Exercises: 20.2-1 (3) Pages 530-531 Exercises: 22.1-1 (4) 22.1-2 (4) 22.1-5 (1,2) Pages 538-539 Exercises: 22.2-1 (3) 22.2-2 (3) 22.2-3 (2) Pages 547-549 Exercises: 22.3-2 (3) 22.3-3 (3) 22.3-6 (1) Pages 551-552 Exercises: 22.4-1 (3) (won't ask this one) Chapter 23: Be able to trace Prim's and Kruskal's algorithms (3) Pages 591-592 Exercises: 24.1-1 (3) Pages 600-601 Exercises: 24.3-1 (3)* 24.3-3 (4) Pages 634-635 Exercises: 25.2-1 (3)* (like Part II of Assignment 9) 25.2-4 (5) (Useful, but won't ask it) Pages 855-856 Exercises: 31.1-1 (5) (Important, but won't ask it) 31.1-3 (5) (Important, but won't ask it) Pages 880-881 Exercises: 31.6-2 (1) Page 887 Exercises: 31.7-1 (3) (Interesting, but too long for an exam)