Automata for all words beginning respectively ending in a.
In[1]:=
M1=FA
type:DFA
states:3
alphabet:2
;
In[2]:=
M2=FA
type:DFA
states:2
alphabet:2
;
Only the accessible part of the full product is constructed. However, states that fail to be co-accessible have to be eliminated separately. In the example, the whole left part is not co-accessible.