Skip to main content

Illustration DFA - string length divisible by 3 with remainder 1

DFA - string length divisible by 3 with remainder 1
DFA - String length mod 3 is equal to 1
Download 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 of a deterministic finite automaton (DFA) for the following regular language (type 3):$$ L ~=~ \{ w \in \{0,1\}^* ~:~ |w| ~\text{mod}~ 3 = 1 \} $$

This is a language with words \(w\) whose word length \(|w|\) is divisible by 3 with remainder 1. For example:$$ L ~=~ \{ 0, 1, 01, 10, 11, 00, 111,~... \} $$