Solution (source code)

= Solution

\b[The <formal language> is not a <regular language>.] Let $K$ denote it and consider the infinitely many prefixes
$$
u_i=(ab)^i,\qquad i\geq0.
$$
For any $i\ne j$, append the <word> $z_i=(bc)^i$. Then $u_iz_i\in K$, whereas $u_jz_i\notin K$: the latter <word> has $j$ occurrences of $a$ and $i$ occurrences of $c$, and every <word> of $K$ has equal numbers of those two symbols.

Thus $u_i$ and $u_j$ are not <Myhill-Nerode equivalent>. There are infinitely many <Myhill-Nerode equivalence> classes, so the <Myhill-Nerode theorem> rules out a <finite-state automaton> recognizing $K$. Equivalently, if two such prefixes left a <deterministic finite automaton> in the same <automaton state>, appending $z_i$ could not distinguish their acceptance, giving the same contradiction.
$$
\boxed{K\text{ is not regular}.}
$$