This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: CS5371 Theory of Computation Homework 4 (Solution) 1. Let Γ = { , 1 , t} be the tape alphabet of all TMs in this problem. Define the busy beaver function BB : N → N as follows. For each value of k , consider all kstate TMs that halt when started with a blank tape. Let BB ( k ) be the maximum number of 1 s that remain on the tape among all of these machines. Show that BB is not a computable function. Answer: Suppose on the contrary that BB is computable. Then there exists a TM F that computes BB . Without loss of generality, F be a TM that, on input 1 n , and halts with 1 BB ( n ) on the tape for all n . Now, we construct a TM M that halts when started with a blank tape based on F : In Step 1, M writes n 1 s on the tape. In Step 2, M doubles the 1 s in the tape. In Step 3, M simulates F (on the input string 1 2 n . Thus, M will always halt with BB (2 n ) 1 s when it is started with a blank tape. To implement M , we require at most n states to perform Step 1, and a total of c states to perform Steps 2 and 3, for some constant c . By definition, we have BB ( n + c ) = maximum number of 1 s that a ( n + c )state TMs will halt with, which is at least the number of 1 s that M halts with. This implies BB ( n + c ) ≥ BB (2 n ) holds for all n . However, it is easy to check that BB ( k ) is a strictly increasing function (why?). Thus, BB ( n + c ) < BB (2 n ) when n > c , and we arrive at a contradiction. In conclusion, BB ( k ) is not a computable function. 2. Let AMBIG CFG = {h G i  G is an ambiguous CFG } . Show that AMBIG CFG is undecid able. (Hint: Use a reduction from PCP . Given an instance P = ‰• t 1 b 1 ‚ , • t 2 b 2 ‚ ,..., • t k b k ‚ , of the Post Correspondence Problem, construct a CFG G with the rules S → T  B T → t 1 T a 1  ···  t k T a k  t 1 a 1  ···  t k a k B → b 1 B a 1  ···  b k B a k  b 1 a 1  ···  b k a k , where a 1 ,..., a k are new terminal symbols. Prove that this reduction work.)are new terminal symbols....
View
Full
Document
This note was uploaded on 02/20/2010 for the course CS 523 taught by Professor Huj during the Spring '05 term at Albany State University.
 Spring '05
 huj

Click to edit the document details