0% found this document useful (0 votes)
45 views12 pages

Minimal DFA For Symmetric Difference NFA

This document discusses minimal deterministic finite automata (DFAs) obtained through determinization of symmetric difference nondeterministic finite automata (⊕-NFAs). It presents two main results: 1) A characterization is given for when determinization of a ⊕-NFA results in a minimal DFA, showing that the same characterization from previous work on regular NFAs also applies to ⊕-NFAs. 2) It is shown that determinization of any minimal ⊕-NFA produces a minimal DFA. The document provides background on ⊕-NFAs and weighted automata over semirings to establish definitions and properties needed to prove the main results.

Uploaded by

Rahul Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views12 pages

Minimal DFA For Symmetric Difference NFA

This document discusses minimal deterministic finite automata (DFAs) obtained through determinization of symmetric difference nondeterministic finite automata (⊕-NFAs). It presents two main results: 1) A characterization is given for when determinization of a ⊕-NFA results in a minimal DFA, showing that the same characterization from previous work on regular NFAs also applies to ⊕-NFAs. 2) It is shown that determinization of any minimal ⊕-NFA produces a minimal DFA. The document provides background on ⊕-NFAs and weighted automata over semirings to establish definitions and properties needed to prove the main results.

Uploaded by

Rahul Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Minimal DFA for Symmetric Difference NFA?

Brink van der Merwe1 , Hellis Tamm2 , and Lynette van Zijl1
1
Department of Computer Science
Stellenbosch University, Private Bag X1, 7602 Matieland, South Africa
[email protected],[email protected]
2
Institute of Cybernetics, Tallinn University of Technology,
Akadeemia tee 21, 12618 Tallinn, Estonia
[email protected]

Abstract. Recently, a characterization of the class of nondeterministic


finite automata (NFAs) for which determinization results in a minimal
deterministic finite automaton (DFA), was given in [2]. We present a
similar result for the case of symmetric difference NFAs. Also, we show
that determinization of any minimal symmetric difference NFA produces
a minimal DFA.

Keywords: nondeterminism, minimality

1 Introduction

Regular languages, and more specifically compact representations of regular lan-


guages, are important in many areas in computer science. The state minimization
of deterministic finite automata (DFAs) is well-known [1, 8], but the state min-
imization of nondeterministic finite automata (NFAs) is more complicated [9,
10]. Symmetric difference NFAs (⊕-NFAs) are of interest for their ability to
succinctly describe regular languages [16].
In practical applications, it is often required to find the DFA equivalent to
a given NFA (that is, to determinize the NFA). This is accomplished by the
so-called subset construction, employing the union set operation for NFAs and
the symmetric difference set operation for ⊕-NFAs. It is however quite possible
that the equivalent DFA may have exponentially more states than the NFA or
⊕-NFA, and would need further minimization to reduce its number of states.
It is therefore a notable advantage to be able to test in advance whether the
determinization of a given NFA or ⊕-NFA would result in a minimal DFA. This
issue was investigated by Brzozowski and Tamm [2] for the case of NFAs. They
introduced so-called atoms of a regular language as non-empty intersections of
uncomplemented or complemented left quotients of the language, and atomic
?
This research was supported by the Estonian Center of Excellence in Computer
Science, EXCS, financed by the European Regional Development Fund, by the Es-
tonian Science Foundation grant 7520, and by the Estonian Ministry of Education
and Research target-financed research theme no. 0140007s12.
NFAs in which the right language of every state is a union of atoms. It was
shown in [2] that determinization of an NFA results in a minimal DFA if and
only if the reverse of the given NFA is atomic.
In this work we show that the same characterization of when determinization
leads to a minimal DFA, holds in the case of ⊕-NFAs. Also, we show that it is
sufficient to require that a ⊕-NFA be minimal in order to obtain a minimal DFA
by determinization.
The layout of the article is as follows. In Section 2 we define ⊕-NFAs and
give some basic examples. Some properties of minimal ⊕-NFAs, that are used to
obtain one of our main results, are given in Section 3. In Section 4, the notions
of atomic and ⊕-atomic ⊕-NFAs are introduced. The main results, specifying
conditions to obtain a minimal DFA on determinizing a ⊕-NFA, are presented
in Section 5, followed by conclusions in Section 6.

2 Symmetric Difference NFA Definitions

