• Embed Doc
  • Readcast
  • Collections
  • 1
    CommentGo Back
Download
 
CSE 350 Spring 2010 HW #4
Chao Xu(106978083)
2.5 b.
The stacks can be ignored because the language is a regular language, so it’s just a DFA.The diagram:
q
3
q
2
q
1
q
0
q
s
0
,ε
ε
0
,ε
ε
1
,ε
ε
1
,ε
ε
0
,ε
ε
1
,ε
ε
2.7 b
There is only one accept state that pop the entire stack and accept the input. Push $ into the stack.Read the first symbol, if it’s a
b
, move to accept state.If it’s
a
, push a
a
into the stack when it read a
a
, until it encounter the first
b
. The PDA moves to a newstate when it reachs the first
b
after the first set of consective
a
’s. In that state, for each
b
the PDA reads,it pop’s a
a
. If it reads a
a
, it move to accept state. If it reads a
b
and the stack has $ on top, it also moveto the accept state.1
of 00

Leave a Comment

You must be to leave a comment.
Submit
Characters: ...
You must be to leave a comment.
Submit
Characters: ...