381hw12solns - CS381 Homework#12 Solutions Question 1 Prove...

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

View Full Document Right Arrow Icon
CS381, Homework #12 Solutions Question 1 Prove that the intersection of two CFGs is undecidable. We shall prove this fact with a reduction from the halting problem to the intersection of two CFGs. Recall from class, that for some Turing Machine M , on some input x we can write the valid computations of M as G = L ( C 1 ) L ( C 2 ) = k 1 ( k 2 ) R ... k n . If you do not remember how to do this, review your course notes. Now observe, that if G (which is the intersection of two context free lan- guages) is non-empty, then it must contain some finite length string, which means that the Turing Machine M has some sequence of valid computations such that it halts on input x. We can make sure that when we formulate our intersection, we allow the machine to end in any state (and not just final states) as long as no input remains and there are no epsilon transitions from the state in k n . Thus, it may be that a string x is not accepted by M , but if G is nonempty, it can be assured that M halts on x . If the intersection is empty on the other hand, then there is no such sequence, and the Turing Machine will run forever. This gives us a way to determine if a machine if a Turing Machine M halts on input x using the intersection of two CFLs. This conclusion though creates a contradiction, for if this intersection problem were decidable, we could solve the halting problem using it, and
Image of page 1

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

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern