This is an old revision of the document!
1. Deterministic Finite Automata
Notation conventions:
- Double-circle = final state
- Hanging arrow entering state = initial state
- Sink state = a state that is not final; once reached, there is no transition that leaves it, thus the DFA will reject; there is a transition that loops in this state for each possible character
- We can assume any missing transition leads to a sink state
2.1. Write DFAs for the following languages:
2.1.1. $ L=\{w \in \{0,1\}^* \text{ | w contains an odd number of ones} \} $.
2.1.2. The language of binary words which contain exactly two ones.
2.1.3. The language of binary words which encode odd numbers (the last digit is least significative).
2.1.4. (*) The language of words which encode numbers divisible by 3.
2.1.5. (*) The language of quaternary words (base 4), that follow the rule that every zero is immediately followed by a sequence of at least 2 consecutive threes and every one is immediately followed by a sequence of at most 2 consecutive twos} $.
2.1.6. The set of all binary strings having the substring 00101.