assign4ans

# assign4ans - CS5371 Theory of Computation Homework...

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

CS5371 Theory of Computation Homework 4 (Solution) 1. Let Γ = { 0 , 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 k -state 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.) Answer: (1) If P has a match with t i 1 t i 2 · · · t i = b i 1 b i 2 · · · b i , then we observe that the

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern