00:01
We're asked to construct a touring machine that computes the function f of n1, n2 equals n2 plus 2 for all n1 and n2, non -negative integers.
00:29
So recognize that an input for this function, which is a pair n1, n2, is going to be a string, which has n1 plus 1 ones, followed by a star.
00:51
Symbol which separates the two components of the pair and then n2 plus one ones for the second component and two you want to end up with n2 plus 2 plus 1 which is n2 plus 3 ones as our output and this represents the non -negative integer n2 plus 1 plus 2.
01:32
So we see that in our original input to the right of the asterisk, we're being given n2 plus 1 ones.
01:45
So we want to add 2 ones to this somehow.
01:49
One way to do this is to replace the asterisk with the 1, and then to replace the blank to the right of our input with the 1.
02:02
And then we'll have n2 plus 3 ones as long as we delete the first n1 plus 1 ones.
02:10
And so this is actually a fairly simple machine to make.
02:13
We're going to start out in a state s0.
02:17
And whenever we find a 1 in the state, we're going to delete it.
02:22
I'm going to change it to a blank...