CMPS 260 Spring 2024
HW #1: Designing DFA's
Due: 2pm, Wednesday, Jan. 31

For each problem, you are to present a DFA (in the form of a transition diagram) that accepts the described language. If the alphabet is not explicitly indicated, assume that it is {a,b}.

1. The language containing precisely those strings whose first and last symbols are different (i.e., one of them is a and the other is b).


2. The language containing precisely those strings having an even number of occurrences of a and at least three occurrences of b.

Expressed using a set former: { x ∈ {a,b}*  |  #a(x) is even  ∧  #b(x) is at least three }


3. The language containing precisely those strings having aab as a substring.

Expressed using a set former: { xaaby  |  x,y ∈ {a,b}* }


4. The language containing precisely those strings not having aba as a substring.


5. The intersection of the languages in Problems 3 and 4. That is, the set of strings having aab as a substring but not having aba as a substring.