CS 360 A5

CS 360 A5 - CS 360 Fall 2011 Assignment 5 Due at 4:00 PM on...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the 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 non-deterministic 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 counter-example. (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

Page1 / 3

CS 360 A5 - CS 360 Fall 2011 Assignment 5 Due at 4:00 PM on...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online