This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: CS 360 Fall 2011 Assignment 5 Due at 4:00 PM on Friday, December 2nd 1. (10 marks) Let L = { a n b n c n  n ≥ 1 } . Design a Turing machine that accepts L . SOLUTION: We create a nondeterministic Turing machine with three tapeheads. The tapeheads all start out pointing to the first character of the input string. First, the machine guesses the position of the leftmost b , and moves the second tapehead there. Next, it guesses the position of the leftmost c , and moves the third headtape there. Then, it checks if the first tapehead points to an a , the second to a b , and the third to a c . If not, then it rejects. Otherwise, it moves each tape head by one position to the right, and continues to do so while the first tapehead points to an a , the second to a b , and the third to a c . If at any point the first tapehead points to a b , the second to a c , and the third to a black character, it accepts. Any other configuration is rejected. 2. (20 marks) For each of the following, decide whether the statement is true or false. Provide a proof or a counterexample. (a) If L 1 is decidable and L 2 is not recursively enumerable, then L 1 ∩ L 2 is not decidable. SOLUTION: False. Let L 1 = ∅ (not that L 1 is decidable because it is regular) and let L 2 be any language that is not recursively enumerable. Then L 1 ∩ L 2 = ∅ , which is decidable. (b) If L 1 ,L 2 ,L 3 ,... are decidable, then S ∞ i =1 L i is decidable....
View
Full Document
 Winter '08
 JohnWatrous
 Halting problem, Lε, universal decider

Click to edit the document details