1. [15 Points] Consider the language L = {w ∈ {a, b} ∗ | w has even length and an odd number of a’s} This language is the intersection of the simpler languages L1 = {w ∈ {a, b} ∗ | w has even length} and L2 = {w ∈ {a, b} ∗ | w has an odd number of a’s}. (a) Give the diagram of a DFA accepting L1. Solution: qa s a b a fa b ε qb b fb a ε NFA22 Final CS 3800 Fall 2018 b a qa s a b a fa b b qb b fb a a DFA24 Final CS 3800 Fall 2018 qa s a b a fa a, b qb b fb a, b a, b q1 a, b a, b q2 a, b DFA25 Final CS 3800 Fall {1, 2, 3} {2, 3} ∅ b, c b a b a, c {1} {2} c a a, b, c c b a Final CS3800-2018F DFA26 MT∅ a, b b a {1} MT1 CS3800{1{1, 2, 3} a {1} {1, 3} b a a b b even length odd length a, b a, b DFA32 (b) Give the diagram of a DFA accepting L2. Solution: qa s a b a fa b ε qb b fb a ε NFA22 Final CS 3800 Fall 2018 b a qa s a b a fa b b qb b fb a a DFA24 Final CS 3800 Fall 2018 qa s a b a fa a, b qb b fb a, b a, b q1 a, b a, b q2 a, b DFA25 Final CS 3800 Fall {1, 2, 3} {2, 3} ∅ b, c b a b a, c {1} {2} c a a, b, c c b a Final CS3800-2018F DFA26 MT1 C∅ a, b b a {1} b a MT1 CS3800-20{1, 2{1, 2, 3} a {1} {1, 3} b a a b b beven length odd length a, b a, b DFA32 DFA33 b even a odd a’s ’s a a b (c) Use the construction of Lecture 5a to give the state diagram of a DFA