⊕-NFAs are typically defined by using the symmetric difference set operation, in
contrast to the union set operation as in the case of NFAs. We give this definition,
in order to be consistent with previous literature, but also equivalently consider
⊕-NFAs as weighted automata over the semiring Z2 (the Galois field with two
elements).
We begin this section by recalling the definitions for a semiring and for
weighted automata.

Definition 1. (from [6], [7]) A tuple (S, ⊕, ⊗, 0̄, 1̄) is a semiring if (S, ⊕, 0̄) is a
commutative monoid with identity element 0̄, (S, ⊗, 1̄) is a monoid with identity
element 1̄, ⊗ distributes over ⊕, and 0̄ is an annihilator for ⊗: for all a ∈ S,
a ⊗ 0̄ = 0̄ ⊗ a = 0̄.

Example 1.
a) The Boolean semiring is the two element semiring over true (true being 1̄)
and false (false being 0̄) using and as ⊗ and or as ⊕.
b) The symmetric difference semiring (Z2 ), is obtained by replacing or with
exclusive or in the definition of the Boolean semiring.
c) The tropical semiring is the semiring (N∪{+∞}, min, +, +∞, 0), also known
as the min-plus semiring, with min and + extended to N ∪ {+∞} in the
natural way (N denotes the natural numbers, including 0).

Definition 2. (from [6], [7]) A weighted automaton (without ε-transitions)


over a semiring (S, ⊕, ⊗, 0̄, 1̄) is a 5-tuple A = (Q, Σ, δ, I, F ), where Q is a
finite set of states, Σ is the finite input alphabet, δ : Σ → S Q×Q the transition
function, I : Q → S an initial weight function and F : Q → S the final weight
function.

Note that δ(a) is a Q × Q-matrix whose (p, q)-th entry δ(a)p,q ∈ S indicates
the weight of the transition from p to q on the symbol a.

2
Let S be a semiring and A a weighted automaton over S. A path in A is
an alternating sequence P = q0 a1 q1 . . . qn−1 an qn ∈ Q(ΣQ)∗ . Its run weight is
the product rw(P ) = I(q0 ) ⊗ δ(a1 )q0 ,q1 ⊗ δ(a1 )q1 ,q2 ⊗ . . . ⊗ δ(an )qn−1 ,qn F (qn ).
The label of a path P = q0 a1 q1 . . . qn−1 an qn ∈ Q(ΣQ)∗ , denoted by label(P ),
is the word a1 . . . an ∈ Σ ∗ . The behaviour of a weighted automaton A is the
function kAk : Σ ∗ → S defined by kAk(w) = ⊕label(P )=w rw(P ). One can check
T
that kAk(w1 . . . wn ) = Iδ(w1 ) . . . δ(wn )F , with usual matrix multiplication,
T
considering I and F as row vectors and and denoting by F the column vector
obtained by transposing F .
Note that the Boolean semiring and Z2 are the only semirings with two
elements. In the case of two element semirings, we can interpret weights as
acceptance and rejection (words with weight 1 are accepted). Also, weighted au-
tomata over the Boolean semiring and over Z2 accept the same class of languages,
namely, the regular languages.
⊕-NFAs are in fact precisely weighted automata over Z2 , but in order to stay
consistent with previous work on the topic, we next give the standard definition
for ⊕-NFAs.

Definition 3. A ⊕-NFA N is a 5-tuple (Q, Σ, δ, I, F ), where Q is the finite


non-empty set of states, Σ is the finite non-empty input alphabet, I ⊆ Q is
the set of initial states, F ⊆ Q is the set of final states and δ is the transition
function such that δ : Q × Σ → 2Q . t
u

The transition function δ can be extended to δ : 2Q × Σ → 2Q by defining


M
δ(P, a) = δ(q, a)
q∈P

for any a ∈ Σ and P ∈ 2Q . We define δ ∗ : 2Q × Σ ∗ → 2Q by δ ∗ (P, ) = P and


δ ∗ (P, aw) = δ ∗ (δ(P, a), w) for any a ∈ Σ, w ∈ Σ ∗ and P ∈ 2Q . We will denote
δ ∗ also by δ.
Let N = (Q, Σ, δ, I, F ) be a ⊕-NFA and let w be a word in Σ ∗ . Then N
accepts w if and only if |F ∩δ(I, w)| mod 2 6= 0. In other words, a ⊕-NFA accepts
a word w by parity – if there is an odd number of accepting paths for w in the
execution tree, then w is accepted; else it is rejected. Note that acceptance for ⊕-
NFAs is in accordance with how acceptance are defined for weighted automata.
The language accepted by N , indicated by L(N ), is the set of all words accepted
by N . Given any two subsets of states G, H ⊆ Q of N , we define the language
from G to H as the set of words LG,H (N ) = {w ∈ Σ ∗ | |H ∩δ(G, w)| mod 2 6= 0}.
If G = {q}, we will use the notation Lq,H , and similarly if H (or both G and H)
consists of a single state. Then the left language of a state q of N is LI,q (N ),
and the right language of q is Lq,F (N ). Note that L(N ) = LI,F (N ).
By determinizing N , we get a complete DFA N D , which is defined as follows:

