Design a machine of the following language: L = Containing even a where ∑ = {a, b}

Here L = {λ, b, aa, aabb, aaaabbbb, ……}

As per the question,

Here r indicates remainder when the number of ‘a’ is even remainder is zero i.e. r = 0 otherwise remainder is one i.e. r = 1 (when the number of ‘a’ is odd).

At ${\mathbit{q}}_{\mathbf{0}}$, the number of ‘a’ is always even that’s why we assign r = 0 at ${\mathbit{q}}_{\mathbf{0}}$ state.

But at ${\mathbit{q}}_{\mathbf{1}}$, the number of ‘a’ is always odd that’s why we assign r = 1${\mathbit{q}}_{\mathbf{1}}$ state.

${\mathbit{q}}_{\mathbf{0}}$ is the final state because the machine is for even ‘a’

Same as above machine we can design even number of ‘b’:

Regular Expression for even number of b’s