Solution Found!
Each of the following languages is the intersection of two
Chapter , Problem 1.4(choose chapter or problem)
Each of the following languages is the intersection of two simpler languages. In each part, construct DFAs for the simpler languages, then combine them using the construction discussed in footnote 3 (page 46) to give the state diagram of a DFA for the language given. In all parts, \(\Sigma=\{\mathrm{a}, \mathrm{b}\}\)
\(\text { a. }\{w \mid w \text { has at least three a's and at least two b's }\}\)
\({ }^{\text {A }} \mathbf{b} . \quad\{w \mid w \text { has exactly two a's and at least two b's }\}\)
\(\text { c. }\{w \mid w \text { has an even number of a's and one or two b's }\}\)
\({ }^{\mathrm{A}} \text { d. }\{w \mid w \text { has an even number of a's and each a is followed by at least one } \mathbf{b}\}\)
\(\text { e. }\{w \mid w \text { starts with an } \mathrm{a} \text { and has at most one } \mathrm{b}\}\)
\(\text { f. }\{w \mid w \text { has an odd number of a's and ends with a b }\}\)
\(\text { g. }\{w \mid w \text { has even length and an odd number of a's }\}\)
Questions & Answers
QUESTION:
Each of the following languages is the intersection of two simpler languages. In each part, construct DFAs for the simpler languages, then combine them using the construction discussed in footnote 3 (page 46) to give the state diagram of a DFA for the language given. In all parts, \(\Sigma=\{\mathrm{a}, \mathrm{b}\}\)
\(\text { a. }\{w \mid w \text { has at least three a's and at least two b's }\}\)
\({ }^{\text {A }} \mathbf{b} . \quad\{w \mid w \text { has exactly two a's and at least two b's }\}\)
\(\text { c. }\{w \mid w \text { has an even number of a's and one or two b's }\}\)
\({ }^{\mathrm{A}} \text { d. }\{w \mid w \text { has an even number of a's and each a is followed by at least one } \mathbf{b}\}\)
\(\text { e. }\{w \mid w \text { starts with an } \mathrm{a} \text { and has at most one } \mathrm{b}\}\)
\(\text { f. }\{w \mid w \text { has an odd number of a's and ends with a b }\}\)
\(\text { g. }\{w \mid w \text { has even length and an odd number of a's }\}\)
Step 1 of 8
A finite automata \(M\) is defined as:
\(M=\left(Q, \Sigma, \delta, q_{1}, F\right)\),
Where, \(Q\) is the set of states
\(\Sigma\) is the set of the alphabet.
\(\delta: Q \times \Sigma \rightarrow Q\) is the transition function.
\(q_{1}\) is the start state.
\(F \subseteq Q\) set of accepted states.
Two automation \(M_{1}, M_{2}\) are combined to form single automation as follows:
1. \(Q=\left\{\left(q_{1}, q_{2}\right) \mid q_{1} \in Q_{1}, q_{2} \in Q_{2}\right\}\) the states are written as Cartesian product of set of states in
both automation \(M_{1}, M_{2}\).
2. \(\Sigma=\Sigma_{1} \cup \Sigma_{2}\)
3. The transition function will be: \(\delta\left(\left(q_{1}, q_{2}\right), a\right)=\left(\delta\left(q_{1}, a\right), \delta\left(q_{2}, a\right)\right)\) .
4. \(q_{1}\) is the pair of initial states of both automation.
5. \(F\) is defined as: \(F=\left\{\left(q_{1}, q_{2}\right) \mid q_{1} \in F_{1}, q_{2} \in F_{2}\right\}\)