138 Pushdown Automata Theory: Constructive
138 Pushdown Automata Theory: Constructive
All regular expressions can be handled the same way. We have shown that every
language accepted by an FA can be accepted by a TG, every language accepted by a TG
can be defined by a regular expression, and every language defined by a regular
expression can be accepted by an FA. This concludes the proof of all of Kleene’s theorem.
■
The proof has been constructive, which means that we have not only shown that there
is a correspondence between regular expressions, FA*s and TG's, but we have also shown
exactly how to find examples of the things that correspond. Given any one we can build
the other two using the techniques outlined in the proof above.
Because TG's seem more understandable, we often work with them instead of
struggling with the rigors of FA's (especially having to specify what happens in every state
to every letter).
The biggest surprise of this theorem may be that TG's are not any more powerful than
FA's in the sense that there are no extra languages that TG's can accept that FA's could
not handle already. This is too bad because we shall soon show that there are some
languages that FA’s cannot accept, and we shall need a more powerful type of machine
than a TG to deal with them.
Even though with a TG we had the right to exercise some degree of judgment~we made
some decisions about sectioning the reading of the input string— we could do no better
than a purely automatic robot like an FA. The human input factor was worth essentially
nothing.
PROBLEMS
鈦 For the following transition graphs use the algorithm of this chapter to find an equivalent
regular expression. Then simplify the expression if possible.
o
7. Consider the following finite automata:
FA 1 FA 2
a
Find regular expressions ri, r2, r3 for these, respectively, and simplify the expressions if
possible. Describe these languages in English.
Using the algorithms in this chapter and the three FA's from Problem 7 find FA’s for
the following:
8. ri H- r2
9. ri + r3
10. r2 + r3
11. rA
12. rir3
13. r2r3
14. r2ri
15. r^!
16. (rO*
17. (r2)*
18. (r3)*
19. Based on the regular expressions in Problems 8 through 18, answer these questions:
Is the machine for the same as the machine for r2ri? Why? Is the machine for ri + r2
the same as the machine for r2 + rj? Why? Is the machine for r^i the same as the
machine for (rO*? Why? Would the machine for r2r2 be the same as the machine for
(r2)*? Why?
20. If some automaton, FA U has ri\ states and some other automaton, FA 2 , has n 2 states,
what is the maximum number of states possible in the machines the algorithms in
this chapter produce for the automata corresponding to
(i) FA X + FA 2
(ii) FA X FA 2
(iii) (FA,r