Theory of Computation
FSA Examples
DFAs
Draw Deterministic Finite Automata to accept the following sets of strings over the alphabet {0,1}:
- All strings that contain exactly 4 "0"s. Solution.
- All strings ending in "1101". Solution.
- All strings containing exactly 4 "0"s and at least 2 "1"s. Solution.
- All strings whose binary interpretation is divisible by 5. Solution.
- (1.4c) All strings that contain the substring 0101. Solution.
- (1.4e) All strings that start with 0 and have odd length or start with 1 and have even length. Solution.
- (1.4f) All strings that don’t contain the substring 110. Solution.
- (1.4g) All strings of length at most five. Solution.
- (1.4i) All strings where every odd position is a 1. Solution.
DFAs
- All strings that contain exactly 4 0s.
- All strings ending in 1101.
- All strings containing exactly 4 0s and at least 2 1s.
- All strings whose binary interpretation is divisible by 5.
- (1.4c) All strings that contain the substring 0101.
- (1.4e) All strings that start with 0 and has odd length or start with
1 and has even length.
- (1.4f) All strings that don't contain the substring 110.
- (1.4g) All strings of length at most 5.
- (1.4i) All strings where every odd position is a 1.