Incomplete Transition Complexity of Basic Operations on Finite Languages
aa r X i v : . [ c s . F L ] F e b Incomplete Transition Complexity of BasicOperations on Finite Languages ⋆ Eva Maia ⋆⋆ , Nelma Moreira, Rog´erio Reis CMUP & DCC, Faculdade de Ciˆencias da Universidade do PortoRua do Campo Alegre, 4169-007 Porto, Portugale-mail: { emaia,nam,rvr } @dcc.fc.up.pt Abstract.
The state complexity of basic operations on finite languages(considering complete DFAs) has been in studied the literature. In thispaper we study the incomplete (deterministic) state and transition com-plexity on finite languages of boolean operations, concatenation, star,and reversal. For all operations we give tight upper bounds for both de-scriptional measures. We correct the published state complexity of con-catenation for complete DFAs and provide a tight upper bound for thecase when the right automaton is larger than the left one. For all binaryoperations the tightness is proved using family languages with a variablealphabet size. In general the operational complexities depend not onlyon the complexities of the operands but also on other refined measures.
Descriptional complexity studies the measures of complexity of languages andoperations. These studies are motivated by the need to have good estimates ofthe amount of resources required to manipulate the smallest representation fora given language. In general, having succinct objects will improve our control onsoftware, which may become smaller and more efficient. Finite languages are animportant subset of regular languages with many applications in compilers, com-putational linguistics, control and verification, etc. [10,2,9,4]. In those areas it isalso usual to consider deterministic finite automata (DFA) with partial transitionfunctions. This motivates the study of the transition complexity of DFAs (notnecessarily complete), besides the usual state complexity. The operational tran-sition complexity of basic operations on regular languages was studied by Gao etal. [5] and Maia et al. [8]. In this paper we continue that line of research by con-sidering the class of finite languages. For finite languages, Salomaa and Yu [11]showed that the state complexity of the determinization of a nondeterministicautomaton (NFA) with m states and k symbols is Θ ( k m k ) (lower than 2 m ⋆ This work was partially funded by the European Regional Development Fundthrough the programme COMPETE and by the Portuguese Government throughthe FCT under projects PEst-C/MAT/UI0144/2011 and CANTE-PTDC/EIA-CCO/101904/2008. ⋆⋆ Eva Maia is funded by FCT grant SFRH/BD/78392/2011. s it is the case for general regular languages). Cˆampeanu et al. [3] studied theoperational state complexity of concatenation, Kleene star, and reversal. Finally,Han and Salomaa [6] gave tight upper bounds for the state complexity of unionand intersection on finite languages. In this paper we give tight upper boundsfor the transition complexity of all the above operations. We correct the upperbound for the state complexity of concatenation [3], and show that if the right automaton is larger than the left one, the upper bound is only reached using analphabet of variable size. Note that, the difference between the state complex-ity for non necessarily complete DFAs and for complete DFAs is at most one.Table 1 presents a comparison of the transition complexity on regular and finitelanguages, where the new results are highlighted. All the proofs not presentedin this paper can be found in an extended version of this work . Operation Regular | Σ | Finite | Σ | L ∪ L n ( m + 1) 2 f ( m, n ) L ∩ L nm m − )( n − )( + P min( m , n ) − = ( m − − i )( n − − i )) + f ( m, n ) L C m + 2 1 m + L L n − (6 m + 3) −
5, 3 . n − − , if m + 1 ≥ n m, n ≥ (4) n − L ⋆ . m − −
2, if m ≥ · m − − m / − , if m is odd 3 · m − − ( m − ) / − , if m is even L R m −
1) 2 p + − , if m = 2 p · p − , if m = 2 p − Table 1.
Incomplete transition complexity for regular and finite languages, where m and n are the (incomplete) state complexities of the operands, f ( m, n ) = ( m − n −
1) + 1 and f ( m, n ) = ( m − n −
2) + 1.
We recall some basic notions about finite automata and regular languages. Formore details, we refer the reader to the standard literature [7,13,12].Given two integers m, n ∈ N let [ m, n ] = { i ∈ N | m ≤ i ≤ n } . A deterministicfinite automaton (DFA) is a five-tuple A = ( Q, Σ, δ, q , F ) where Q is a finiteset of states, Σ is a finite input alphabet, q ∈ Q is the initial state, F ⊆ Q isthe set of final states, and δ is the transition function Q × Σ → Q . Let | Σ | = k , Q | = n , and without lost of generality, we consider Q = [0 , n −
1] with q = 0.The transition function can be naturally extended to sets in 2 Q and to words w ∈ Σ ⋆ . A DFA is complete if the transition function is total. In this paperwe consider DFAs to be not necessarily complete, i.e. with partial transitionfunctions. The language accepted by A is L ( A ) = { w ∈ Σ ⋆ | δ (0 , w ) ∈ F } . TwoDFAs are equivalent if they accept the same language. For each regular language,considering or not a total transition function, there exists a unique minimalcomplete DFA with a least number of states. The left-quotient of L ⊆ Σ ⋆ by x ∈ Σ ⋆ is D x L = { z | xz ∈ L } . The equivalence relation ≡ L ⊆ Σ ⋆ × Σ ⋆ is definedby x ≡ L y if and only if D x L = D y L . The Myhill-Nerode Theorem states that alanguage L is regular if and only if ≡ L has a finite number of equivalence classes, i.e. , L has a finite number of left quotients. This number is equal to the numberof states of the minimal complete DFA. The state complexity , sc ( L ), of a regularlanguage L is the number of states of the minimal complete DFA of L . If theminimal DFA is not complete its number of states is the number of left quotientsminus one (the dead state , that we denote by Ω , is removed). The incompletestate complexity of a regular language L ( isc ( L )) is the number of states of theminimal DFA, not necessarily complete, that accepts L . Note that isc ( L ) is eitherequal to sc ( L ) − sc ( L ). The incomplete transition complexity , itc ( L ), ofa regular language L is the minimal number of transitions over all DFAs thataccepts L . We omit the term incomplete whenever the model is explicitly given.A τ - transition is a transition labeled by τ ∈ Σ . The τ - transition complexity of L , itc τ ( L ) is the minimal number of τ -transitions of any DFA recognizing L . Itis known that itc ( L ) = P τ ∈ Σ itc τ ( L ) [5,8].The complexity of an operation on regular languages is the (worst-case) com-plexity of a language resulting from the operation, considered as a function ofthe complexities of the operands. Usually an upper bound is obtained by pro-viding an algorithm, which given representations of the operands ( e.g. DFAs),constructs a model ( e.g.
DFA) that accepts the language resulting from the re-ferred operation. To prove that an upper bound is tight , for each operand we cangive a family of languages (parametrized by the complexity measures and called witnesses ), such that the resulting language achieves that upper bound.For determining the transition complexity of an operation, we also considerthe following measures and refined numbers of transitions. Let A = ([0 , n − , Σ, δ, , F ) be a DFA, τ ∈ Σ , and i ∈ [0 , n − f ( A ) = | F | , f ( A, i ) = | F ∩ [0 , i − | . We denote by t τ ( A, i ) and in τ ( A, i ) respectively the number oftransitions leaving and reaching i . As t τ ( A, i ) is a boolean function, the comple-ment is t τ ( A, i ) = 1 − t τ ( A, i ). Let s τ ( A ) = t τ ( A, a τ ( A ) = P i ∈ F in τ ( A, i ), e τ ( A ) = P i ∈ F t τ ( A, i ), t τ ( A ) = P i ∈ Q t τ ( A, i ), t τ ( A, [ k, l ]) = P i ∈ [ k,l ] t τ ( A, i ),and the respective complements s τ ( A ) = t τ ( A, e τ ( A ) = P i ∈ F t τ ( A, i ), etc.Whenever there is no ambiguity we omit A from the above definitions. All theabove measures, can be defined for a regular language L , considering the measurevalues for its minimal DFA. For instance, we have, f ( L ), f ( L, i ), a τ ( L ), e τ ( L ),etc. We define s ( L ) = P τ ∈ Σ s τ ( L ) and a ( L ) = P τ ∈ Σ a τ ( L ).et A = ([0 , n − , Σ, δ, , F ) be a minimal DFA accepting a finite language,where the states are assumed to be topologically ordered. Then, s ( L ( A )) = 0and there is exactly one final state, denoted π and called pre-dead , such that P τ ∈ Σ t τ ( π ) = 0 . The level of a state i is the size of the shortest path from theinitial state to i , and never exceeds n −
1. The level of A is the level of π . Given two incomplete DFAs A = ([0 , m − , Σ, δ A , , F A ) and B = ([0 , n − , Σ, δ B , , F B ) the adaptation of the classical Cartesian product constructioncan be used to obtain a DFA accepting L ( A ) ∪ L ( B ) [8]. Proposition 1.
For any m -state incomplete DFA A and any n -state incompleteDFA B , both accepting finite languages, mn − states are sufficient for a DFAaccepting L ( A ) ∪ L ( B ) .Proof. Here we adapt the proof of Han and Salomaa [6]. In the product automa-ton, the set of states is included in ([0 , m − ∪{ Ω A } ) × ([0 , n − ∪{ Ω B } ), where Ω A and Ω B are the dead states of the DFA A and DFA B , respectively. Thestates of the form (0 , i ), where i ∈ [1 , n − ∪ { Ω B } , and of the form ( j, j ∈ [1 , m − ∪ { Ω A } , are not reachable from (0 ,
0) because the operands repre-sent finite languages; the states ( m − , n − m − , Ω B ) and ( Ω A , n −
1) areequivalent because they are final and they do not have out-transitions; the state( Ω A , Ω B ) is the dead state and because we are dealing with incomplete DFAswe can ignore it. Therefore the number of states of the union of two incompleteDFAs accepting finite languages is ( m + 1)( n + 1) − ( m + n ) − − mn − Proposition 2.
For any finite languages L and L with isc ( L ) = m and isc ( L ) = n , one has itc ( L ∪ L ) ≤ X τ ∈ Σ ( s τ ( L ) ⊞ s τ ( L ) − ( itc τ ( L ) − s τ ( L ))( itc τ ( L ) − s τ ( L )))+ n ( itc ( L ) − i ( L )) + m ( itc ( L ) − i ( L )) , where for x, y boolean values, x ⊞ y = min( x + y, .Proof. In the product automaton, the τ -transitions can be represented as pairs( α i , β j ) where α i ( β j ) is 0 if there exists a τ -transition leaving the state i ( j )of DFA A ( B ), respectively, or − − , − α , β j ), where j ∈ [1 , n − ∪ { Ω B } nor of the form ( α i , β ), where i ∈ [1 , m − ∪ { Ω A } , as happened inthe case of states. Thus, the number of τ -transitions for τ ∈ Σ are: s τ ( A ) ⊞ s τ ( B )+ t τ ( A, [1 , m − t τ ( B, [1 , n − t τ ( A, [1 , m − t τ ( B, [1 , n − t τ ( A, [1 , m − t τ ( B, [1 , n − s τ ( A ) ⊞ s τ ( B )+ t τ ( A, [1 , m − t τ ( B, [1 , n − t τ ( A, [1 , m − n − t τ ( B, [1 , n − m − t τ ( A, [1 , m − t τ ( B, [1 , n − s τ ( A ) ⊞ s τ ( B )+ nt τ ( A, [1 , m − mt τ ( B, [1 , n − − t τ ( A, [1 , m − t τ ( B, [1 , n − . s the DFAs are minimal, P τ ∈ Σ t τ ( A, [1 , m − itc ( L ) − s ( L ),and analogously for B . Therefore the proposition holds.Han and Salomaa proved [6, Lemma 3] that the upper bound for the numberof states can not be reached with a fixed alphabet. The witness families for theincomplete complexities coincide with the ones already presented for the statecomplexity. As we do not consider the dead state, our presentation is slightlydifferent. Let m, n ≥ Σ = { b, c } ∪ { a ij | i ∈ [1 , m − , j ∈ [1 , n − , ( i, j ) =( m − , n − } . Let A = ([0 , m − , Σ, δ A , , { m − } ) where δ A ( i, b ) = i + 1 for i ∈ [0 , m −
2] and δ A (0 , a ij ) = i for j ∈ [1 , n − , ( i, j ) = ( m − , n − B = ([0 , n − , Σ, δ B , , { n − } ), where δ B ( i, c ) = i + 1 for i ∈ [0 , n −
1] and δ B (0 , a i,j ) = j for j ∈ [1 , n − , i ∈ [1 , m − , ( i, j ) = ( m − , n − Theorem 1.
For any integers m ≥ and n ≥ there exist an m -state DFA A and an n -state DFA B , both accepting finite languages, such that any DFAaccepting L ( A ) ∪ L ( B ) needs at least mn − states and mn − n − m ) + 2 transitions, if the size of the alphabet can depend on m and n . Given two incomplete DFAs A = ([0 , m − , Σ, δ A , , F A ) and B = ([0 , n − , Σ, δ B , , F B ) we can obtain a DFA accepting L ( A ) ∩ L ( B ) by the standardproduct automaton construction. Proposition 3.
For any m -state DFA A and any n -state DFA B , both acceptingfinite languages, mn − m − n + 6 states are sufficient for a DFA accepting L ( A ) ∩ L ( B ) .Proof. Consider the DFA accepting L ( A ) ∩ L ( B ) obtained by the product con-struction. For the same reasons as in Proposition 1, we can eliminate the statesof the form (0 , j ), where j ∈ [1 , n − ∪ { Ω B } , and of the form ( i, i ∈ [1 , m − ∪ { Ω A } ; the states of the form ( m − , j ), where j ∈ [1 , n − i, n − i ∈ [1 , m −
2] are equivalent to the state( m − , n −
1) or to the state ( Ω A , Ω B ); the states of the form ( Ω A , j ), where j ∈ [1 , n − ∪ { Ω B } , and of the form ( i, Ω B ), where i ∈ [1 , m − ∪ { Ω A } areequivalent to the state ( Ω A , Ω B ) which is the dead state of the DFA resultingfron the intersection, and thus can be removed. Therefore, the number of statesis ( m + 1)( n + 1) − m + 1)( n + 1)) + 12 − mn − m − n + 6. Proposition 4.
For any finite languages L and L with isc ( L ) = m and isc ( L ) = n , one has itc ( L ∩ L ) ≤ X τ ∈ Σ ( s τ ( L ) s τ ( L ) + ( itc τ ( L ) − s τ ( L ) − a τ ( L ))( itc τ ( L ) − s τ ( L ) − a τ ( L )) + a τ ( L ) a τ ( L )) . roof. Using the same technique as in Proposition 2 and considering that in theintersection we only have pairs of transitions where both elements are differentfrom −
1, the number of τ -transitions is as follows, which proves the proposition, s τ ( A ) s τ ( B ) + t τ ( A, [1 , m − \ F A ) t τ ( B, [1 , n − \ F B ) + a τ ( A ) a τ ( B ) . The witness languages for the tightness of the bounds for this operation aredifferent from the families given by Han and Salomaa because those families arenot tight for the transition complexity. For m ≥ n ≥
2, let Σ = { a ij | i ∈ [1 , m − , j ∈ [1 , n − } ∪ { a m − ,n − } . Let A = ([0 , m − , Σ, δ A , , { m − } )where δ A ( x, a ij ) = x + i for x ∈ [0 , m − , i ∈ [1 , m − j ∈ [1 , n − B = ([0 , n − , Σ, δ B , , { n − } ) where δ B ( x, a ij ) = x + j for x ∈ [0 , n − , i ∈ [1 , m − , and j ∈ [1 , n − Theorem 2.
For any integers m ≥ and n ≥ there exist an m -state DFA A and an n -state DFA B , both accepting finite languages, such that any DFAaccepting L ( A ) ∩ L ( B ) needs at least mn − m + n ) + 6 states and ( m − n − P min( m,n ) − i =1 ( m − − i )( n − − i ))+2 transitions, if the size of the alphabetcan depend on m and n .Proof. For the number of states, following the proof [6, Lemma 6], it is easyto see, that the words of the set R = { ε } ∪ { a m − , a n − } ∪ { a ij | i ∈ [1 , m − , and j ∈ [1 , n − } are all inequivalent under ≡ L ( A ) ∩ L ( B ) and | R | = mn − m + n ) + 6.In the DFA A , the number of a ij -transitions is ( n − P m − i =0 ( m − − i ) + 1,and in the DFA B , that number is ( m − P n − i =0 ( n − − i ) + 1. Let k =( m − n −
2) + 1. The DFA resulting from the intersection operation has: k transitions corresponding to the pairs of transitions leaving the initial statesof the operands; ( m − n − P min( m,n ) − i =1 ( m − − i )( n − − i ) transitionscorresponding to the pairs of transitions formed by transitions leaving non-finaland non-initial states of the operands; and k transitions corresponding to thepairs of transitions leaving the final states of the operands. The state and transition complexity for this operation on finite languages aresimilar to the ones on regular languages. This happens because we need to com-plete the DFA.
Proposition 5.
For any m -state DFA A , accepting a finite language, m + 1 states are sufficient for a DFA accepting L ( A ) c . Proposition 6.
For any finite languages L with isc ( L ) = m one has itc ( L c ) ≤| Σ | ( m + 1) .Proof. The maximal number of τ -transitions is m + 1 because it is the numberof states. Thus, the maximal number of transitions is | Σ | ( m + 1).ao et al. [5] gave the value | Σ | ( itc ( L ) + 2) for the transition complexity ofthe complement. In some situations, this bound is higher than the bound herepresented, but contrasting to that one, it gives the transition complexity of theoperation as function of the transition complexity of the operands.The witness family for this operation is exactly the same presented in therefered paper, i.e. { b m } , for m ≥ Cˆampeanu et al. [3] studied the state complexity of the concatenation of a m -state complete DFA with a n -state complete DFA over an alphabet of size k andproposed the upper bound m − X i =0 min k i , f ( A,i ) X j =0 (cid:18) n − j (cid:19) + min k m − , f ( A ) X j =0 (cid:18) n − j (cid:19) (1)which was proved to be tight for m > n −
1. It is easy to see that the secondterm of (1) is f ( A ) X j =0 (cid:18) n − j (cid:19) if m > n −
1, and k m − , otherwise. The value k m − indicates that the DFA resulting from the concatenation has states with level atmost m −
1. But that is not always the case, as we can see by the example inFigure 2. This implies that (1) is not an upper bound if m < n . We have Proposition 7.
For any m -state complete DFA A and any n -state completeDFA B , both accepting finite languages over an alphabet of size k , the numberof states sufficient for a DFA accepting L ( A ) L ( B ) is: m − X i =0 min k i , f ( A,i ) X j =0 (cid:18) n − j (cid:19) + f ( A ) X j =0 (cid:18) n − j (cid:19) (2)In the following, we present tight upper bounds for state and transition com-plexity of concatenation for incomplete DFAs.Given two incomplete DFAs A = ([0 , m − , Σ, δ A , , F A ) and B = ([0 , n − , Σ, δ B , , F B ), that represent finite languages, the algorithm by Maia et al. for the concatenation of regular languages can be applied to obtain a DFA C =( R, Σ, δ C , r , F C ) accepting L ( A ) L ( B ). The set of states of C is contained inthe set ([0 , m − ∪ { Ω A } ) × [0 ,m − , the initial state r is h , ∅i if 0 / ∈ F A ,and h , { }i otherwise; F C = {h i, P i ∈ R | P ∩ F B = ∅} , and for τ ∈ Σ , δ C ( h i, P i , τ ) = h i ′ , P ′ i with i ′ = δ A ( i, τ ), if δ A ( i, τ ) ↓ or i ′ = Ω A otherwise, and P ′ = δ B ( P, τ ) ∪ { } if i ′ ∈ F A and P ′ = δ B ( P, τ ) otherwise.The next result follows the lines of the one presented by Cˆampeanu et al. ,with the above referred corrections and omitting the dead state. Note that we are omitting the dead state in the figures. roposition 8.
For any m -state DFA A and any n -state DFA B , both acceptingfinite languages over an alphabet of size k , the number of states sufficient for aDFA accepting L ( A ) L ( B ) is: m − X i =0 min k i , f ( A,i ) X j =0 (cid:18) n − j (cid:19) + f ( A ) X j =0 (cid:18) n − j (cid:19) − . (3) Proposition 9.
For any finite languages L and L with isc ( L ) = m and isc ( L ) = n over an alphabet of size k , and making ∆ j = (cid:0) n − j (cid:1) − (cid:0) t τ ( L ) − s τ ( L ) j (cid:1) ,one has itc ( L L ) ≤ k m − X i =0 min k i , f ( L ,i ) X j =0 (cid:18) n − j (cid:19) ++ X τ ∈ Σ min k m − − s τ ( L ) , f ( L ) − X j =0 ∆ j + f ( L ) X j =0 ∆ j . (4) Proof.
The τ -transitions of the DFA C accepting L ( A ) L ( B ) have three forms:( i, β ) where i represents the transition leaving the state i ∈ [0 , m − − , β )where − π A to Ω A ; and( − , β ) where − Ω A . In all forms, β is a setof transitions of DFA B . The number of transitions of the form ( i, β ) is at most P m − i =0 min { k i , P f ( L ,i ) j =0 (cid:0) n − j (cid:1) } which corresponds to the number of states of theform ( i, P ), i ∈ [0 , m −
1] and P ⊆ [0 , n − − , β ) is min { k m − − s τ ( L ) , P f ( L ) − j =0 ∆ j } . The size of β is at most f ( L ) − k m − states in this level. However,if s τ ( B,
0) = 0 we need to remove the transition ( − , ∅ ) which leaves the state( m − , { } ). The number of transitions of the form ( − , β ) is P f ( L ) j =0 ∆ j andthis case is similar to the previous one.To prove that that the bound is reachable we consider two cases dependingwhether m + 1 ≥ n or not. Case 1: m +1 ≥ n The witness languages are the ones presented by Cˆampeanu et al. (see Figure 1).
Theorem 3.
For any integers m ≥ and n ≥ there exist an m -state DFA A and an n -state DFA B , both accepting finite languages, such that any DFAaccepting L ( A ) L ( B ) needs at least ( m − n + 3)2 n − − states and · n − − transitions, if m + 1 ≥ n . A) m − · · · a, b a, b a, b (B) n − · · · b a, b a, b Fig. 1.
DFA A with m states and DFA B with n states. a b abab bab ab aba, b a, ba, b a, ba, b a, ba, ba, b a, ba, b Fig. 2.
DFA resulting of the concatenation of DFA A with m = 3 and DFA B with n = 5, of Fig. 1. The states with dashed lines have level > Proof.
The proof for the number of states corresponds to the one presentedby Cˆampeanu et al. . The DFA A has m − τ -transitions for τ ∈ { a, b } and f ( A ) = m . The DFA B has n − a -transitions and n − b -transitions. Consider m ≥ n . If we analyse the transitions as we did in the proof of the Proposition 9we have: 2 n − − a -transitions and 2 n − − b -transitions that correspond to thetransitions of the form ( i, β ); 2 n − − a -transitions and 2 n − − b -transitionsthat correspond to the transitions of the form ( − , β ); and 2 n − − a -transitionsand 2 n − − b -transitions that correspond to the transitions of the form ( − , β ).Adding up those values we have the result. Case 2: m + 1 < n Let Σ = { b } ∪ { a i | i ∈ [1 , n − } . Let A = ([0 , m − , Σ, δ A , , [0 , m − δ A ( i, τ ) = i + 1, for any τ ∈ Σ . Let B = ([0 , n − , Σ, δ B , , { n − } ) where δ B ( i, b ) = i + 1, for i ∈ [0 , n − δ B ( i, a j ) = i + j ,for i, j ∈ [1 , n − i + j ∈ [2 , n − δ B (0 , a j ) = j , for j ∈ [2 , n − Theorem 4.
For any integers m ≥ and n ≥ there exist an m -state DFA A and an n -state DFA B , both accepting finite languages, such that the number ofstates and transitions of any DFA accepting L ( A ) L ( B ) reaches the upper bounds,if m + 1 < n and the size of the alphabet can depend of m and n .Proof. The number of τ -transitions of DFA A is m −
1, for τ ∈ Σ . The DFA B has n − b -transitions, n − a -transitions, and n − i a i -transitions, with i ∈ [2 , n − roposition 10. The upper bounds for state and transition complexity of con-catenation cannot be reached with a fixed alphabet for m ≥ , n > m + 1 .Proof. Let S = { ( Ω A , P ) | ∈ P } ⊆ R . A state ( Ω A , P ) ∈ S has to satisfy thefollowing condition: ∃ i ∈ F A ∃ P ′ ⊆ [0 ,n − with 0 ∈ P ′ and ∃ τ ∈ Σ , such that δ C (( i, P ′ ) , τ ) = ( Ω A , P ). The maximal size of S is P f ( A ) − j =0 (cid:0) n − j (cid:1) . Assume that Σ has a fixed size k = | Σ | . Then, the maximal number of words that reachesstates of S from r is P f ( A ) i =0 k i +1 . It is easy to see that for n > m sufficientlylarge P f ( A ) i =0 k i +1 ≪ P f ( A ) − j =0 (cid:0) n − j (cid:1) . Given an incomplete DFA A = ([0 , m − , Σ, δ A , , F A ) accepting a finite lan-guage, a DFA B accepting L ( A ) ⋆ can be constructed by an algorithm simi-lar to the one for regular languages [8]. Let B = ( Q B , Σ, δ B , { } , F B ) where Q B ⊆ [0 ,m − , F B = { P ∈ Q B | P ∩ F A = ∅} ∪ { } , and for τ ∈ Σ , P ⊆ Q B ,and R = δ A ( P, τ ), δ B ( P, τ ) is R if R ∩ F A = ∅ , R ∪ { } otherwise.If f ( A ) = 1 then the minimal DFA accepting L ( A ) ⋆ has also m states. Thus,in the following we will consider DFAs with at least two final states. Proposition 11.
For any m -state DFA A accepting a finite language with f ( A ) ≥ , m − f ( A ) − + 2 m − − states are sufficient for a DFA accepting L ( A ) ⋆ .Proof. The proof is similar to the proof presented by Cˆampeanu et al. . Proposition 12.
For any finite language L with isc ( L ) = m one has itc ( L ⋆ ) ≤ m − f ( L ) − k + X τ ∈ Σ e τ ( L ) ! − X τ ∈ Σ n τ − X τ ∈ X n τ where n τ = t τ ( L ) − s τ ( L ) − e τ ( L ) and X = { τ ∈ Σ | s τ ( L ) = 0 } .Proof. The proof is similar to the one for the states.The witness family for this operation is the same as the one presented byCˆampeanu et al. , but we have to exclude dead state (see Figure 3).
Theorem 5.
For any integer m ≥ there exists an m -state DFA A accepting afinite language, such that any DFA accepting L ( A ) ⋆ needs at least m − +2 m − − states and · m − − m/ − transitions if m is odd or · m − − ( m − / − transitions otherwise. Given an incomplete DFA A = ([0 , m − , Σ, δ A , , F A ), to obtain a DFA B thataccepts L ( A ) R , we first reverse all transitions of A and then determinize theresulting NFA. m − m − · · · a, c ba, b a, b, c a, b a, b a, b, c (2) m − m − · · · a ba, b, c a, b a, b, c a, b a, b, c Fig. 3.
DFA A with m states, with m even (1) and odd (2). Proposition 13.
For any m -state DFA A , with m ≤ , accepting a finite lan-guage over an alphabet of size k ≥ , P l − i =0 k i + 2 m − l − states are sufficient fora DFA accepting L ( A ) R , where l is the smallest integer such that m − l ≤ k l .Proof. The proof is similar to the proof of [3, Theorem 5]. We only need toremove the dead state.
Proposition 14.
For any finite language L with isc ( L ) = m and if l is thesmallest integer such that m − l ≤ k l , one has, if m is odd, itc ( L R ) ≤ l X i =0 k i − k m − l − X τ ∈ Σ P l − i =0 t τ ( L,i )+1 , or, if m is even, itc ( L R ) ≤ l X i =0 k i − k m − l − X τ ∈ Σ (cid:16) P l − i =0 t τ ( L,i )+1 − c τ ( l ) (cid:17) , where c τ ( l ) is if there exists a τ -transition reaching the state l and otherwise.Proof. The smallest l that satisfies 2 m − l ≤ k l is the same for m and m + 1, andbecause of that we have to consider whether m is even or odd. Suppose m odd.Let T be set of transitions corresponding to the first P l − i =0 k i states and T theset corresponding to the other 2 m − l − | T | = P l − i =0 k i − B forthe reversal are sets of states of DFA A we also consider each τ -transition as a set.If all τ -transitions were defined its number in T would be 2 m − l . Note that thetransitions of the m − l states correspond to the transitions of the states between0 and l − A , thus we remove the sets that has no τ -transitions.As the initial state of A has no transitions reaching it, we need to add one tothe number of missing τ -transitions. Thus, | T | = P τ ∈ Σ m − l − ( P l − i =0 ( t τ ( i )))+1 .Let us consider m even. In this case we need also to consider the set oftransitions that connect the states with the highest level in the first set with thestates with the lowest level in the second set. As the highest level is l −
1, wehave to remove the possible transitions that reach the state l in DFA A . · · · p − p − p − · · · a, b a, b a, b b a, b a, b (2) · · · p − p − p − · · · a, b a, b a, b b a, b a, b Fig. 4.
DFA A with m = 2 p − m = 2 p (2). The witness family for this operation is the one presented by Cˆampeanu et al. but we omit the dead state (see Figure 4).
Theorem 6.
For any integer m ≥ there exists an m -state DFA A acceptinga finite language, such that any DFA accepting L ( A ) R needs at least · p − + 2 states and · p − transitions if m = 2 p − or p +1 − states and p +2 − transitions if m = 2 p . In this paper we studied the incomplete state and transition complexity of basicregularity preserving operations on finite languages. Table 1 summarizes someof those results. For unary finite languages the incomplete transition complexityis equal to the incomplete state complexity of that language, which is alwaysequal to the state complexity of the language minus one.As future work we plan to study the average transition complexity of theseoperations following the lines of Bassino et al. [1].