{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw8-sol - ECS 120 Theory of Computation Homework 8 Problem...

Info iconThis preview shows pages 1–3. 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 Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ECS 120: Theory of Computation Homework 8 Problem 1. Classify the following languages as decidable, acceptable (but not decid- able), co-acceptable (but not decidable), or neither acceptable nor co-acceptable. Prove all your answers, giving decision procedures or reductions. A. L = {h M i | M accepts some even-length string } . Acceptable. Certainly L is Turing-acceptable: a non-deterministic TM M A which acepts it is as follows: on input h M i , M A just guesses an even-length 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 co-Turing-acceptable. To see this, we show A TM ≤ m L . For this, 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 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 co-acceptable, it is not decidable. B. L = {h M i | M accepts some palindrome } . Acceptable . Again, it is clear thet L is Turing-acceptable: 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 co-acceptable. 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

{[ snackBarMessage ]}

Page1 / 5

hw8-sol - ECS 120 Theory of Computation Homework 8 Problem...

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

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