東京大学 情報理工学系研究科 コンピュータ科学専攻 2019年8月実施 専門科目I 問題1
Author
Description
Let Σ be a finite alphabet (i.e., a finite set of letters), and ϵ be the empty sequence. We define the shuffle w1⊗w2⊆Σ∗ of two words w1,w2∈Σ∗ as follows.
- For every w∈Σ∗,
ϵ⊗w=w⊗ϵ={w}.
- For every a,b∈Σ and w1,w2∈Σ∗,
(aw1)⊗(bw2)={aw∣w∈w1⊗(bw2)}∪{bw∣w∈(aw1)⊗w2}.
Furthermore, for two languages L1,L2⊆Σ∗, their shuffle L1⊗L2⊆Σ∗ is defined by:
L1⊗L2=w1∈L1,w2∈L2⋃w1⊗w2.
For example, we have:
{ab,ba}⊗{ϵ,c}=(ab⊗ϵ)∪(ab⊗c)∪(ba⊗ϵ)∪(ba⊗c)={ab,cab,acb,abc,ba,cba,bca,bac}.
Answer the following questions.
(1) Compute {a,bb}⊗{ab,cc}.
(2) Suppose that deterministic finite automata A1=(Q1,Σ,δ1,q1,0,F1) and A2=(Q2,Σ,δ2,q2,0,F2) accept languages L1 and L2, respectively. Here, Qi,δi,qi,0, and Fi are respectively the set of states, the transition function, the initial state, and the set of final states of Ai (i∈{1,2}). You may assume that the transition functions δi∈Qi×Σ→Qi (i∈{1,2}) are total functions. Give a non-deterministic automaton that accepts L1⊗L2.
(3) Prove the correctness of your answer for question (2) above.
(4) Let L3={anbn∣n≥0} and L4={cmdm∣m≥0}. Prove that L3⊗L4 is not a context-free language. Here, you may use the pumping lemma for context-free languages.
Kai