This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: 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....
View Full Document
This note was uploaded on 02/13/2012 for the course CSE 4111 taught by Professor Edmonds during the Winter '12 term at York University.
- Winter '12