00:01
We are asked to construct a touring machine that recognizes the set of strings of the form 0 to the n, 1 to the end, 2 to the n, or n is greater than or equal to 0.
00:15
Just a note, the reason we're constructing a touring machine for this specific set is that like the set, 0 to the n, 1 to the n, this set is not a regular set.
00:28
So he could not use any sort of automodd to check this set that had this language.
00:39
Set is its language.
00:42
So to begin, i'll sort of describe the five tuples as we go along.
00:55
And just looking at the form of this set, it might make sense to us to believe that this touring machine is going to be similar to the one from example three.
01:06
So that we're going to be changing bits one at a time to new symbols.
01:16
However, there is a distinct difference there that there is here, and that there the strings sort of had two sides, so you had the sides with all the zeros and the side with all the ones.
01:29
In this case, the streams want to recognize aren't really two -sided, more that they have three parts, the beginning, middle, and end.
01:42
So we want to replace the three.
01:44
Bits from left to right instead of working back and forth.
01:56
And to facilitate this, we'll introduce a new symbol e at the left end of the input to tell more easily when we were back at the starting point.
02:17
So if we're given an initial input, what we're going to do in state s -0, regardless of what the input is, well, we only want to accept inputs that begin with the zero.
02:41
So we'll have the five -touple s -z0 -z10l.
03:28
Now, in this case, the machine should accept the empty string.
03:33
So we actually want to include the transition s0b for blank.
03:40
Well, then we should transition into state s -0 -b -l.
04:10
So we're actually going to want to go from s -0 when we're blank to our final state.
04:20
Which i'll just call for now s -f.
04:23
We'll come back and fix this, and we figure out what the final state should be.
04:29
And then, because it's a final state, the string will be accepted.
04:33
But suppose instead of the string begins with zero, we'll want to move into state s -1, keep the zero -zero, and we will move left.
04:47
So we're moving into a blank space.
04:59
And now when we're in state s -1, when we see this blank space, we want to shift into state s -2.
05:09
You want to change the blank space into this marker e that tells us where the beginning of the string is.
05:16
We'll see that why this is useful later.
05:19
And then we're going to start moving to the right.
05:23
Now when we're in state s2, we'll want to skip past any m's that exist so far.
05:30
So this is later in the evaluation usually, but i should mention it here.
05:36
So if you have any m, we're just going to skip past them.
05:40
S2m, s2m, r, we'll also want to skip past any zeros.
05:52
But when we skip past the zero, well, the first zero, we actually want to change to an m.
05:59
So when we find the first zero, we'll change this to an m while changing into state s3 and move to the right.
06:08
And then when we're in state s3, we want to move through the rest of the zeros.
06:12
We also want s3 to skip past any m's.
06:28
So we have s3, 0, s3, 0r, and also s3m, s3mr.
06:43
And we're going to skip through these until we find our first one.
06:49
And when we find the first one, we want to change this one into an m...