2. Let ? = {a,b}, L<sub>a</sub> = {a<sup>k</sup> | k? N}, L<sub>b</sub> = {b<sup>j</sup> | j? N}, and L<sub>2</sub> = {x ? {a,b}* | |x| is even}. Do not
draw the machines below. Specify them with the quintuple (Q, ? = {a,b}, ?, Q<sub>o</sub>, F), where transition
function ? is a table with symbols on the rows and states on the columns.
(a) Construct DFA M<sub>a</sub> such that L(M<sub>a</sub>) = L<sub>a</sub>. Be sure to include all states, including dead states.
Devise a state invariant for M<sub>a</sub> and use it to prove that M<sub>a</sub> accepts L<sub>a</sub>.
(b) Construct DFA M<sub>b</sub> such that L(M<sub>b</sub>) = L<sub>b</sub>. Be sure to include all states, including dead states.
Devise a state invariant for M<sub>b</sub> and use it to prove that M<sub>b</sub> accepts L<sub>b</sub>.
(c) Construct DFA M<sub>2</sub> such that L(M<sub>2</sub>) = L<sub>2</sub>. Be sure to include all states, including dead states.
Devise a state invariant for M<sub>2</sub> and use it to prove that M<sub>2</sub> accepts L<sub>2</sub>.
(d) Construct DFA M<sub>a|b</sub> such that L(M<sub>a|b</sub>) = L<sub>a</sub> ? L<sub>b</sub>. Use the product construction from week 9
slides. Explain how you can use the proofs for M<sub>a</sub> and M<sub>b</sub> to establish that M<sub>a|b</sub> accepts L<sub>a</sub> ? L<sub>b</sub>.
(e) Construct DFA M<sub>a|b even</sub> such that L(M<sub>a|b even</sub>) = (L<sub>a</sub> ? L<sub>b</sub>) ? L<sub>2</sub>. Explain how you can use the
proofs for the preceding machine to establish that M<sub>a|b even</sub> accepts (L<sub>a</sub> ? L<sub>b</sub>) ? L<sub>2</sub>.