Use Algorithm 3.36 to convert the regular expressions of Exercise 3.7.3 directly to deterministic finite automata.
Algorithm 3.36 : Construction of a DFA from a regular expression r.
INPUT: A regular expression r.
OUTPUT: A DFA D that recognizes L(r).
1. Construct a syntax tree T from the augmented regular expression (r)#.
2. Compute nullable, firstpos, lastpos, and followpos for T, using the methods of Sections 3.9.3 and 3.9.4.
3. Construct Dstates, the set of states of DFA D, and Dtran, the transition function for D, by the procedure of Fig. 3.62. The states of D are sets of positions in T. Initially, each state is “unmarked,” and a state becomes “marked” just before we consider its out-transitions. The start state of D is firstpos(no), where node no is the root of T. The accepting states are those containing the position for the endmarker symbol #.
Exercise 3.7.3 : Convert the following regular expressions to deterministic finite automata