Definition 4. Let N = (Q, Σ, δ, I, F ) be a ⊕-NFA. Then the complete DFA


N D = (QD , Σ, δ D , q0 , F D ), obtained by determinizing N , is defined as follows:

3
a

q1 q2 q3 q1 q2 q3 q1 q3
a a a a a
a
a
a a a
q2 q3 q1 q2 q1 q2 q3

Fig. 1. The ⊕-NFA and corresponding DFA for Example 2.

- QD = {δ(I, w) | w ∈ Σ ∗ };
- for J ∈ QD ⊆ 2Q , and a ∈ Σ, δ D (J, a) = ⊕q∈J δ(q, a), with δ D (∅, a) = ∅ for
all a ∈ Σ, if ∅ ∈ QD ;
- the start state q0 of N D is the set I;
- the final states F D of N D is the set {K ∈ QD | |K ∩ F | mod 2 6= 0}.

Example 2. Let N = ({q1 , q2 , q3 }, {a}, δ, {q1 }, {q3 }) be a ⊕-NFA where δ is given


by δ(q1 ) = {q2 }, δ(q2 ) = {q3 }, and δ(q3 ) = {q1 , q3 }.
Figure 1 shows a graphical representation of N ; note that there is no visual
difference from a traditional NFA. To find the DFA N D equivalent to N , we
apply the subset construction using the symmetric difference operation instead
of union. The transition function δ D of N D is given by
D D D D
{q1 } →δ {q2 } →δ {q3 } →δ {q1 , q3 } →δ
δD δD D
{q1 , q2 , q3 } → {q1 , q2 } → {q2 , q3 } →δ {q1 } ,

and the final states by {{q3 }, {q1 , q3 }, {q1 , q2 , q3 }, {q2 , q3 }}.

As is the case for weighted automata in general, one can encode the transition
table of a unary ⊕-NFA N as a binary matrix m(δ(a)):

1 if qj ∈ δ(qi , a)
m(δ(a))ij =
0 otherwise,
and successive matrix multiplications in the Galois field Z2 reflect the subset
construction on N .
m(δ(a)) is called the characteristic matrix of N , and c(x) = det(m(δ(a))−xI),
where I is the identity matrix of the appropriate size, is known as its character-
istic polynomial.
Similarly, we can encode any set of states B ⊆ Q as an n-entry row vector
v(B) by defining

1 if qi ∈ B
v(B)i =
0 otherwise .
We place an arbitrary but fixed order on the elements of Q. We refer to v(B)
as the vector encoding of B, and to B as the set encoding of v(B). Note that
v(B1 ) + v(B2 ) = v(B1 ⊕ B2 ).

4
The matrix product v(I)m(δ(a)) encodes the states reachable from the initial
states after reading one letter, v(I)m(δ(a))2 encodes the states reachable after
two letters, and in general v(I)m(δ(a))k encodes the states reachable after k
letters. Standard linear algebra shows the following:

N accepts ak if and only if v(I)m(δ(a))k v(F )T = 1,

where v(F )T denotes the transpose of the row vector v(F ). In the general case
where we consider also non-unary symmetric difference automata, one can asso-
ciate a matrix m(δ(a)) to each symbol a ∈ Σ. Then a word w = w1 . . . wk , with
wi ∈ Σ, is accepted if and only if:
v(I)m(δ(w1 )) . . . m(δ(wk ))v(F )T = 1.
Note that if N is an n-state ⊕-NFA with initial vector v(I), final vector
v(F ) and transition matrices m(δ(a)), and A is a n × n non-singular matrix with
inverse A−1 , then the ⊕-NFA NA with initial vector v(I)A, final vector A−1 v(F )
and transition matrices A−1 m(δ(a))A, accepts the same language as N , since:

v(I)m(δ(w1 )) . . . m(δ(wk ))v(F )T


