This is an old revision of the document!
1. Deterministic Finite Automata
- 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. The language of binary words which encode odd numbers (the last digit is least significative).
2.1.2. $ L=\{w \in \{0,1\}^* \text{ | w contains an odd number of ones} \} $.
2.1.3. The language of binary words which contain exactly two ones.yy
2.1.4. (*) The language of words which encode binary numbers divisible by 3.
2.1.5. (* *) The language of words which encode binary numbers divisible by 3, represent in reverse order (the least significant digit is first).
2.1.6. (*) 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.7. The language of all binary words having the substring 00101.
2.1.8. The language of binary words that start and end with different digits.
2.2. Describe in natural speak the language accepted by these DFAs. Make sure your description is fit to the DFA and not too broad (covers all words accepted and no other word).
2.2.1
2.2.2
2.2.3
2.2.4
2.2.5
2.2.6
2.3.1 What happens if we switch all final states to non-final states and vice-versa in a DFA?
2.3.2 Prove that if L(M) is infinite, there has to be some cycle in the states graph, such that there is a path from the initial state to the cycle, and from the cycle to a final state.
2.3.3 If no such cycle described above exist, L(M) is finite.
2.3.4 Show that if you can construct a DFA to accept L, than you can also construct a DFA to accept $ L \cup \{a\}, \forall a \in \Sigma $.