quiz3solns - Name SOLUTIONS Problem 1 Prove or disprove the...

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

View Full Document Right Arrow Icon
Name: SOLUTIONS Problem 1: Prove or disprove: the following language is decidable: L = { M, n : M is a Turing machine with n states, and there exists a string w in Σ * of length at most n 2 such that M accepts w in at most n 3 transitions } The language is decidable. The following Turing machine decides it: M L = “On input < M, n > 1. Check if M has n states. If not, reject. 2. For each string w Σ * of length at most n 2 do: 3. Simulate M on w for n 3 steps. 4. If M accepts w within n 3 steps, accept. 5. Reject. Problem 2: Prove or disprove: the following language is decidable: L = { M, p, q : TM M , on input ’1’, visits state p (at some point) and (at a later point) state q } . The language L is not decidable. To prove it, we show that A TM reduces to L . The Turing machine that computes the reduction is the following: M R = “On input < M, w > : 1. Construct Turing machine M : M = “On input x : 1. Simulate M on w . If M accepts, accept.” 2. Let p and q be, respectively, the start and accept states of M .
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