= v(I)AA−1 m(δ(w1 ))A . . . A−1 m(δ(wk ))AA−1 v(F )T .

It is shown in [17] that if N and N 0 are minimal ⊕-NFAs for the same language
L, then we can find a non-singular matrix A such that N 0 = NA . We will refer
to the process of changing from N to NA as making a change of basis by using
A.

Definition 5. The mirror image or reverse of a string x = x1 . . . xn is the string


xR = xn . . . x1 . The reverse LR of a language L is defined to be {xR | x ∈ L}.

Given a ⊕-NFA N = (Q, Σ, δ, I, F ), its reverse is N R = (Q, Σ, δ R , F, I),


where q ∈ δ R (p, a) if and only if p ∈ δ(q, a). In terms of vectors and matrices,
the initial and final vectors are exchanged, and the transpose (that is, exchanging
rows and columns) of the transition matrices of N is taken, in order to obtain
the initial and final vectors and transition matrices of N R . Note that

v(I)m(δ(w1 )) . . . m(δ(wk ))v(F )T = v(F )T m(δ(wk ))T . . . m(δ(w1 ))T v(I)T .

Thus L(N R ) = (L(N ))R .

Example 3. Consider the ⊕-NFA N in Example 2. Its characteristic matrix is


 
010
m(δ(a)) =  0 0 1 
101

and its characteristic polynomial is c(x) = x3 + x2 + 1. Interested readers may


note that c(x) is a primitive polynomial in Z2 . The fact that c(x) is primitive
implies that we obtain 23 − 1 = 7 states when determinizing the given ⊕-NFA

5
N (see [16]). It can be shown that N is minimal, and that N D is a minimal DFA
([16]), which is always the case when determinizing a minimal ⊕-NFA, as we
will show later in Theorem 4. If we encode the start state as a row vector v(I),
with only the first component of v(I) equal to one, and compute v(I)m(δ(a))k ,
we end up with the k-th entry in the on-the-fly subset construction on N . For
example, with the start state q1 encoded as v(I) = [ 1 0 0 ], we see that
 
111
m(δ(a))4 =  1 1 0  ,
011

and hence v(I)m(δ(a))4 is given by [ 1 1 1 ]. This corresponds to the state


[ q1 , q2 , q3 ], which is reached after four applications of the subset construction on
N . Similarly, v(I)m(δ(a))6 is given by [ 0 1 1 ], which corresponds to [ q2 , q3 ].

In [15] we formally showed that the state behaviour of a unary ⊕-NFA is


the same as that of a linear feedback shift register (LFSR). The similarity is
intuitively straightforward, as an LFSR is a linear machine over Z2 , and we can
encode a unary ⊕-NFA as a linear machine over Z2 as shown above. This cor-
respondence means that we can exploit the literature on LFSRs to analyse the
behaviour of unary ⊕-NFAs, and in particular their cyclic behaviour (see, for
example, [5] or [13]). For ⊕-NFAs in general (whether unary or non-unary), stan-
dard techniques in linear algebra are often used. For example, to obtain a more
convenient form of transition matrices, a change of basis can be performed [14].

3 Properties of Minimal ⊕-NFAs


In this section we study properties of minimal ⊕-NFAs, which are used to obtain
one of our main results that determinization of a minimal ⊕-NFA leads to a
minimal DFA.

Proposition 1. A ⊕-NFA N is minimal if and only if N R is minimal.

Proof. Suppose N is a minimal ⊕-NFA. Then N R is obtained from N by in-


terchanging the initial and the final states and by taking the transpose of the
transition matrices for each letter in Σ. If N R is not minimal, we can rewrite its
transition matrices with fewer rows and columns to obtain N 0 , where N 0 accepts
the same language as N R . If we now reverse N 0 by transposing its transition
matrices, we obtain a ⊕-NFA which accepts (L(N R ))R , that is, L(N ). This is a
contradiction, as N is minimal. The converse holds by the same argument. t u

For a ⊕-NFA N = (Q, Σ, δ, I, F ), the kernel of N is defined as the set of


subsets I 0 ⊆ Q, such that if we obtain N 0 from N by replacing I with I 0 , then
L(N 0 ) = ∅.

Definition 6. The kernel K(N ) of a ⊕-NFA N = (Q, Σ, δ, I, F ) is the set


{J ⊆ Q | LJ,F (N ) = ∅}.

