Let us consider nondeterministic finite automata with ε-transitions (ε-NFAs) over the alphabet Σ={a,b}.
An ε-NFA is an NFA that can additionally have "silent" transitions labeled with a fresh symbol ε.
A word w∈Σ∗ is accepted by an ε-NFA M if there exists a word w′∈(Σ∪{ε})∗ such that:
w′ is accepted by M (when M is considered an NFA over the alphabet Σ∪{ε}); and
removing all the occurrences of ε in w′ gives rise to w.
The languageL(M)⊆Σ∗ of an ε-NFA M is the set of words accepted by M.
An example of an ε-NFA is given below; it is referred to as M1. Here q0 is an initial state and q2 is an accepting state.
Answer the following questions:
(1) Give a regular expression that designates the language L(M1) of the above ε-NFA M1.
(2) Give an NFA M2 over Σ such that: L(M2)=L(M1); and M2 is ε-free, that is, there are no transitions labeled with \varepsilon in M2.
(3) Give an ε-NFA M3 such that
L(M3)={w∈Σ∗∣w contains aa as a subword, that is, w=w1aaw2 for some w1,w2∈Σ∗}.
Your answer may be ε-free.
(4) Give an ε-NFA M4 such that L(M4)=L(M1)∪L(M3), where M3 is from Question (3). Your answer may be ε-free.
(5) Give an ε-NFA M5 such that L(M5)=L(M1)∩L(M3), where M3 is from Question (3). Your answer may be ε-free.