I read some note about Automaton Course. i see this note, that following all is the same. but i think the L(g) is not equal to NFA and regular expression. anyone could help me with defining the language of this figures (nfa, regular expression and grammar):
Asked
Active
Viewed 316 times
1 Answers
0
They are in fact equivalent, but this is a strange way of converting one to the other.
R
is the same as (a|b)b*
. M
recognizes (a|b)(bb)*b?
. The right part recognizes 2*n+1
or 2*n
b
's, where n>=0
, hence is equivalent to R
.
Now on G
A
recognizes (bb)*b?
, which is equivalent to b*
(see comment on M
).
B
recognizes bB|bb*|e
which is equivalent to bB|b*
which is equivalent to b*
.
S
recognizes ab*b*|bb*b
which is equivalent to ab*|bbb*
, which is equivalent to (a|bb)b*
.

simonzack
- 19,729
- 13
- 73
- 118
-
would u please add a bit more detail? – Oct 14 '14 at 10:24
-
thanks from your help. i confused again :) would you please wrote language of each them? why you add a question mark at end of M recognizes (a|b)(bb)*b?? thanks. – Oct 14 '14 at 10:30
-
Wait a sec, answering you question about `G`. `?` just means 0 or 1 repetitions. – simonzack Oct 14 '14 at 10:31
-
thanks, i approve it, but would you please clarify each of language. thanks. – Oct 14 '14 at 10:34
-
you means S and R is equivalent but NFA accept another things? – Oct 14 '14 at 11:05
-
No, L(G) not equivalent to L(R), and L(G) not equivalent to L(M). – Oct 14 '14 at 11:13
-
In the Grammar G, the end symbol is not e, it's epsilon. – Oct 14 '14 at 11:14
-
@MioMio Ah you spotted my mistake. I've fixed it up. btw, I'm using e to represent epsilon here for convenience. – simonzack Oct 14 '14 at 11:18
-
@MioMio See my updated answer. You're right that L(R)=L(M) and L(G)!=L(R). – simonzack Oct 14 '14 at 11:27
-
my last question is (a|b)(bb)*b how generate 2n+1 or 2n b in the right part? – Oct 14 '14 at 11:59