6
Note that we always have ∅ ∈ K(N ).
The range of a ⊕-NFA N = (Q, Σ, δ, I, F ) is defined as the linear subspace
of 2Q generated by subsets of the form δ(I, w).

Definition 7. The range R(N ) of a ⊕-NFA N = (Q, Σ, δ, I, F ) is the set of


subsets of Q of the form δ(I, w1 ) ⊕ . . . ⊕ δ(I, wk ), with w1 , . . . , wk ∈ Σ ∗ , k ≥ 0,
where we assume that for k = 0 we obtain the empty set.

The notion of being trim for ⊕-NFAs is defined analogously to the case of
(union) NFAs. Instead of also removing states from which final states can not
be reached, as in the case of (union) NFAs, we rather consider these as states
that should be trimmed from N R .

Definition 8. A ⊕-NFA N is trim if R(N ) = 2Q .

Let N be the single state ⊕-NFA with no transitions. Then N is a minimal


⊕-NFA for ∅, but R(N ) = {∅}. For the remainder of this paper, we either have to
assume that the minimal ⊕-NFA for the empty language is the empty ⊕-NFA, or
we should exclude the empty language from our discussions. To avoid technical
complications, we thus do not consider the empty language in the remainder of
this paper.
Next we show that ⊕-NFAs can be trimmed by making a change of basis.

Proposition 2. Let N be a ⊕-NFA. Then there is a change of basis from N to


NA , such that the ⊕-NFA obtained from NA by removing all unreachable states
from the initial states (in the usual graph theoretic sense), is trim.

Proof. Assume that N = (Q, Σ, δ, I, F ). The proposition follows from the follow-
ing standard fact from linear algebra. Let V be a k-dimensional linear subspace
of the n-dimensional vector space Zn2 . Then there exists a n × n non-singular
matrix A over Z2 , such that {vA | v ∈ V } is equal to {(a1 , . . . , ak , 0, . . . , 0) ∈
(Z2 )n | ai ∈ Z2 }. Thus we can find a non-singular matrix A such that the vectors
v(I)m(δ(w1 )) . . . m(δ(wl ))A, for all w = w1 . . . wl ∈ Σ ∗ , which is also equal to
v(I)AA−1 m(δ(w1 )) . . . AA−1 m(δ(wl ))A, generate (by using ⊕) precisely all 2k
vectors with all components from the (k + 1)-th component onwards being zero.
Thus by removing states qk+1 , . . . , qn from NA , we obtain a trim ⊕-NFA. t
u

Proposition 3. Let N = (Q, Σ, δ, I, F ). Then K(N ) = {∅} if and only if


R(N R ) = 2Q .

Proof. Assume that K(N ) 6= {∅} and let ∅ 6= J ∈ K(N ). Then from the defi-
nition of K(N ) we have that LJ,F (N ) = ∅, and thus LF,J (N R ) = ∅. But note
that LF,J (N R ) = ∅ implies that R(N R ) 6= 2Q . The converse can be proved in a
similar way. t
u

Theorem 1. Assume that the ⊕-NFA N = (Q, Σ, δ, I, F ) is minimal. Then


K(N ) = {∅}, K(N R ) = {∅}, R(N ) = 2Q and R(N R ) = 2Q .

Proof. Follows from Propositions 1, 2 and 3. t


u

7
Remark 1. It can be shown that if K(N ) = {∅} and K(N R ) = {∅} (or if K(N ) =
{∅} and R(N ) = 2Q ), then N is minimal, but this result is not required in the
remainder of this paper.

Definition 9. Let L be a (regular) language. The left quotient, or simply quo-


tient, of L by a word w ∈ Σ ∗ is the language w−1 L = {x ∈ Σ ∗ | wx ∈ L}.

Note that, if D is a minimal DFA accepting L, then the right language of


every state of D is some quotient of L.
Similar to residual NFAs (as introduced in [4]), we define residual ⊕-NFAs.
We will see in the next two sections of the paper that the more general class of
automata, where the right languages of ⊕-NFAs are the symmetric difference of
quotients, is in fact the more interesting class of ⊕-NFAs in our case.

Definition 10. A residual ⊕-NFA (⊕-RFSA) is a ⊕-NFA N = (Q, Σ, δ, I, F ),


such that for all q ∈ Q there exists wq ∈ Σ ∗ with Lq,F (N ) = wq−1 L.

The ⊕-NFA given in Example 2 is a ⊕-RFSA, since by reading ε, a and aa,


each of the three states are reached respectively.

