a | b | |
---|---|---|
q0 | q2 | q1 |
q1 | q7 | q4 |
q2 | q0 | q1 |
q3 | q4 | q2 |
q4 | q6 | q3 |
q5 | q4 | q0 |
q6 | q0 | q7 |
q7 | q5 | q3 |
In a minimal DFA, no two states are indistinguishable. In naming your states, use the names of the original states. For example, if you find that {q1, q4, q5} is an equivalence class of the Indistinguishablity relation of the given DFA, then name the resulting state in the minimal DFA q1,4,5.
2. Present a right-linear grammar that generates the language accepted by the DFA of Problem 1. Use the construction shown in Theorem 3.4 of Linz to obtain the grammar. (In particular, use the names of the states as the variables (i.e. nonterminals) of the grammar.)
3. For a language L, define truncate(L) = { w : wv ∈ L ∧ |v|=1 }. In other words, this language is obtained by taking every nonempty string in L and "chopping off" its last symbol.
The sample solution to HW #2's Problem 8 gave a constructive proof showing that, if L is regular, so is truncate(L). Here you are asked to present a non-constructive proof of the same statement, making use of Linz's Theorem 4.4.
4. (a) Use the construction described in Linz's Theorem 4.1 to obtain an NFA M that accepts the intersection of the languages accepted by the two NFA's whose transition graphs are shown below.
(b) Describe how you would modify the NFA that is your answer to part (a) so that it accepts the union of the languages accepted by the given NFA's.
5. For a language L ⊆ Σ*, define tail(L) = { y : xy ∈L for some x ∈ Σ*}.
That is, the tail of a language is the set of all suffixes of its members.
Show that the family of regular languages is closed under the tail operation. In other words, show that if L is regular, then so is tail(L). As in Problem 3(a), use a constructive proof.
Hint: Add λ transitions to an NFA that accepts L.
6. For a language L, let min(L) = { w ∈ L : no proper prefix of w is a member of L }.
Present a constructive proof that, if L is regular, so is min(L).
7. Among the following three equations, two of them hold for all homomorphisms h and languages L1 and L2. Identify the one that does not always hold and present a counterexample to demonstrate it. That is, identify a specific homomorphism h and specific languages L1 and L2 for which the equation is false.
(1) | h(L1 ∪ L2) | = | h(L1) ∪ h(L2) |
---|---|---|---|
(2) | h(L1 ∩ L2) | = | h(L1) ∩ h(L2) |
(3) | h(L1 · L2) | = | h(L1) · h(L2) |