Figuring out the language accepted by a DFA?
The DFA is already minimal. In the table below, I give words which separate all pairs of states:
$$
\begin{array}{c|c|c|c|c}
&amp; q_1 &amp; q_2 &amp; q_3 &amp; q_4 \\\hline
q_1 &amp; &amp; \epsilon &amp; \epsilon &amp; b \\\hline
q_2 &amp; \epsilon &amp; &amp; ba &amp; \epsilon \\\hline
q_3 &amp; \epsilon &amp; ba &amp; &amp; \epsilon \\\hline
q_4 &amp; b &amp; \epsilon &amp; \epsilon &amp; \\
\end{array}
$$
As for the language accepted by this DFA, the best I got is
$$
\begin{align*}
&amp;(a^? (a^{even} b)^+ a^{odd} b)^* a^* + \\
&amp;(a^? (a^{even} b)^+ a^{odd} b)^* a^?(a^{even} b)^+a^{even} b,
\end{align*}
$$
where $a^? = a + \epsilon$, $a^{even} = (aa)^*$, $a^{odd}=a(aa)^*$, and $r^+ = rr^*$.

There might be a simpler description.