跳到主要内容

東京大学 情報理工学系研究科 コンピュータ科学専攻 2016年2月実施 問題2

Author

kainoj

Description

Let us consider nondeterministic finite automata with ε\varepsilon-transitions (ε\varepsilon-NFAs) over the alphabet Σ={a,b}\Sigma = \{a, b\}. An ε\varepsilon-NFA is an NFA that can additionally have "silent" transitions labeled with a fresh symbol ε\varepsilon. A word wΣw \in \Sigma^* is accepted by an ε\varepsilon-NFA MM if there exists a word w(Σ{ε})w' \in (\Sigma \cup \{\varepsilon\})^* such that:

  1. ww' is accepted by MM (when MM is considered an NFA over the alphabet Σ{ε}\Sigma \cup \{\varepsilon\}); and
  2. removing all the occurrences of ε\varepsilon in ww' gives rise to ww.

The language L(M)ΣL(M) \subseteq \Sigma^* of an ε\varepsilon-NFA MM is the set of words accepted by MM.

An example of an ε\varepsilon-NFA is given below; it is referred to as M1M_1. Here q0q_0 is an initial state and q2q_2 is an accepting state.

Answer the following questions:

(1) Give a regular expression that designates the language L(M1)L(M_1) of the above ε\varepsilon-NFA M1M_1.

(2) Give an NFA M2M_2 over Σ\Sigma such that: L(M2)=L(M1)L(M_2) = L(M_1); and M2M_2 is ε\varepsilon-free, that is, there are no transitions labeled with \varepsilon in M2M_2.

(3) Give an ε\varepsilon-NFA M3M_3 such that

L(M3)={wΣw contains aa as a subword, that is, w=w1aaw2 for some w1,w2Σ}.L(M_3) = \{ w \in \Sigma^* \mid w \text{ contains } aa \text{ as a subword, that is, } w = w_1 aa w_2 \text{ for some } w_1, w_2 \in \Sigma^* \}.

Your answer may be ε\varepsilon-free.

(4) Give an ε\varepsilon-NFA M4M_4 such that L(M4)=L(M1)L(M3)L(M_4) = L(M_1) \cup L(M_3), where M3M_3 is from Question (3). Your answer may be ε\varepsilon-free.

(5) Give an ε\varepsilon-NFA M5M_5 such that L(M5)=L(M1)L(M3)L(M_5) = L(M_1) \cap L(M_3), where M3M_3 is from Question (3). Your answer may be ε\varepsilon-free.

Kai

(1)

abaa^*b^*a^*

(2)

(3)

(4)

(5)

L(M5)L(M_5) contains aaaa and is of form of aaaba+abaaaaaa^*b^*a^* + a^*b^*aaa^*.