Theorem 2. For any regular language L, there exists a minimal ⊕-NFA N ,


which is also a ⊕-RFSA, with L(N ) = L.

Proof. Let N = (Q, Σ, δ, I, F ) be a minimal ⊕-NFA accepting L, with Q =


{q1 , . . . , qn }. Since N is minimal, it is implied by Theorem 1 that R(N ) =
2Q . Thus we can find words w1 , . . . , wn so that δ(I, w1 ), . . . , δ(I, wn ) are lin-
early independent. We can now make a change of basis on N to obtain an
equivalent minimal ⊕-NFA N 0 = (Q0 , Σ, δ 0 , I 0 , F 0 ), with Q0 = {q10 , . . . , qn0 } and
δ 0 (I 0 , wi ) = {qi0 } for 1 ≤ i ≤ n. In fact, it is fairly straightforward to verify that
the matrix B, with B = A−1 , where A is a matrix with rows given by vectors
v(δ(I, w1 )), . . . , v(δ(I, wn )), will provide the change of basis with the appropri-
ate properties, since v(δ(I, wi ))B, which is the vector of states in N 0 reached
after reading wi , is a vector with a 1 in the ith position and zeros in all other
positions. Thus N 0 is residual. t
u

Example 4. In Figure 2(a) we give an example of a ⊕-NFA N , with the states


Q = {q1 , q2 , q3 , q4 , q5 }, and the initial states I = {q1 , q5 }. Note that N D , given in
Figure 2(b), is not minimal. Also, K(N ) = {{q2 , q4 }}, and R(N ) is the symmet-
ric difference of any subset of the set {{q1 , q5 }, {q2 }, {q3 }, {q4 }}, and therefore
properly contained in 2Q . Thus, N is not minimal, and it is easy to see that
L(N ) can be recognized by a three state minimal ⊕-NFA. If we use the 5 × 5
non-singular matrix A = [aij ] with aii = 1 for i = 1, . . . , 5, and a15 = 1, and
aij = 0 at all other positions (i.e. A has ones on the diagonal and in the fifth
column of the first row, but zeros elsewhere), then we obtain the ⊕-NFA NA in
Figure 2(c), which can be trimmed by removing state q5 .

8
a, b

a a, b
a, b q1 , q 5 q4 q3

q1 q2 q3 q4 q5 b
b a, b a, b a, b
a, b
q2 , q 4 ∅

a, b

(a) (b)
a, b

b a, b a, b a, b
q1 q2 q3 q4 q5

a, b

(c)

Fig. 2. (a) N , (b) N D , and (c) NA for Example 4

4 Atomic and ⊕-Atomic ⊕-NFAs

Atoms of regular languages were recently introduced in [2].

Definition 11. Let L be a regular language and let L1 , . . . , Ln be the quotients


of L. An atom of L is any non-empty language of the form A = L f1 ∩ · · · ∩ L
fn ,
fi is either Li or Li 3 .
where L

A language has at most 2n atoms. It is easy to see from the definition of an


atom that any two atoms are disjoint from each other, and every quotient is a
union of atoms.

Definition 12. Let N = (Q, Σ, δ, I, F ) be a ⊕-NFA. We say that N is atomic


if for every state q ∈ Q, the right language Lq,F (N ) of q is a union of some
atoms (or the empty set). Similarly, N is ⊕-atomic if for every state q ∈ Q,
the right language Lq,F (N ) of q is a symmetric difference of some quotients of
L(N ) (or the empty set).

Example 5. In Figure 3, the minimal DFA D and a ⊕-NFA N accepting the


language L = (a+b)a∗ are shown. The quotients of L are L1 = (a+b)a∗ , L2 = a∗ ,
L3 = ∅. The atoms of L are A1 = L1 ∩ L2 ∩ L3 = aa∗ , A2 = L1 ∩ L2 ∩ L3 =
{}, A3 = L1 ∩ L2 ∩ L3 = ba∗ , A4 = L1 ∩ L2 ∩ L3 = (a + b)∗ (a + b)ba∗ . By
3
The definition in [2] does not consider L1 ∩ L2 ∩ · · · ∩ Ln to be an atom. In [3], the
definition of an atom was changed to read as presented here.

9
a, b

a, b
a a, b q1 q2

a, b b
q1 q2 ∅ a, b b
b

b q3 q4 a, b
a, b

(a) (b)

Fig. 3. (a) minimal DFA D, (b) ⊕-NFA N for Example 5

