Complementing Unary Nondeterministic Automata
Filippo Mera and Giovanni Pighizzini
Dipartimento di Informatica e Comunicazione Universit` a degli Studi di Milano, Italy
Complementing Unary Nondeterministic Automata Filippo Mera and - - PDF document
Complementing Unary Nondeterministic Automata Filippo Mera and Giovanni Pighizzini Dipartimento di Informatica e Comunicazione Universit` a degli Studi di Milano, Italy PROBLEM Comparing the number of states needed to ac- cept a language and
Filippo Mera and Giovanni Pighizzini
Dipartimento di Informatica e Comunicazione Universit` a degli Studi di Milano, Italy
PROBLEM Comparing the number of states needed to ac- cept a language and its complement, i.e., Given an n-state automaton accepting L, how many states are necessary and sufficient to accept LC? Deterministic Automata Trivial: it suffices to complement the set of final states. Nondeterministic Automata Upper bound: 2n (just convert to a deterministic automaton). This bound cannot be improved [Next talk].
Investigation of this problem for the unary case.
L is accepted by a “small” nfa
each nfa accepting LC must be “large”
What do “small” and “large” mean? Small: The automaton and the language it ac- cepts are witnesses of the gap between nfa’s and dfa’s, i.e., the nfa has n-states and each dfa accepting the same language has at least eΘ
√
n ln n
Large: The automaton has at least as many states as a deterministic automaton (non- determinism is thus useless.)
A
✲ ✒✑ ✓✏ ✲ ✒✑ ✓✏ ✲ ✒✑ ✓✏
µ states
✒✑ ✓✏ ❥ ✒✑ ✓✏ ✒ ✒✑ ✓✏ ✛ ✒✑ ✓✏ ✎
λ states
Any unary regular language is ultimately cyclic. It is cyclic for words of length ≥ µ, being (λ, µ) the size of a dfa accepting it. If A is minimum then λ is the ultimate period of the language considered.
✲ ✗ ✖ ✔ ✕
a ✲
✗ ✖ ✔ ✕
a ✲
✗ ✖ ✔ ✕
a
❅ ❅ ❅ ❅ ❅ ❘
a
✗ ✖ ✔ ✕ ✗ ✖ ✔ ✕ ✲
a
✛ a ✗ ✖ ✔ ✕ ✗ ✖ ✔ ✕ ✗ ✖ ✔ ✕ ✛ a ❄
a
a
✓ ✒ ✏ ✑ ✓ ✒ ✏ ✑ ✓ ✒ ✏ ✑
Theorem [Chr86]: Any nfa with n states can be simulated with an nfa in Chrobak Normal Form having size at most
State complexity of a regular language: sc (L) ≡ number of states
automaton accepting it. Nondeterministic state complexity: nsc (L) ≡ number of states
automaton accepting it. Theorem [Jiang, McDowell, Ravikumar 91] If λ is the ultimate period of L and λ factorizes as p1k1 · p2k2 · · · · · psks, then we have nsc (L) ≥ p1k1 + p2k2 + · · · + psks.
If a unary language L with ultimate pe- riod λ = p1k1 · p2k2 · · · · · psks is accepted by an nfa A with p1k1 + p2k2 + · · · + psks states in its cycles, then LC requires at least λ cyclic states. Notes:
with respect to the ultimate period of L
the number of states for automata accepting LC
Proof(sketch) W.l.o.g. A is in Chrobak Normal Form with cy- cles of lengths p1k1, . . . , psks Choose mi and m such that:
∈ L, and
i )
(Chinese Remainder Theorem). Then:
∈ L.
Let p be the length of a cycle of the automa- ton A′ accepting LC visited during an accepting computation on am. Then:
i x, i = 1, . . . , s,
x ≥ 0. Hence, for i = 1, . . . , s, there are no integers x, y ≥ 0 such that m + py = mi + pikix, But m = mi + hpiki + piki−1, for some integer h. Hence, there are no integers x, y ≥ 0 such that hpiki + piki−1 = pikix − py This implies that piki | p, for i = 1, . . . , s.
Nonunary alphabets Main Theorem cannot be extended to nonunary languages: Theorem A sequence Ln of languages can be exhibited such that:
(Ln is thus a witness of the gap between nondeterministic and deterministic automata) and
≤ n + 1
Question What can be said about the converse of Main Theorem? i.e., does the fact that each nfa accepting L is “large” imply that LC has a “small” nfa? The answer is negative: Theorem Let p1k1 · p2k2 · · · · · psks be the prime fac- torization for an arbitrary integer λ and consider Lλ = {am | #{i | pki
i
divides m} is even}. We have both nsc (Lλ) = λ and nsc
= λ. The smallest nfa accepting Lλ (or LλC) is actu- ally a dfa made of a single cycle of length λ.
Sketch of the proof in the case of λ = p1k1 · · · · · psks, with s even. We show that each nfa A accepting the language Lλ = {am | #{i | pki
i
divides m} is even} contains one simple cycle of at least λ states. Consider the length ℓ of a simple cycle crossed in an accepting computation C on an input aλH, for a sufficiently large H. Let mj = Hλ + ℓ λ
p
kj j
, for j = 1, . . . , s. By “pumping” the computation C with the cycle
Since each pki
i , with i = j, divides mj, this im-
plies that even pkj
j
must divide mj. Hence, we can easily conclude that each pkj
j
di- vides ℓ and, finally, that λ divides ℓ.
Conclusions and open problems We have been studying the problem in its “ex- treme” case, investigating languages that wit- ness the gap considered. Problem: Bounds should be found, that simultane-
for unary languages. In other words, it is of some interest to investi- gate the trade-off between the nondeterministic complexity of unary languages and that of their complements.