CS 3511 Additional Final Exam Review Exercises Fall Semester, 2006 Here are some exercises similar to ones that might be on the final exam in addition to the lists of exercises for the previous two exams. The items in parentheses are the corresponding items in the 6th edition of the text (since I think everyone is using the 5th edition). Note that * exercises were in the assignments, but are computationally too hard (not enough time) to put on an exam. Ex. 5, 7, 12-14, 19-21, 28, 41-43, 47, 51, 63, 67 of Section 3.3 pages 253-256 (= 5, 7, 12-14, 19-21, 28, 37-39, 43, 47, 57, 59 of Section 3.2) Ex. 12-15, 18, 19, 31, 32, 35-42 of Section 3.4 pages 270-274 (= 10-13, 16, 17, 25, ?, 27-34 of Section 3.3, and Ex. 32 of the 5th Ed. asks (a) to give a recursive definition of the function ones(s) which counts the number of 1's in the bit string s, and (b) use structural induction to prove that ones(st) = ones(s) + ones(t) for bit strings s, t) Ex. 4-6, 9, 16-20, 29, 30, 37 of Section 3.5 pages 283-284 (= 10-12, 15, 24-28, 37, 38, 49 of Section 4.4) Ex. 1-4, 7, 8, 12 of Section 3.6 pages 283-284 (= 1-4, 7, 8, 12 of Section 4.5) Ex. 28, 35, 43, 51, 57, 58, 59, 60, 67 of Chapter 3 Supplement pages 292-297 (= 20, 35, 43, 49, 55, 56, 57, 58, 65 of Chapter 4 Supplement) From Chapter 3 of 5th Edition, it would be good to know math induction (regular, strong, and structural), Fibonacci numbers, reversal of a string (Ex. 34-38 p. 272 = 4.2.10, 4.2.11, 4.1.14, 4.1.61 of 6th Ed.), and of course be able to write a simple recursive procedure. Ex. 28 of Section 9.1 page 643 (= 28 of Section 10.1) Also know the result of Theorem 5 of Section 9.1: There are at most m^h leaves in an m-ary tree of height h. Most importantly, know Corollary 1: If an m-ary tree of height h has l leaves, h >= ceiling(log_m(l)) Ex. 11 of Section 9.2 page 657 (= 11 of Section 10.2) Also know the result of Theorem 1 of Section 9.2: A sorting algorithm based on binary comparisons requires at least ceiling(log n!) comparisons. Also know Corollary 1: The number of comparisons used by a sorting algorithm to sort n elements using binary comparisons is Omega(n log n). Ex. 4-9, 11 (easy ones), 12-15, 18, 22, 25, 27 of Section 11.1 pages 748-751 (= 6-11, 15 (easy ones), 18-21, 24, 28, 31, 33 of Section 12.1) Skip Section 11.2 of 5th Edition Ex. 1, 2, 4, 5, 8-13, 18, 19, 27 of Section 11.3 pages 764-765 (= 1, 2, 4, 5, 8,9,12,17, 44, 45, 55 of Section 12.3) Ex. 2-4, 6, 7*, 15 (use Ex. 16), 16-19 of Section 11.4 pages 774-775 (= 4,7,8, 10, 13*, 21 (use Ex. 22), 22-25 of Section 12.4) Ex. 1-3, 5-7, 8 (= Example 1), 9-11, read 15-17 of Section 11.5 page 782 (= 1-3, 7-9, 10, 11-13, read 17-19 of Section 12.5) Ex. 3, 13-15 (only FA's) of Chap. 11 Supplement pages 784-786 (= 3, 13-15 (only FA's) of Chap. 12 Supplement) Also, know the following: The grammar/language and machine hierarchy: Languages generated by grammar Machines recognizing them ----------------------------------------------------------- Phrase-structure grammars Turing machines Context-sensitive grammars Linear bounded automata Context-free grammars Pushdown automata Regular grammars Finite-state automata The idea of the Church-Turing Thesis: any problem that can be solved by an effective algorithm can be solved by a Turing machine.