CMPS 3233 – Theory of Computing

advertisement
CMPS 3233 – Theory of Computing
Draw a DFSM for each of the following languages
∑ = { a, b, c }
L1 = {w  ∑* | |w| is odd}
L2 = {w  ∑* | w contains an even number of a’s}
L3 = {w  ∑* | w’s first character is different from the last character}
L4 = {w  ∑* | w‘s first character is the same as the last character}
L5 = {w  ∑* | w does not any b’s}
L6 = {w  ∑* | w contains a’s only, and |w| is even}
L7 = {w  ∑* | w contains an even number of c’s followed by an odd
number of a’s or an odd number of b’s}
L8 = {w  ∑* | w = a5b*a5}
L9 = {w  ∑* | |w| is a multiple of 4}
L10 = {w  ∑* | each character in w consists of at least 3 in a row}
e.g. aaaabbbaaaccc is acceptable; aabbb is not
Download