Introduction to Computational Linguistics
Introduction to Computational Linguistics
Introduction to Computational Linguistics
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
13. Complexity and Minimal Au<strong>to</strong>mata 45<br />
In Step 3 we collect in<strong>to</strong> H 3 all the q 3 such that there exists a q 2 ∈ H 2 such that<br />
x 3<br />
q 2 → q 3 . And so on. It is easy <strong>to</strong> see that<br />
(124) i 0<br />
x 0 x 1 ...x j<br />
−→ q j+1 iff q j+1 ∈ H j+1<br />
Hence, ⃗x ∈ L(A) iff H n ∩ F ∅. For then there exists an accepting state in H n .<br />
Here each step takes time quadratic in the number of states: for given H j , we<br />
compute H j+1 by doing Q many lookups for every q ∈ H j . However, this number<br />
is basically bounded for given A. So the time requirement is down <strong>to</strong> a constant<br />
depending on A times the length of ⃗x. This is much better. However, in practical<br />
terms this is still not good enough. Because the constant it takes <strong>to</strong> compute a<br />
single step is <strong>to</strong>o large. This is because we recompute the transition H j <strong>to</strong> H j+1 .<br />
If the string is very long, this means that we recompute the same problem over<br />
and over. Instead, we can precompute all the transitions. It turns out that we can<br />
define an au<strong>to</strong>ma<strong>to</strong>n in this way that we can use in the place of A.<br />
Definition 10 Let A = 〈A, Q, i 0 , F, δ〉 be an au<strong>to</strong>ma<strong>to</strong>n. Put F ℘ := {U ⊆ Q :<br />
U ∩ F ∅}. And let<br />
(125) δ ℘ = {〈H, a, J〉 : for all q ∈ H there is q ′ ∈ J: q a → q ′ }<br />
Then<br />
(126) A ℘ = 〈A, ℘(Q), {i 0 }, F ℘ , δ ℘ 〉<br />
is called the exponential of A.<br />
Definition 11 An au<strong>to</strong>ma<strong>to</strong>n is deterministic if for all q ∈ Q and a ∈ A there is at<br />
most one q ′ ∈ Q such that q a → q ′ .<br />
It is clear that for a deterministic and <strong>to</strong>tal au<strong>to</strong>ma<strong>to</strong>n, all we have <strong>to</strong> do is <strong>to</strong><br />
look up the next state in (??), which exists and is unique. For these au<strong>to</strong>mata,<br />
recognizing the language is linear in the string.<br />
Theorem 12 For every au<strong>to</strong>ma<strong>to</strong>n A, the exponential A ℘ is <strong>to</strong>tal and deterministic.<br />
Moreover, L(A ℘ ) = L(A).