Review Sheet For Quiz #3 Theory of Algorithms Spring, 1996 Quiz #3 will be given at 10:25 on Thursday, May 30, 1996. Review Material for Quiz #3 in Theory of Algorithms ----------------------------------------------------------------- Chapter 8 -- Dynamic Programming ----------------------------------------------------------------- Be prepared to explain what dynamic programming is. Be prepared to answer questions designed to determine if you can distinguish examples of dynamic programming algorithms from greedy methods and examples of simple divide and conquer algorithms. ----------------------------------------------------------------- Be familiar with our text's examples of the following dynamic programming problems: The World Series The Knapsack Problem Shortest Paths (Floyd's Algorithm) In particular, given a sketch of one of these algorithms for reference, be prepared to show how the algorithm would fill in the values of the subinstances. In the case of the knapsack problem, be prepared to use the matrix output by the algorithm to determine the composition of an optimal load. In the case of Floyd's Algorithm, be prepared to show how to augment the basic algorithm so it will compute where all the shortest paths go, not just their lengths. Be prepared to show how this augmented algorithm builds its output, and be prepared to use an example of the output to produce a description of a shortest path which tells where the path goes, node by node. ----------------------------------------------------------------- Be prepared to explain the principle of optimality. Be prepared to distinguish statements that refer to this principle from statements that do not. Be prepared to distinquish algorithms that rely on this principal from algorithms that do not. ----------------------------------------------------------------- Be prepared to discuss how dynamic programming techniques can be combined with divide and conquer methods efficiently. Be able to explain the role that memory functions and virtual initialization play in making these efficient divide and conquer versions possible. ----------------------------------------------------------------- Chapter 12 -- Computational Complexity ----------------------------------------------------------------- What is the study of computational complexity? What kinds of questions are addressed by this study? ----------------------------------------------------------------- What is a decision tree? What is a verdict in a decision tree? What is a trip through a decision tree? How does a decision tree correspond to an algorithm? What is the relationship between the height of a decision tree and the number of questions asked by the corresponding algorithm? What is the connection between the height of a decision tree and the number of possible verdicts in the tree? ----------------------------------------------------------------- What is an adversary argument? Explain the role of the "malevolent daemon" (the adversary) in the example of finding the maximum of an array. Explain the role of the daemon in the example of testing graph connectivity. ----------------------------------------------------------------- What are the formal definitions of linear reducibility and linear equivalence? What is meant by the transitivity of linear reducibility and linear equivalence? ----------------------------------------------------------------- Be prepared to verify whether or not an alleged "proof" of linear reducibility is correct. ----------------------------------------------------------------- What is a polynomial time algorithm? What is a decision problem? What is the class P? What is the class NP? Be able to prove that P is contained in NP. ----------------------------------------------------------------- What are the formal definitions of polynomially Turing reducible and polynomially Turing equivalent? What is meant by the transitivity of polynomial Turing reducibility and polynomial Turing equivalence? Be prepared to verify whether or not an alleged "proof" of polynomial Turing reducibility is correct. ----------------------------------------------------------------- Be able to state and prove theorem 12.5.6: "Consider two problems A and B. If A is polynomially Turing reducible to B and if B can be solved in polynomial time, then A can also be solved in polynomial time." ----------------------------------------------------------------- What does it mean to say that a problem is decision-reducible? What is the importance of decision-reducibility? ----------------------------------------------------------------- Be familiar with the specific problems discussed in chapter 12. For example, be familiar with the travelling salesperson problem, the problem of determining if an undirected graph has a Hamiltonian circuit, the problem of multiplying symmetric matrices, the problem of coloring a graph, and so forth. ----------------------------------------------------------------- What is an NP-complete decision problem? Be familiar with Theorem 12.5.11, and how it can be used to find "new" examples of NP-complete problems. What is the satisfiability problem SAT? What are the problems SAT-CNF and SAT-k-CNF? What does Cook's theorem say? What is the importance of Cook's theorem? Be prepared to discuss the aspects of the proof of Cook's theorem that we covered. Be prepared to give some examples of NP-complete problems. Be sure you can recall which problems discussed in chapter 12 were proved to be NP-complete, and which ones the authors told you were NP-complete. ----------------------------------------------------------------- What is an NP-hard problem? Is every NP-hard problem NP-complete? Explain. Is every NP-complete problem NP-hard? ----------------------------------------------------------------- What does NP actually stand for? What is a non-deterministic decision algorithm? Specifically how is a non-deterministic algorithm allowed to differ from a deterministic one? What is the definition of NP that uses the concept of non-deterministic polynomial time algorithms? -----------------------------------------------------------------