COT4420 Theory of Computation January 12, 2016 Problem Set 1 Due January 21, 2016 (In the following problems, as needed, you can use diagrams such as a black-box with inputs and outputs as used in class) 1. Prove that if a language is not recursively enumerable, then its complement cannot be recursive. 2. Prove that the set of all languages that are not recursively enumerable is not countable. 3. Assume that a procedure can be formalized as a Turing machine that can be represented by a finite length string from a finite alphabet. Show that the set of all Turing machines is a recursively enumerable set by giving an effective enumerating procedure for this set. Is the set of all Turing machines countable? Why? 4. Prove Cantor’s original result: for any nonempty set (whether finite or infinite), the cardinality of S is strictly less than that of its power set 2S. First show that there is a one-to-one (but not necessarily onto) map g from S to its power set. Next assume that there is a one-to-one and onto function f and show that this assumption leads to a contradiction by defining a new subset of S that cannot possibly be the image of the map f (similar to the diagonalization argument). 5. Consider the grammar G = ({S , A, B}, {a, b}, P, S ) with P: S -> aAB | aBA | bAA | λ A -> aS | bAAA B -> aABB | aBAB | aBBA | bS What is L(G)? Outline the reasons for your claim. What type of grammar is this? 6. Show that if L1 and L2 are recursive languages, then the intersection of the two languages is a recursive language. 7. Find grammars that generate the following languages: (a) L = {wcwR : w ϵ {a, b}+} over alphabet V = {a, b, c} (wR is the reverse of w). (b) L = {w : | w | mod 3 ≤ | w | mod 2}over alphabet V = {a}. 8. Using induction, show that for every x ϵ {a,b}* such that x begins with a and ends with b, x contains the substring ab.