CPS 360 Review: Worksheet I
Part I: Problems These questions are designed to make you restate what the major focus of this course is. 1. In this course, we have said we use computers for one main purpose. What is that purpose?
2. In this course, we want to study the limits of what computers can do. In the context of the first question, how do we study the limits of what computers can do?
3. What is a problem?
4. What is a decision problem?
5. We focus primarily on decision problems in this course. Given your answer to question 2, how can we justify doing this?
Part II: Languages and the language recognition problem These questions are designed to make you review what a language is and what the language recognition problem is. For all questions in this section, assume the alphabet is {0,1}. 1. What is a language? 2. Given a language L, what is its language recognition problem?
3. First answer the following four subquestions before answering this question. If L1 is a subset of L2, does it necessarily follow that L1’s language recognition problem is easier than L2’s language recognition problem?
3.1. For any language L over alphabet {0,1}, what is the domain (set of input instances) of L’s language recognition problem? 3.2. If L1 is a subset of L2, is the domain of L1’s language recognition problem smaller than the domain of L2’s language recognition problem? 3.3. If L1 is a subset of L2, how is the set of “yes input instances” for L1’s language recognition problem related to the set of “yes input instances” for L2’s language recognition problem? 3.4. If L1 is a subset of L2, how is the set of “no input instances” for L1’s language recognition problem related to the set of “no input instances” for L2’s language recognition problem? 3.5. If L1 is a subset of L2, does a program P which solves L2 also solve L1? If yes, why? If not, identify the input instances which P incorrectly processes?
Part III: Decision Problems and Languages This short part asks you to describe why decision problems and languages are equivalent objects. 1. I have said languages and decision problems are equivalent. Why do I say this?
2. We typically focus on languages over {0,1}. Why can we focus on this alphabet?
3. Given that languages and decision problems are equivalent and given you answers to questions in Part I, how can we study the limits of what computers can do?
Part IV: Programs This part reviews the terminology we have developed to describe program behavior. 1. Suppose we have a program P which tries to solve the language recognition problem for some language L. Let x be an arbitrary string in {0,1}*. What are the four possible outcomes of running P on input string x?
2. For a given program P, what do we define L(P) to be?
3. For a given program P and a given language L, describe how program P behaves on all input strings in L if program P accepts L?
4. For a given program P and a given language L, describe how program P behaves on all input strings in Lc if program P accepts L?
5. For a given program P and a given language L, describe how program P behaves on all input strings in L if program P decides L?
6. For a given program P and a given language L, describe how program P behaves on all input strings in Lc if program P decides L?
7. Which term, P accepts L or P decides L, means program P solves the language recognition problem for language L?
8. In the previous question, why not the other term?
Part V: REC and RE language classes This part reviews the REC and RE language classes 1. What is a language class?
2. Define what it means for a language L to be recursively enumerable.
3. Define what it means for a language L to be recursive.
4. Define what the REC and RE language classes are.
5. Which language class is a subset of the other and why?
Part VI: Summary of Parts I-V 1. In the context of Parts I-V, why do we study the REC language class?
2. Given that we really are interested in the REC language class, why do we define and study the RE language class.