Introduction to Computational Linguistics
Introduction to Computational Linguistics
Introduction to Computational Linguistics
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
12. Finite State Au<strong>to</strong>mata 41<br />
The proof is by induction on the length of ⃗u. It is now easy <strong>to</strong> see that L(A × B) =<br />
L(A)∩L(B). For ⃗u ∈ L(A×B) if and only if 〈i A 0 , iB 0 〉 ⃗u → 〈x 0 , x 1 〉, which is equivalent<br />
<strong>to</strong> i A 0<br />
⃗u<br />
→ x 0 and i B 0<br />
⃗u<br />
→ x 1 . The latter is nothing but ⃗u ∈ L(A) and ⃗u ∈ L(B).<br />
Now, assume that A and B are <strong>to</strong>tal. Define the set G := F A × Q B ∪ Q A ×<br />
F B . Make G the accepting set. Then the language accepted by this au<strong>to</strong>ma<strong>to</strong>n is<br />
L(A) ∪ L(B) = s ∪ t. For suppose u is such that 〈i A 0 , iB 0 〉 ⃗u → q ∈ G. Then either<br />
q = 〈q 0 , y〉 with q 0 ∈ F A and then ⃗u ∈ L(A), or q = 〈x, q 1 〉 with q 1 ∈ F B . Then<br />
⃗u ∈ L(B). The converse is also easy.<br />
Here is another method.<br />
Definition 7 Let L ⊆ A ∗ be a language. Then put<br />
(119) L p = {⃗x : there is ⃗y such that ⃗x ⌢ ⃗y ∈ L}<br />
Let s be a regular term. We define the prefix closure as follows.<br />
(120a)<br />
(120b)<br />
(120c)<br />
(120d)<br />
(120e)<br />
(120f)<br />
0 † := ∅<br />
a † := {ε, a}<br />
ε † := {ε}<br />
(s ∪ t) † := s † ∪ t †<br />
(st) † := {su : u ∈ t † } ∪ s †<br />
(s ∗ ) † := s † ∪ {s ∗ u : u ∈ s † }<br />
Notice the following.<br />
Lemma 8 ⃗x is a prefix of some string from s iff ⃗x ∈ L(t) for some t ∈ s † . Hence,<br />
⋃<br />
(121) L(s) p = L(t)<br />
t∈s †<br />
Proof. Suppose that t ∈ s † . We show that L(t) is the union of all L(u) where<br />
u ∈ s † . The proof is by induction on s. The case s = ∅ and s = ε are actually easy.<br />
Next, let s = a where a ∈ A. Then t = a or t = ε and the claim is verified directly.