Skip to main content

Illustration DFA - word length divisible by either 2 or 3

DFA - word length divisible by either two or three
Get illustration

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 a deterministic finite automaton (DFA) for the following regular language (type 3):$$ L ~=~ \{ a^n ~:~ n \text{ is divisible either by 2 or by 3 } \} $$

This is an infinite language with, for example, the following words:$$ L ~=~ \{ aa, aaa, aaaaaaa, ~.... \} $$