a1 - CSE 200 Computability and Complexity Homework 1 Models...

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

View Full Document Right Arrow Icon
CSE 200 Computability and Complexity Homework 1 Models of Computation and Undecidability Spring, 2010 Chris Calabro and Russell Impagliazzo April 23, 2010 2D TM We show how to simulate a 2D TM on a 5-tape TM with polynomial overhead. The two dimensional TM only uses memory in the upper righthand quardrant of the plane, i.e., cells < x.y > with x, y 1. We’ll use the following pairing function , p ( x, y ) ( p ( x,y )= x + y - 12+ x ) and store the x, y th 2D tape cell in the p ( x, y )’th linear tape cell on the first tape. Note that the difference between p ( x, y ) and p ( x, y + 1) is x + y - 1 and to p ( x + 1 , y ) is x + y . We also keep the current positions x and y on two separate tapes (each initialized to 1). We’ll use the fourth and fifth tapes for arithmetic. At the beginning of simulating one step of the blackboard TM whose tape head is at x, y , the simulating 3-tape TM will have its first tape at p ( x, y ) and the values of x and y on the next two tapes. The two remaining tapes will be empty. Since we know the current state of the 2D TM, and the contents of the cell it is reading, we know its next action. Writing is simulated by writing to the current cell. If the blackboard TM moves its tape head up , i.e., increases y to y +1, the simulating machine computes x + y on the fourth tape, moves its tape head x + y cells to the right as follows, decrementing the fourth tape each time. This takes a total of O ( x + y ) steps, since the cost of addition is O (log( x + y )) and the amortized cost of decrementing is constant. When it reaches 0, it erases the last zero from the fourth tape. It then increments the third tape, with y on it, in O (log y ) = O ( y ) steps. Similarly for moving down, left or right, using x + y - 1 moves to the left, x + y - 1 moves to the right, and x + y - 2 moves to the left, respectively, in place of x + y . We also need to initialize by moving the input to p (1 , 1), p (2 , 1),... p ( n, 1). This takes O ( n 2 ) time Each of the simulating steps could take up to O ( x + y ) time. Since the blackboard machine can only increase x + y by 1 every step, this is O ( T ( n )). So simulating T ( n ) n steps takes O ( T ( n ) 2 ) time.
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