CS 321 Fall 2015 HW1 - DFAs Due (on paper) Wednesday 9/30 at the beginning of class. 1. Construct a (deterministic) finite automaton for each of the following language. No need to draw trap states. (a) all letter strings with at least a vowel (b) all letter strings with vowels in order (i.e., each of the five vowels appear once and only once, and in order) (c) all bitstrings with even numbers of 0s and odd numbers of 1s (d) all alphanumeric strings that start with one or more letters followed by zero or more numbers. (e) all strings over {a,b,c} where the number of a's is divisible by 3 (f) all strings over {a,b,c} where the number of a's minus the number of b's is divisible by 3 (g) all strings over {a,b,c} where the number of a's plus twice the number of b's plus the number of c's is divisible by 5. what's your general strategy of solving (e-g)? (h) all bitstrings that does contain 001 (i) all bitstrings that does not contain 001 (j) all bitstrings that does not contain 0011 (k) all bitstrings that does not contain 11001 do (h-k) remind you of some famous algorithm in data structures? (l) all strings over {a,b} where all a's come before any b's, and the numbers of a's and b's are both even. (m) all strings over {a,b} where the number of a's equal the number of b's. can you do this? if not, explain why. (n) all strings over {a,b} that do not end with ab. 2. Prove that the language L = { awb | w \in {a,b}*, |w| is even } is regular. (note that \in is the LaTeX symbol for "element of"). 3. Prove that for every regular language L, its complement language is also regular.