This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: ECS 120: Theory of Computation Homework 8 Problem 1. Classify the following languages as decidable, acceptable (but not decid able), coacceptable (but not decidable), or neither acceptable nor coacceptable. Prove all your answers, giving decision procedures or reductions. A. L = {h M i  M accepts some evenlength string } . Acceptable. Certainly L is Turingacceptable: a nondeterministic TM M A which acepts it is as follows: on input h M i , M A just guesses an evenlength string x which is in L ( M ), and then M A simulates M on x . Machine M A accepts h M i if and only if M accepts x . L is not coTuringacceptable. To see this, we show A TM ≤ m L . For this, we must give a Turingcomputable function f which maps h M,w i → h M i such that if M accepts w then M accepts some even length string, and if M rejects or loops on w then M does not accept any even length string. Such a construction is easy: M’: On input x “Run M on w If M accepts w , accept .” Clearly f is computable. Now, if M accepts w then L ( M ) = Σ * , which contains some even length string. And if M does not accept w then L ( M ) = ∅ , which contains no even length strings. Thus since L is acceptable but not coacceptable, it is not decidable. B. L = {h M i  M accepts some palindrome } . Acceptable . Again, it is clear thet L is Turingacceptable: an NTM M B , on input h M i , can simply guess a palindrome x which is L ( M ) and then verify that x is a palindrome and that M accepts x . But L is not coacceptable. Again we show A TM ≤ m L . We must give a Turing computable function f which maps h M,w i → h M i such that if M accepts w then M accepts some palindrome, and if M rejects or loops on w then M does not accept any palindromes. Such a construction is easy: 1 M’: “On input x Run M on w If M accepts w , accept .” Clearly f is computable. Now, if M accepts w then L ( M ) = Σ * , which contains a palindrome. And if M does not accept w then L ( M ) = ∅ , which contains no palindromes....
View
Full Document
 Fall '07
 Filkov
 Halting problem

Click to edit the document details