跳到主要内容

東京大学 情報理工学系研究科 コンピュータ科学専攻 2019年8月実施 専門科目I 問題1

Author

Description

Let Σ\Sigma be a finite alphabet (i.e., a finite set of letters), and ϵ\epsilon be the empty sequence. We define the shuffle w1w2Σw_1 \otimes w_2 \subseteq \Sigma^* of two words w1,w2Σw_1, w_2 \in \Sigma^* as follows.

  • For every wΣw \in \Sigma^*,
ϵw=wϵ={w}.\epsilon \otimes w = w \otimes \epsilon = \{w\}.
  • For every a,bΣa, b \in \Sigma and w1,w2Σw_1, w_2 \in \Sigma^*,
(aw1)(bw2)={awww1(bw2)}{bww(aw1)w2}.(aw_1) \otimes (bw_2) = \{aw \mid w \in w_1 \otimes (bw_2)\} \cup \{bw \mid w \in (aw_1) \otimes w_2\}.

Furthermore, for two languages L1,L2ΣL_1, L_2 \subseteq \Sigma^*, their shuffle L1L2ΣL_1 \otimes L_2 \subseteq \Sigma^* is defined by:

L1L2=w1L1,w2L2w1w2.L_1 \otimes L_2 = \bigcup_{w_1 \in L_1, w_2 \in L_2} w_1 \otimes w_2.

For example, we have:

{ab,ba}{ϵ,c}=(abϵ)(abc)(baϵ)(bac)={ab,cab,acb,abc,ba,cba,bca,bac}.\{ab, ba\} \otimes \{\epsilon, c\} = (ab \otimes \epsilon) \cup (ab \otimes c) \cup (ba \otimes \epsilon) \cup (ba \otimes c) = \{ab, cab, acb, abc, ba, cba, bca, bac\}.

Answer the following questions.

(1) Compute {a,bb}{ab,cc}\{a, bb\} \otimes \{ab, cc\}.

(2) Suppose that deterministic finite automata A1=(Q1,Σ,δ1,q1,0,F1)\mathcal{A}_1 = (Q_1, \Sigma, \delta_1, q_{1,0}, F_1) and A2=(Q2,Σ,δ2,q2,0,F2)\mathcal{A}_2 = (Q_2, \Sigma, \delta_2, q_{2,0}, F_2) accept languages L1L_1 and L2L_2, respectively. Here, Qi,δi,qi,0,Q_i, \delta_i, q_{i,0}, and FiF_i are respectively the set of states, the transition function, the initial state, and the set of final states of Ai (i{1,2})\mathcal{A}_i \ (i \in \{1, 2\}). You may assume that the transition functions δiQi×ΣQi (i{1,2})\delta_i \in Q_i \times \Sigma \rightarrow Q_i\ (i \in \{1, 2\}) are total functions. Give a non-deterministic automaton that accepts L1L2L_1 \otimes L_2.

(3) Prove the correctness of your answer for question (2) above.

(4) Let L3={anbnn0}L_3 = \{a^nb^n \mid n \geq 0\} and L4={cmdmm0}L_4 = \{c^md^m \mid m \geq 0\}. Prove that L3L4L_3 \otimes L_4 is not a context-free language. Here, you may use the pumping lemma for context-free languages.

Kai