determinization it can be verified that the right languages of the states of N are
as follows: A1 ∪ A3 for q1 (note that A1 ∪ A3 = L1 ), A2 for q2 , A3 for q3 , and
A4 for q4 . Thus N is atomic, but not ⊕-atomic, since none of A2 , A3 or A4 can
be expressed as a symmetric difference of any combination of quotients.

Proposition 4. Let N be a ⊕-NFA. If N is ⊕-atomic, then N is also atomic.

Proof. From the definition of an atom it follows that a quotient of a language L


is a (disjoint) union of atoms of L. It thus follows that the symmetric difference
of quotients is a union of atoms. Thus if a ⊕-NFA is ⊕-atomic, it is also atomic.
tu

Proposition 5. A minimal ⊕-NFA is ⊕-atomic.

Proof. From [17] we have that if N and N 0 are minimal ⊕-NFAs with L(N ) =
L(N 0 ), then we can obtain N 0 from N by making a change of basis. Also, by
Theorem 2, there exists a minimal ⊕-NFA N for any language L, that is also
a ⊕-RFSA. The result now follows from the observation that if NA is obtained
from N by a change of basis by using the non-singular matrix A, then the right
language of a state of NA is the symmetric difference of the right languages of
some of the states of N . To see this, note that from the equation

A−1 m(δ(w1 )) . . . m(δ(wk ))v(F )T


= A−1 m(δ(w1 ))A . . . A−1 m(δ(wk ))AA−1 v(F )T ,

it follows that if we take the symmetric difference of the right languages of states
of N corresponding to the positions of the ith row of A−1 having 1’s, then we
obtain the right language of the ith state of NA . t
u

5 Getting a Minimal DFA by Determinization


Let L be a regular language. Let the set of atoms of the reverse language LR be
B = {B1 , . . . , Br }. The results in [2] and [3] imply the following proposition:

10
Proposition 6. Let D = (Q, Σ, δ, q0 , F ) be the complete minimal DFA accepting
L. Then there is a one-to-one correspondence between the sets Q and B, mapping
a state q ∈ Q to some atom Bi so that Lq0 ,q (D) = BiR holds.
Corollary 1. Let D = (Q, Σ, δ, q0 , F ) be any DFA accepting L. Then for every
state q ∈ Q there is some i ∈ {1, . . . , r}, such that Lq0 ,q (D) ⊆ BiR holds.
The following theorem is similar to the result obtained in [2] for (union)
NFAs. Also, the proof we present here for ⊕-NFAs is essentially the same as it
was for NFAs in [2].
Theorem 3. For any ⊕-NFA N , N D is minimal if and only if N R is atomic.
Proof. Let N = (Q, Σ, δ, I, F ) be a ⊕-NFA and assume that N D is minimal,
but suppose that N R is not atomic. Then there is a state q of N R that is not
a union of atoms. That is, there is a word u ∈ Lq,I (N R ) such that u ∈ Bi for
some i ∈ {1, . . . , r}, but for some other word v ∈ Bi , v 6∈ Lq,I (N R ). It is implied
that uR ∈ LI,q (N ) and v R 6∈ LI,q (N ). Since we assumed that N D is a minimal
DFA, by Proposition 6 there is a state s of N D such that LI,s (N D ) = BiR . It is
implied that uR , v R ∈ LI,s (N D ). Since we had uR ∈ LI,q (N ), we get that q ∈ s.
On the other hand, because v R 6∈ LI,q (N ) holds, we get q 6∈ s, a contradiction.
Conversely, assume that N R is atomic. Then S for every state q of N , there is
R

a set Hq ⊆ {1, . . . , r} such that Lq,I (N ) = i∈Hq Bi . This implies LI,q (N ) =


R

R
S
i∈Hq Bi for every state q of N . Consider any state s of the DFA N
D
and
any word u such that u ∈ LI,s (N ). Then, clearly, u ∈ LI,q (N ) for every q ∈
D

s, and u 6∈ LI,q0 (N ) for any q 0 6∈ s (and conversely, v ∈ LI,q (N ) for every


0
q ∈ s, and v 6∈ T LI,q0 (N
S ) for R
any qS 6∈ s,Simplies that v ∈ LI,s (N D )). That
is, LI,s (N ) = ( q∈s i∈Hq Bi ) \ ( q0 6∈s i∈Hq0 BiR ). On the other hand, by
D

