Skip to main content

Illustration DFA - length divisible by 2 or 3, but not by 6

<span>DFA - length divisible by 2 or 3, but not by 6</span>
DFA - length divisible by 2 or 3, but not by 6
Download

Share โ€” copy and redistribute the material in any medium or format

Adapt โ€” remix, transform, and build upon the material for any purpose, even commercially.

Sharing and adapting of the illustration is allowed with indication of the link to the illustration.

Sketch of a deterministic finite automaton (DFA) for the following regular language (type 3):$$ L ~=~ \{ a^n ~:~ n \equiv 0 ~\text{mod}~2 ~\text{or}~3, ~~ \text{not}~6 \} $$

This is an infinite language with, for example, the following words \(w\):$$ L ~=~ \{aa, aaa, aaaa, aaaaaa,~.... \} $$

This automaton accepts all words \(w\) whose length is divisible by two or by three, but not by six.