08.01.2013 Views

LNCS 2950 - Aspects of Molecular Computing (Frontmatter Pages)

LNCS 2950 - Aspects of Molecular Computing (Frontmatter Pages)

LNCS 2950 - Aspects of Molecular Computing (Frontmatter Pages)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

214 Masami Ito and Ryo Sugiura<br />

Lemma 21 Let A, B ⊆ X ∗ be regular languages. Then A ⋄ B is a regular language.<br />

Pro<strong>of</strong>. By X we denote the new alphabet {a | a ∈ X}. LetA =(S, X, δ, s0,F)<br />

be a finite deterministic automaton with L(A) =A and let B =(T,X,θ,t0,G)<br />

be a finite deterministic automaton with L(B) =B. Define the automaton B =<br />

(T,X,θ, t0,G) as θ(t, a) = θ(t, a) for any t ∈ T and a ∈ X. Letρ be the<br />

homomorphism <strong>of</strong> (X ∪ X) ∗ onto X ∗ defined as ρ(a) =ρ(a) =a for any a ∈ X.<br />

Moreover, let L(B) =B. Thenρ(B) ={ρ(u) | u ∈ B} = B and ρ(A⋄B) =A⋄B.<br />

Hence, to prove the lemma, it is enough to show that A ⋄ B is a regular language<br />

over X ∪ X. Consider the automaton A⋄B =(S × T,X∪ X,δ⋄ θ, (s0,t0),F× G)<br />

where δ ⋄ θ((s, t),a)=(δ(s, a),t)andδ ⋄ θ((s, t), a) =(s, θ(t, a)) for any (s, t) ∈<br />

S×T and a ∈ X. Then it is easy to see that w ∈L(A⋄B) if and only if w ∈ A⋄B,<br />

i.e., A ⋄ B is regular. This completes the pro<strong>of</strong> <strong>of</strong> the lemma.<br />

Proposition 21 Let A, B ⊆ X ∗ be regular languages and let n be a positive<br />

integer. Then A ✄ [n] B is a regular language.<br />

Pro<strong>of</strong>. Let the notations <strong>of</strong> X, B and ρ be the same as above. Notice that<br />

A ✄ [n] B =(A ⋄ B) ∩ (X ∗ X ∗ ) n X ∗ .Since(X ∗ X ∗ ) n X ∗ is regular, A ✄ [n] B is<br />

regular. Consequently, A ✄ [n] B = ρ(A ✄ [n] B)isregular.<br />

Remark 21 The n-insertion <strong>of</strong> a context-free language into a context-free language<br />

is not always context-free. For instance, it is well known that A = {a n b n |<br />

n ≥ 1} and B = {c n d n | n ≥ 1} are context-free languages over {a, b} and {c, d},<br />

respectively. Since (A ✄ [2] B) ∩ a + c + b + d + = {a n c m b n d m | n, m ≥ 1} is not<br />

context-free, A✄ [2] B is not context-free. Therefore, for any n ≥ 2, n-insertion <strong>of</strong><br />

a context-free language into a context-free language is not always context-free.<br />

However, A ✄ [1] B is a context-free language for any context-free languages A<br />

and B (see [4]). Usually, a 1-insertion is called an insertion.<br />

Now consider the n-insertion <strong>of</strong> a regular (context-free) language into a<br />

context-free (regular) language.<br />

Lemma 22 Let A ⊆ X ∗ be a regular language and let B ⊆ X ∗ be a context-free<br />

language. Then A ⋄ B is a context-free language.<br />

Pro<strong>of</strong>. The notations which we will use for the pro<strong>of</strong> are assumed to be the<br />

same as above. Let A =(S, X, δ, s0,F) be a finite deterministic automaton with<br />

L(A) =A and let B =(T,X,Γ,θ,t0,ɛ) be a pushdown automaton with N (B) =<br />

B. LetB =(T,X,Γ,θ, t0,γ0,ɛ) be a pushdown automaton such that θ(t, a, γ) =<br />

θ(t, a, γ) for any t ∈ T,a ∈ X ∪{ɛ} and γ ∈ Γ .Thenρ(N (B)) = B. Now define<br />

the pushdown automaton A⋄B =(S × T,X ∪ X,Γ ∪{#},δ⋄ θ, (s0,t0),γ0,ɛ)as<br />

follows:<br />

1. ∀a ∈ X, δ ⋄ θ((s0,t0),a,γ0) ={((δ(s0,a),t0), #γ0)},<br />

δ ⋄ θ((s0,t0), a, γ0) ={((s0,t ′ ), #γ ′ ) | (t ′ ,γ ′ ) ∈ θ(t0, a, γ0)}.<br />

2. ∀a ∈ X, ∀(s, t) ∈ S × T,∀γ ∈ Γ ∪{#},δ⋄ θ((s, t),a,γ)={((δ(s, a),t),γ)}.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!