Corollary 1, LI,s (N D ) ⊆ BkR for some atom Bk . Since atoms are disjoint, any
boolean combination of sets BiR cannot be a proper subset of any BkR . Thus,
LI,s (N D ) = BkR . If we suppose that N D is not minimal, then there are some
states s0 and s00 of N D , and a state t of the corresponding minimal DFA, such that
s0 , s00 and t have the same right language. Then it is easy to see by Proposition 6
that there is some Bi , such that LI,s0 (N D ) ⊂ BiR and LI,s00 (N D ) ⊂ BiR , a
contradiction. t
u
Theorem 4. If N is a minimal ⊕-NFA, then N D is a minimal DFA.
Proof. The result follows from Propositions 1, 4, 5 and Theorem 3. t
u

6 Conclusions and Future Work


In this paper and in [2] the problem of when determinization of a weighted
automaton leads to minimal DFA was considered, for the case where the weights
are taken from the Boolean semiring and from the semiring Z2 . We would also like
to consider this problem for weighted automata over other semirings, keeping in
mind that determinization is not always possible for arbitrary weighted automata
(see [11], [12]).

11
References
1. Brzozowski, J.: Canonical regular expressions and minimal state graphs for def-
inite events. In: Proceedings of the Symposium on the Mathematical Theory of
Automata. MRI Symposia Series, Polytechnic Press of Polytechnic Institute of
Brooklyn (1963) 529–561
2. Brzozowski, J., Tamm, H.: Theory of átomata. In Mauri, G., Leporati, A., eds.:
Proceedings of the 15th International Conference on Developments in Language
Theory (DLT). Volume 6795 of Lecture Notes in Computer Science, Springer (2011)
105–117
3. Brzozowski, J., Tamm, H.: Quotient complexities of atoms of regular languages.
http://arxiv.org/abs/1201.0295 (2012)
4. Denis, F., Lemay, A., Terlutte, A.: Residual finite state automata. In Ferreira, A.,
Reichel, H., eds.: STACS 2001, 18th Annual Symposium on Theoretical Aspects of
Computer Science, Dresden, Germany, February 15-17, 2001, Proceedings. Volume
2010 of Lecture Notes in Computer Science, Springer (2001) 144–157
5. Dornhoff, L., Hohn, F.: Applied Modern Algebra. Macmillan Publishing Company
(1978)
6. Droste, M., Kuich, W., Vogler, H.: Handbook of Weighted Automata. 1st edn.
Springer Publishing Company, Incorporated (2009)
7. Droste, M., Rahonis, G.: Weighted automata and weighted logics on infinite words.
In Ibarra, O.H., Dang, Z., eds.: Developments in Language Theory. Volume 4036
of Lecture Notes in Computer Science, Springer (2006) 49–58
8. Hopcroft, J., Ullman, J.: Introduction to Automata Theory, Languages and Com-
putation. Addison Wesley (1979)
9. Ilie, L., Navarro, G., Yu, S.: On NFA reductions. Lecture Notes in Computer
Science 3113 112–124
10. Jiang, T., Ravikumar, B.: Minimal NFA problems are hard. SIAM Journal on
Computing 22(6) (December 1993) 1117–1141
11. Kirsten, D., Mäurer, I.: On the determinization of weighted automata. Journal of
Automata, Languages and Combinatorics 10(2/3) (2005) 287–312
12. Mohri, M.: Finite-state transducers in language and speech processing. Computa-
tional Linguistics 23(2) (June 1997) 269–311
13. Stone, H.: Discrete Mathematical Structures. Science Research Associates (1973)
14. Van der Merwe, A., Van Zijl, L., Geldenhuys, J.: Ambiguity of unary symmetric
difference NFAs. In: Proceedings of the International Colloquium on Theoreti-
cal Aspects of Computing. Volume 6916 of Lecture Notes in Computer Science,
Springer (September 2011) 256–266
15. Van Zijl, L.: Generalized Nondeterminism and the Succinct Representation of
Regular Languages. PhD thesis, Stellenbosch University (November 1997)
16. Van Zijl, L.: On binary symmetric difference NFAs and succinct representations of
regular languages. Theoretical Computer Science 328(1) (November 2004) 161–170
17. Vuillemin, J., Gama, N.: Compact normal form for regular languages as xor au-
tomata. In: Proceedings of the 14th International Conference on Implementa-
tion and Application of Automata. CIAA ’09, Berlin, Heidelberg, Springer-Verlag
(2009) 24–33

12

You might also like