00:01
We are given a finite state machine and we're asked to construct a regular grammar that generates the language recognized by this machine.
00:12
The machine can be found in exercise 17 of this section.
00:18
Looking at the machine, we see it has four states, s0, s1, s2, and s3.
00:32
We see that, of course, s0 is the start state, and we see that s1 and s2 are final states.
00:43
To find a grammar that generates the same language recognized by this machine, first let's find the terminal symbols.
01:08
These are the labels of the arrows in the figure.
01:11
You see that the only possible labels are zero or one, so that our set of terminal symbols, t, is simply going to be set 0, 1.
01:21
Now, because this is a grammar, we know that there exists some start symbol s.
01:36
And of course we know that s represents the start state s zero.
01:47
And we see that there are three other states.
02:02
And so we should have three other non -terminal states.
02:08
And so our vocabulary v will consist of s, a, b, and c, along with our terminal symbols 0 and 1.
02:37
Now we'll let a represent state s1, b will represent state s2, and c will represent state s3.
03:13
Now, we see that if there is an arrow from a state u to a state v with a label of x, then we'll add a product.
03:24
In the production, symbol u can be replaced by the symbol xv, with u and v, the string xv, with u and v being the symbols representing the states u and v.
03:39
Also, if we see that u is a final state, state u is a final state, and if there's an arrow with an input of x from state v to state u, then we'll add a production that the symbol of v can be replaced by symbol x, terminal symbol x.
04:04
Also, we notice that the start state is an accepting state...