arxiv: v1 [cs.fl] 4 Feb 2013

Similar documents
Reversal of regular languages and state complexity

Universal Disjunctive Concatenation and Star

State Complexity of Two Combined Operations: Catenation-Union and Catenation-Intersection

Theoretical Computer Science. State complexity of basic operations on suffix-free regular languages

THE DISTINGUISHABILITY OPERATION ON REGULAR LANGUAGES

Nondeterministic State Complexity of Basic Operations for Prefix-Free Regular Languages

Distinguishability Operations and Closures

Reversal of Regular Languages and State Complexity

State Complexity of Neighbourhoods and Approximate Pattern Matching

Finite Automata and Regular Languages (part II)

Results on Transforming NFA into DFCA

On Properties and State Complexity of Deterministic State-Partition Automata

CS 4120 Lecture 3 Automating lexical analysis 29 August 2011 Lecturer: Andrew Myers. 1 DFAs

Quotient Complexity of Regular Languages

Descriptional Complexity of Formal Systems (Draft) Deadline for submissions: March 20, 2007 Final versions: May 30, 2007

Exact Generation of Minimal Acyclic Deterministic Finite Automata

Formal Models in NLP

Closure under the Regular Operations

3515ICT: Theory of Computation. Regular languages

Theory of Computation 4 Non-Deterministic Finite Automata

Theory of Computation (I) Yijia Chen Fudan University

CS 530: Theory of Computation Based on Sipser (second edition): Notes on regular languages(version 1.1)

Finite Automata and Regular Languages

Inf2A: Converting from NFAs to DFAs and Closure Properties

The Average Transition Complexity of Glushkov and Partial Derivative Automata

COM364 Automata Theory Lecture Note 2 - Nondeterminism

Finite Automata and Regular languages

Pseudo-automata for generalized regular expressions

CONCATENATION AND KLEENE STAR ON DETERMINISTIC FINITE AUTOMATA

Nondeterministic Finite Automata

Unit 6. Non Regular Languages The Pumping Lemma. Reading: Sipser, chapter 1

CS 154, Lecture 2: Finite Automata, Closure Properties Nondeterminism,

1.3 Regular Expressions

1Number ONLINE PAGE PROOFS. systems: real and complex. 1.1 Kick off with CAS

2. Elements of the Theory of Computation, Lewis and Papadimitrou,

The WHILE Hierarchy of Program Schemes is Infinite

Theory of Computation

HKN CS/ECE 374 Midterm 1 Review. Nathan Bleier and Mahir Morshed

Finite Automata and Languages

Plan for Today and Beginning Next week (Lexical Analysis)

Operations on Unambiguous Finite Automata

Introduction to the Theory of Computation. Automata 1VO + 1PS. Lecturer: Dr. Ana Sokolova.

arxiv: v1 [cs.fl] 1 Mar 2015

CS 455/555: Finite automata

We define the multi-step transition function T : S Σ S as follows. 1. For any s S, T (s,λ) = s. 2. For any s S, x Σ and a Σ,

CMSC 330: Organization of Programming Languages. Theory of Regular Expressions Finite Automata

Introduction to the Theory of Computation. Automata 1VO + 1PS. Lecturer: Dr. Ana Sokolova.

Determinants of generalized binary band matrices

Mergible States in Large NFA

On the Density of Languages Representing Finite Set Partitions 1

Languages. A language is a set of strings. String: A sequence of letters. Examples: cat, dog, house, Defined over an alphabet:

Clarifications from last time. This Lecture. Last Lecture. CMSC 330: Organization of Programming Languages. Finite Automata.

Automata, Logic and Games: Theory and Application

Quantifying Nondeterminism in Finite Automata

Theory of Computation (II) Yijia Chen Fudan University

CSC173 Workshop: 13 Sept. Notes

Computational Models: Class 3

Hellis Tamm Institute of Cybernetics, Tallinn. Theory Seminar, April 21, Joint work with Janusz Brzozowski, accepted to DLT 2011

NOTES ON AUTOMATA. Date: April 29,

Properties of Regular Languages. BBM Automata Theory and Formal Languages 1

Automata on linear orderings

Computational Theory

September 11, Second Part of Regular Expressions Equivalence with Finite Aut

Computational Models - Lecture 4

Büchi Automata and their closure properties. - Ajith S and Ankit Kumar

Closure Properties of Regular Languages. Union, Intersection, Difference, Concatenation, Kleene Closure, Reversal, Homomorphism, Inverse Homomorphism

Antimirov and Mosses s rewrite system revisited

Uses of finite automata

T (s, xa) = T (T (s, x), a). The language recognized by M, denoted L(M), is the set of strings accepted by M. That is,

Intro to Theory of Computation

CSE Theory of Computing: Homework 3 Regexes and DFA/NFAs

Section 2.1: Reduce Rational Expressions

Lecture 3: Nondeterministic Finite Automata

Regularity-preserving letter selections

Fooling Sets and. Lecture 5

M = (Q,Σ,δ,q 0,F) Σ is the alphabet over which the transitions are defined.

CPS 220 Theory of Computation REGULAR LANGUAGES

Minimizing finite automata is computationally hard

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION

SUFFIX TREE. SYNONYMS Compact suffix trie

Regular Expressions and Language Properties

Descriptional Complexity of Formal Systems (Draft) Deadline for submissions: April 14, 2009 Final versions: June 15, 2009

Upper Bounds for Stern s Diatomic Sequence and Related Sequences

Finite Automata, Palindromes, Patterns, and Borders

Closure Properties of Regular Languages

QUOTIENTS AND LIFTS OF SYMMETRIC DIRECTED GRAPHS

1 More finite deterministic automata

CSE 311: Foundations of Computing. Lecture 23: Finite State Machine Minimization & NFAs

COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lec. 5 : DFA minimization

arxiv: v2 [cs.fl] 21 Mar 2014

Classes and conversions

DM17. Beregnelighed. Jacob Aae Mikkelsen

Duality and Automata Theory

Definition of Büchi Automata

Simplification of finite automata

Program Analysis. Lecture 5. Rayna Dimitrova WS 2016/2017

Sri vidya college of engineering and technology

Alexandr Kazda 1 Department of Algebra, Charles University, Prague, Czech Republic

Computational Complexity of NFA Minimization for Finite and Unary Languages

Transcription:

Incomplete Transition Complexity of Basic Operations on Finite Languages Eva Maia, Nelma Moreira, Rogério Reis arxiv:1302.0750v1 [cs.fl] 4 Fe 2013 CMUP & DCC, Faculdade de Ciências da Universidade do Porto Rua do Campo Alegre, 4169-007 Porto, Portugal e-mail:{emaia,nam,rvr}@dcc.fc.up.pt Astract. The state complexity of asic operations on finite languages (considering complete DFAs) has een in studied the literature. In this paper we study the incomplete (deterministic) state and transition complexity on finite languages of oolean operations, concatenation, star, and reversal. For all operations we give tight upper ounds for oth descriptional measures. We correct the pulished state complexity of concatenation for complete DFAs and provide a tight upper ound for the case when the right automaton is larger than the left one. For all inary operations the tightness is proved using family languages with a variale alphaet size. In general the operational complexities depend not only on the complexities of the operands ut also on other refined measures. 1 Introduction Descriptional complexity studies the measures of complexity of languages and operations. These studies are motivated y the need to have good estimates of the amount of resources required to manipulate the smallest representation for a given language. In general, having succinct ojects will improve our control on software, which may ecome smaller and more efficient. Finite languages are an important suset of regular languages with many applications in compilers, computational linguistics, control and verification, etc. [10,2,9,4]. In those areas it is also usual to consider deterministic finite automata(dfa) with partial transition functions. This motivates the study of the transition complexity of DFAs (not necessarily complete), esides the usual state complexity. The operational transition complexity of asic operations on regular languages was studied y Gao et al. [5] and Maia et al. [8]. In this paper we continue that line of research y considering the class of finite languages. For finite languages, Salomaa and Yu [11] showed that the state complexity of the determinization of a nondeterministic automaton (NFA) with m states and k symols is Θ(k m 1+log k ) (lower than 2 m This work was partially funded y the European Regional Development Fund through the programme COMPETE and y the Portuguese Government through the FCT under projects PEst-C/MAT/UI0144/2011 and CANTE-PTDC/EIA- CCO/101904/2008. Eva Maia is funded y FCT grant SFRH/BD/78392/2011.

as it is the case for general regular languages). Câmpeanu et al. [3] studied the operational state complexity of concatenation, Kleene star, and reversal. Finally, Han and Salomaa [6] gave tight upper ounds for the state complexity of union and intersection on finite languages. In this paper we give tight upper ounds for the transition complexity of all the aove operations. We correct the upper ound for the state complexity of concatenation [3], and show that if the right automaton is larger than the left one, the upper ound is only reached using an alphaet of variale size. Note that, the difference etween the state complexity for non necessarily complete DFAs and for complete DFAs is at most one. Tale 1 presents a comparison of the transition complexity on regular and finite languages, where the new results are highlighted. All the proofs not presented in this paper can e found in an extended version of this work 1. Operation Regular Σ Finite Σ L 1 L 2 2n(m+1) 2 3(mn-n-m) +2 f 1(m,n) L 1 L 2 nm 1 (m 2)(n 2)(2+ min(m,n) 3 i=1 (m 2 i)(n 2 i))+2 f 2(m,n) L C m+2 1 m+1 1 L 1L 2 2 n 1 (6m+3) 5, 6.2 n 1 8, if m+1 n 2 3 if m,n 2 See Proposition 9 (4) n 1 L 3.2 m 1 2, if m 2 2 L R 2(2 m 1) 2 9 2 m 3 2 m/2 2, if m is odd 9 2 m 3 2 (m 2)/2 2, if m is even 2 p+2 7, if m = 2p 3 2 p 8, if m = 2p 1 3 2 Tale 1. Incomplete transition complexity for regular and finite languages, where m and n are the (incomplete) state complexities of the operands, f 1(m,n) = (m 1)(n 1)+1 and f 2(m,n) = (m 2)(n 2)+1. 2 Preliminaries We recall some asic notions aout finite automata and regular languages. For more details, we refer the reader to the standard literature [7,13,12]. Giventwointegersm,n Nlet[m,n] = {i N m i n}.adeterministic finite automaton (DFA) is a five-tuple A = (Q,Σ,δ,q 0,F) where Q is a finite set of states, Σ is a finite input alphaet, q 0 Q is the initial state, F Q is the set of final states, and δ is the transition function Q Σ Q. Let Σ = k, 1 http://www.dcc.fc.up.pt/pus/treports/tr13/dcc-2013-02.pdf

Q = n, and without lost of generality, we consider Q = [0,n 1] with q 0 = 0. The transition function can e naturally extended to sets in 2 Q and to words w Σ. A DFA is complete if the transition function is total. In this paper we consider DFAs to e not necessarily complete, i.e. with partial transition functions. The language accepted y A is L(A) = {w Σ δ(0,w) F}. Two DFAs are equivalent if they accept the same language. For each regular language, considering or not a total transition function, there exists a unique minimal complete DFA with a least numer of states. The left-quotient of L Σ y x Σ is D x L = {z xz L}. The equivalence relation L Σ Σ is defined y x L y if and only if D x L = D y L. The Myhill-Nerode Theorem states that a language L is regularif and only if L has a finite numer of equivalence classes, i.e., L has a finite numer of left quotients. This numer is equal to the numer of states of the minimal complete DFA. The state complexity, sc(l), of a regular language L is the numer of states of the minimal complete DFA of L. If the minimal DFA is not complete its numer of states is the numer of left quotients minus one (the dead state, that we denote y Ω, is removed). The incomplete state complexity of a regular language L (isc(l)) is the numer of states of the minimal DFA, not necessarily complete, that accepts L. Note that isc(l) is either equal to sc(l) 1 or to sc(l). The incomplete transition complexity, itc(l), of a regular language L is the minimal numer of transitions over all DFAs that accepts L. We omit the term incomplete whenever the model is explicitly given. A τ-transition is a transition laeled y τ Σ. The τ-transition complexity of L, itc τ (L) is the minimal numer of τ-transitions of any DFA recognizing L. It is known that itc(l) = τ Σ itc τ(l) [5,8]. The complexity of an operation on regular languages is the (worst-case) complexity of a language resulting from the operation, considered as a function of the complexities of the operands. Usually an upper ound is otained y providing an algorithm, which given representations of the operands (e.g. DFAs), constructs a model (e.g. DFA) that accepts the language resulting from the referred operation. To prove that an upper ound is tight, for each operand we can give a family of languages (parametrized y the complexity measures and called witnesses), such that the resulting language achieves that upper ound. For determining the transition complexity of an operation, we also consider the following measures and refined numers of transitions. Let A = ([0, n 1],Σ,δ,0,F)e a DFA, τ Σ,and i [0,n 1].We define f(a) = F, f(a,i) = F [0,i 1]. We denote y t τ (A,i) and in τ (A,i) respectively the numer of transitions leaving and reaching i. As t τ (A,i) is a oolean function, the complement is t τ (A,i) = 1 t τ (A,i). Let s τ (A) = t τ (A,0), a τ (A) = i F in τ(a,i), e τ (A) = i F t τ(a,i), t τ (A) = i Q t τ(a,i), t τ (A,[k,l]) = i [k,l] t τ(a,i), and the respective complements s τ (A) = t τ (A,0), e τ (A) = i F t τ(a,i), etc. Whenever there is no amiguity we omit A from the aove definitions. All the aove measures, can e defined for a regular language L, considering the measure values for its minimal DFA. For instance, we have, f(l), f(l,i), a τ (L), e τ (L), etc. We define s(l) = τ Σ s τ(l) and a(l) = τ Σ a τ(l).

Let A = ([0,n 1],Σ,δ,0,F) e a minimal DFA accepting a finite language, where the states are assumed to e topologically ordered. Then, s(l(a)) = 0 and there is exactly one final state, denoted π and called pre-dead, such that τ Σ t τ(π) = 0. The level of a state i is the size of the shortest path from the initial state to i, and never exceeds n 1. The level of A is the level of π. 3 Union Given two incomplete DFAs A = ([0,m 1],Σ,δ A,0,F A ) and B = ([0,n 1],Σ,δ B,0,F B ) the adaptation of the classical Cartesian product construction can e used to otain a DFA accepting L(A) L(B) [8]. Proposition 1. For any m-state incomplete DFA A and any n-state incomplete DFA B, oth accepting finite languages, mn 2 states are sufficient for a DFA accepting L(A) L(B). Proof. Here we adapt the proof of Han and Salomaa [6]. In the product automaton, the set of states is included in ([0,m 1] {Ω A }) ([0,n 1] {Ω B }), where Ω A and Ω B are the dead states of the DFA A and DFA B, respectively. The states of the form (0,i), where i [1,n 1] {Ω B }, and of the form (j,0), where j [1,m 1] {Ω A }, are not reachale from (0,0) ecause the operands represent finite languages; the states (m 1,n 1), (m 1,Ω B ) and (Ω A,n 1) are equivalent ecause they are final and they do not have out-transitions; the state (Ω A,Ω B ) is the dead state and ecause we are dealing with incomplete DFAs we can ignore it. Therefore the numer of states of the union of two incomplete DFAs accepting finite languages is (m+1)(n+1) (m+n) 2 1 = mn 2. Proposition 2. For any finite languages L 1 and L 2 with isc(l 1 ) = m and isc(l 2 ) = n, one has itc(l 1 L 2 ) τ Σ (s τ (L 1 ) s τ (L 2 ) (itc τ (L 1 ) s τ (L 1 ))(itc τ (L 2 ) s τ (L 2 ))) +n(itc(l 1 ) i(l 1 ))+m(itc(l 2 ) i(l 2 )), where for x,y oolean values, x y = min(x+y,1). Proof. In the product automaton, the τ-transitions can e 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 1 otherwise. The resulting DFA can not have transitions of the form ( 1, 1), neither of the form (α 0,β j ), where j [1,n 1] {Ω B } nor of the form (α i,β 0 ), where i [1,m 1] {Ω A }, as happened in the case of states. Thus, the numer of τ-transitions for τ Σ are: s τ(a) s τ(b)+t τ(a,[1,m 1])t τ(b,[1,n 1])+t τ(a,[1,m 1])(t τ(b,[1,n 1])+1) +(t τ(a,[1,m 1])+1)t τ(b,[1,n 1]) = s τ(a) s τ(b)+t τ(a,[1,m 1])t τ(b,[1,n 1])+t τ(a,[1,m 1])(n t τ(b,[1,n 1])) +(m t τ(a,[1,m 1]))t τ(b,[1,n 1]) = s τ(a) s τ(b)+nt τ(a,[1,m 1])+mt τ(b,[1,n 1]) t τ(a,[1,m 1])t τ(b,[1,n 1]).

As the DFAs are minimal, τ Σ t τ(a,[1,m 1]) corresponds to itc(l 1 ) s(l 1 ), and analogously for B. Therefore the proposition holds. Han and Salomaa proved [6, Lemma 3] that the upper ound for the numer of states can not e reached with a fixed alphaet. The witness families for the incomplete complexities coincide with the ones already presented for the state complexity. As we do not consider the dead state, our presentation is slightly different. Let m,n 1 and Σ = {,c} {a ij i [1,m 1],j [1,n 1], (i,j) (m 1,n 1)}. Let A = ([0,m 1],Σ,δ A,0,{m 1}) where δ A (i,) = i+1 for i [0,m 2] and δ A (0,a ij ) = i for j [1,n 1], (i,j) (m 1,n 1). Let B = ([0,n 1],Σ,δ B,0,{n 1}), where δ B (i,c) = i + 1 for i [0,n 1] and δ B (0,a i,j ) = j for j [1,n 1],i [1,m 1], (i,j) (m 1,n 1). Theorem 1. For any integers m 2 and n 2 there exist an m-state DFA A and an n-state DFA B, oth accepting finite languages, such that any DFA accepting L(A) L(B) needs at least mn 2 states and 3(mn n m) + 2 transitions, if the size of the alphaet can depend on m and n. 4 Intersection Given two incomplete DFAs A = ([0,m 1],Σ,δ A,0,F A ) and B = ([0,n 1],Σ,δ B,0,F B ) we can otain a DFA accepting L(A) L(B) y the standard product automaton construction. Proposition 3. For any m-state DFA A and any n-state DFA B, oth accepting finite languages, mn 2m 2n + 6 states are sufficient for a DFA accepting L(A) L(B). Proof. Consider the DFA accepting L(A) L(B) otained y the product construction. For the same reasons as in Proposition 1, we can eliminate the states of the form (0,j), where j [1,n 1] {Ω B }, and of the form (i,0), where i [1,m 1] {Ω A }; the states of the form (m 1,j), where j [1,n 2], and of the form (i,n 1), where i [1,m 2] are equivalent to the state (m 1,n 1) or to the state (Ω A,Ω B ); the states of the form (Ω A,j), where j [1,n 1] {Ω B }, and of the form (i,ω B ), where i [1,m 1] {Ω A } are equivalent to the state (Ω A,Ω B ) which is the dead state of the DFA resulting fron the intersection, and thus can e removed. Therefore, the numer of states is (m+1)(n+1) 3((m+1)(n+1))+12 1 = mn 2m 2n+6. Proposition 4. For any finite languages L 1 and L 2 with isc(l 1 ) = m and isc(l 2 ) = n, one has itc(l 1 L 2 ) (s τ (L 1 )s τ (L 2 )+(itc τ (L 1 ) s τ (L 1 ) τ Σ a τ (L 1 ))(itc τ (L 2 ) s τ (L 2 ) a τ (L 2 ))+a τ (L 1 )a τ (L 2 )).

Proof. Using the same technique as in Proposition 2 and considering that in the intersection we only have pairs of transitions where oth elements are different from 1, the numer of τ-transitions is as follows, which proves the proposition, s τ (A)s τ (B)+t τ (A,[1,m 1]\F A )t τ (B,[1,n 1]\F B )+a τ (A)a τ (B). The witness languages for the tightness of the ounds for this operation are different from the families given y Han and Salomaa ecause those families are not tight for the transition complexity. For m 2 and n 2, let Σ = {a ij i [1,m 2], j [1,n 2]} {a m 1,n 1 }. Let A = ([0,m 1],Σ,δ A,0,{m 1}) where δ A (x,a ij ) = x+i for x [0,m 1], i [1,m 2], and j [1,n 2]. Let B = ([0,n 1],Σ,δ B,0,{n 1}) where δ B (x,a ij ) = x+j for x [0,n 1], i [1,m 2], and j [1,n 2]. Theorem 2. For any integers m 2 and n 2 there exist an m-state DFA A and an n-state DFA B, oth accepting finite languages, such that any DFA accepting L(A) L(B) needs at least mn 2(m+n)+6 states and (m 2)(n 2)(2+ min(m,n) 3 i=1 (m 2 i)(n 2 i))+2 transitions, if the size of the alphaet can depend on m and n. Proof. For the numer of states, following the proof [6, Lemma 6], it is easy to see, that the words of the set R = {ε} {a m 1,a n 1 } {a ij i [1,m 2], and j [1,n 2]} are all inequivalent under L(A) L(B) and R = mn 2(m+n)+6. In the DFA A, the numer of a ij -transitions is (n 2) m 3 i=0 (m 1 i)+1, and in the DFA B, that numer is (m 2) n 3 i=0 (n 1 i) + 1. Let k = (m 2)(n 2) + 1. The DFA resulting from the intersection operation has: k transitions corresponding to the pairs of transitions leaving the initial states of the operands; (m 2)(n 2) min(m,n) 3 i=1 (m 2 i)(n 2 i) transitions corresponding to the pairs of transitions formed y transitions leaving non-final and non-initial states of the operands; and k transitions corresponding to the pairs of transitions leaving the final states of the operands. 5 Complement The state and transition complexity for this operation on finite languages are similar to the ones on regular languages. This happens ecause we need to complete 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 1 with isc(l) = m one has itc(l c ) Σ (m+1). Proof. The maximal numer of τ-transitions is m+1 ecause it is the numer of states. Thus, the maximal numer of transitions is Σ (m+1).

Gao et al. [5] gave the value Σ (itc(l)+2) for the transition complexity of the complement. In some situations, this ound is higher than the ound here presented, ut contrasting to that one, it gives the transition complexity of the operation as function of the transition complexity of the operands. The witness family for this operation is exactly the same presented in the refered paper, i.e. { m }, for m 1. 6 Concatenation Câmpeanu et al. [3] studied the state complexity of the concatenation of a m- state complete DFA with a n-state complete DFA over an alphaet of size k and proposed the upper ound m 2 i=0 min ki, f(a,i) ( ) n 2 j +min km 1, f(a) ( ) n 2 j which was proved to e tight for m > n 1. It is easy to see that the second f(a) ( ) n 2 term of (1) is if m > n 1, and k m 1, otherwise. The value k m 1 j indicates that the DFA resulting from the concatenation has states with level at most m 1. But that is not always the case, as we can see y the example 2 in Figure 2. This implies that (1) is not an upper ound if m < n. We have Proposition 7. For any m-state complete DFA A and any n-state complete DFA B, oth accepting finite languages over an alphaet of size k, the numer of states sufficient for a DFA accepting L(A)L(B) is: m 2 i=0 min ki, f(a,i) ( ) n 2 f(a) j + ( ) n 2 j In the following, we present tight upper ounds for state and transition complexity of concatenation for incomplete DFAs. Given two incomplete DFAs A = ([0,m 1],Σ,δ A,0,F A ) and B = ([0,n 1],Σ,δ B,0,F B ), that represent finite languages, the algorithm y Maia et al. for the concatenation of regular languages can e applied to otain a DFA C = (R,Σ,δ C,r 0,F C ) accepting L(A)L(B). The set of states of C is contained in the set ([0,m 1] {Ω A }) 2 [0,m 1], the initial state r 0 is 0, if 0 / F A, and 0,{0} otherwise; F C = { i,p R P F B }, and for τ Σ, δ C ( i,p,τ) = i,p with i = δ A (i,τ), if δ A (i,τ) or i = Ω A otherwise, and P = δ B (P,τ) {0} if i F A and P = δ B (P,τ) otherwise. The next result follows the lines of the one presented y Câmpeanu et al., with the aove referred corrections and omitting the dead state. 2 Note that we are omitting the dead state in the figures. (1) (2)

Proposition 8. For any m-state DFA A and any n-state DFA B, oth accepting finite languages over an alphaet of size k, the numer of states sufficient for a DFA accepting L(A)L(B) is: m 1 i=0 min ki, f(a,i) ( n 1 j ) f(a) + ( n 1 j ) 1. (3) Proposition 9. For any finite languages L 1 and L 2 with isc(l 1 ) = m and isc(l 2 ) = n over an alphaet of size k, and making j = ( ) ( n 1 j tτ(l 2) s τ(l 2) ) j, one has m 2 f(l 1,i) ( ) n 1 itc(l 1 L 2 ) k min ki, j + i=0 + min km 1 s τ (L 2 ), τ Σ f(l 1) 1 j f(l1) + 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 1]; ( 1,β) where 1 represents the asence of the transition from state π A to Ω A ; and ( 2,β) where 2 represents any transition leaving Ω A. In all forms, β is a set of transitions of DFA B. The numer of transitions of the form (i,β) is at most ( n 1 j m 2 i=0 min{ki, f(l 1,i) form (i,p), i [0,m 1] and P [0,n 1]. The numer of transitions of ) } which corresponds to the numer of states of the the form ( 1,β) is min{k m 1 s τ (L 2 ), f(l 1) 1 j }. The size of β is at most f(l 1 ) 1 and we need to exclude the non existing transitions from non initial states. On the other hand, we have at most k m 1 states in this level. However, if s τ (B,0) = 0 we need to remove the transition ( 1, ) which leaves the state (m 1,{0}). The numer of transitions of the form ( 2,β) is f(l 1) j and this case is similar to the previous one. To prove that that the ound is reachale we consider two cases depending whether m+1 n or not. Case 1: m+1 n The witnesslanguagesarethe onespresentedycâmpeanu et al. (see Figure 1). Theorem 3. For any integers m 2 and n 2 there exist an m-state DFA A and an n-state DFA B, oth accepting finite languages, such that any DFA accepting L(A)L(B) needs at least (m n+3)2 n 1 2 states and 6 2 n 1 8 transitions, if m+1 n.

(A) (B) 0 1 m 1 0 1 n 1 Fig.1. DFA A with m states and DFA B with n states. a 1 a 3 4 a 7 8 9 10 14 0 2 a 5 6 a 11 a 15 12 13 16 17 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 > 3 and are not accounted for y formula (1). Proof. The proof for the numer of states corresponds to the one presented y Câmpeanu et al.. The DFA A has m 1 τ-transitions for τ {} and f(a) = m. The DFA B has n 2 a-transitions and n 1 -transitions. Consider m n. If we analyse the transitions as we did in the proof of the Proposition 9 we have: 2 n 1 1 a-transitions and 2 n 1 1 -transitions that correspond to the transitions of the form (i,β); 2 n 1 2 a-transitions and 2 n 1 1 -transitions that correspondto the transitions of the form ( 1,β); and 2 n 1 2 a-transitions and 2 n 1 1 -transitions that correspond to the transitions of the form ( 2,β). Adding up those values we have the result. Case 2: m + 1 < n Let Σ = {} {a i i [1,n 2]}. Let A = ([0,m 1],Σ,δ A,0,[0,m 1]) where δ A (i,τ) = i + 1, for any τ Σ. Let B = ([0,n 1],Σ,δ B,0,{n 1}) where δ B (i,) = i+1, for i [0,n 2], δ B (i,a j ) = i+j, for i,j [1,n 2], i+j [2,n 1], and δ B (0,a j ) = j, for j [2,n 2]. Theorem 4. For any integers m 2 and n 2 there exist an m-state DFA A and an n-state DFA B, oth accepting finite languages, such that the numer of states and transitions of any DFA accepting L(A)L(B) reaches the upper ounds, if m+1 < n and the size of the alphaet can depend of m and n. Proof. The numer of τ-transitions of DFA A is m 1, for τ Σ. The DFA B has n 1 -transitions, n 2 a 1 -transitions, and n i a i -transitions, with i [2,n 2]. The proof is similar to the proof of Proposition 9.

Proposition 10. The upper ounds for state and transition complexity of concatenation cannot e reached with a fixed alphaet for m 0, n > m+1. Proof. Let S = {(Ω A,P) 1 P} R. A state (Ω A,P) S has to satisfy the following condition: i F A P 2 [0,n 1] with 0 P and τ Σ, such that δ C ((i,p ),τ) = (Ω A,P). The maximal size of S is f(a) 1( n 2 ) j. Assume that Σ has a fixed size k = Σ. Then, the maximal numer of words that reaches states of S from r 0 is f(a) i=0 ki+1. It is easy to see that for n > m sufficiently large f(a) i=0 ki+1 f(a) 1 ). 7 Star ( n 2 j Given an incomplete DFA A = ([0,m 1],Σ,δ A,0,F A ) accepting a finite language, a DFA B accepting L(A) can e constructed y an algorithm similar to the one for regular languages [8]. Let B = (Q B,Σ,δ B,{0},F B ) where Q B 2 [0,m 1], F B = {P Q B P F A } {0}, and for τ Σ, P Q B, and R = δ A (P,τ), δ B (P,τ) is R if R F A =, R {0} 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-statedfa Aaccepting a finite language with f(a) 2, 2 m f(a) 1 +2 m 2 1 states are sufficient for a DFA accepting L(A). Proof. The proof is similar to the proof presented y Câmpeanu et al.. Proposition 12. For any finite language L with isc(l) = m one has ( itc(l ) 2 m f(l) 1 k + ) 2 eτ(l) 2 nτ τ Σ τ Σ τ X2 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 y Câmpeanu et al., ut we have to exclude dead state (see Figure 3). Theorem 5. For any integer m 4 there exists an m-state DFA A accepting a finite language, such that any DFA accepting L(A) needs at least 2 m 2 +2 m 3 1 states and 9 2 m 3 2 m/2 2 transitions if m is odd or 9 2 m 3 2 (m 2)/2 2 transitions otherwise. 8 Reversal Given an incomplete DFA A = ([0,m 1],Σ,δ A,0,F A ), to otain a DFA B that accepts L(A) R, we first reverse all transitions of A and then determinize the resulting NFA.

(1) a,c,c,c 0 1 2 3 m 2 m 1 (2) a,c,c,c 0 1 2 3 m 2 m 1 Fig.3. DFA A with m states, with m even (1) and odd (2). Proposition 13. For any m-state DFA A, with m 3, accepting a finite language over an alphaet of size k 2, l 1 i=0 ki +2 m l 1 states are sufficient for a DFA accepting L(A) R, where l is the smallest integer such that 2 m l k l. Proof. The proof is similar to the proof of [3, Theorem 5]. We only need to remove the dead state. Proposition 14. For any finite language L with isc(l) = m and if l is the smallest integer such that 2 m l k l, one has, if m is odd, or, if m is even, l itc(l R ) i=0k i 1+k2 m l 2 l 1 i=0 tτ(l,i)+1, τ Σ itc(l R ) l i=0 k i 1+k2 m l τ Σ (2 ) l 2 i=0 tτ(l,i)+1 c τ (l), where c τ (l) is 0 if there exists a τ-transition reaching the state l and 1 otherwise. Proof. The smallest l that satisfies 2 m l k l is the same for m and m+1, and ecause of that we have to consider whether m is even or odd. Suppose m odd. Let T 1 e set of transitions corresponding to the first l 1 i=0 ki states and T 2 the set corresponding to the other 2 m l 1 states. We have that T 1 = l 1 i=0 ki 1, ecause the initial state has no transition reaching it. As the states of DFA B for thereversalaresetsofstatesofdfaawealsoconsidereachτ-transitionasaset. If all τ-transitions were defined its numer in T 2 would e 2 m l. Note that the transitions of the m l states correspond to the transitions of the states etween 0andl 1intheinitialDFAA,thusweremovethesetsthat hasnoτ-transitions. As the initial state of A has no transitions reaching it, we need to add one to the numer of missing τ-transitions. Thus, T 2 = τ Σ 2m l 2 ( l 1 i=0 (tτ(i)))+1. Let us consider m even. In this case we need also to consider the set of transitions that connect the states with the highest level in the first set with the states with the lowest level in the second set. As the highest level is l 1, we have to remove the possile transitions that reach the state l in DFA A.

(1) 0 1 p 2 p 1 2p 2 (2) 0 1 p 2 p 1 2p 3 Fig.4. DFA A with m = 2p 1 states (1) and with m = 2p (2). The witness family for this operation is the one presented y Câmpeanu et al. ut we omit the dead state (see Figure 4). Theorem 6. For any integer m 4 there exists an m-state DFA A accepting a finite language, such that any DFA accepting L(A) R needs at least 3 2 p 1 +2 states and 3 2 p 8 transitions if m = 2p 1 or 2 p+1 2 states and 2 p+2 7 transitions if m = 2p. 9 Final Remarks In this paper we studied the incomplete state and transition complexity of asic regularity preserving operations on finite languages. Tale 1 summarizes some of those results. For unary finite languages the incomplete transition complexity is equal to the incomplete state complexity of that language, which is always equal to the state complexity of the language minus one. As future work we plan to study the average transition complexity of these operations following the lines of Bassino et al. [1]. References 1. Bassino, F., Giamruno, L., Nicaud, C.: The average state complexity of rational operations on finite languages. Int. J. Found. Comput. Sci. 21(4), 495 516 (2010) 2. Beesley, K.R., Karttunen, L.: Finite State Morphology. CSLI Pulications, Stanford University (2003) 3. Câmpeanu, C., II, K.C., Salomaa, K., Yu, S.: State complexity of asic operations on finite languages. In: Boldt, O., Jürgensen, H. (eds.) WIA 1999. LNCS, vol. 2214, pp. 60 70. Springer (2001) 4. Cassandras, C.G., Lafortune, S.: Introduction to discrete event systems. Springer (2006) 5. Gao, Y., Salomaa, K., Yu, S.: Transition complexity of incomplete DFAs. Fundam. Inform. 110(1-4), 143 158 (2011) 6. Han, Y.S., Salomaa, K.: State complexity of union and intersection of finite languages. Int. J. Found. Comput. Sci. 19(3), 581 595 (2008) 7. Hopcroft, J.E., Ullman, J.D.: Introduction to Automata Theory, Languages and Computation. Addison-Wesley (1979) 8. Maia, E., Moreira, N., Reis, R.: Incomplete transition complexity of some asic operations. In: van Emde et al., P. (ed.) SOFSEM 2013. LNCS, vol. 7741, pp. 319 331. Springer (2013)

9. Maurel, D., Guenthner, F.: Automata and Dictionaries. College Pulications (2005) 10. Owens, S., Reppy, J.H., Turon, A.: Regular-expression derivatives re-examined. J. Funct. Program. 19(2), 173 190 (2009) 11. Salomaa, K., Yu, S.: NFA to DFA transformation for finite languages over aritrary alphaets. J. of Aut., Lang. and Com. 2(3), 177 186 (1997) 12. Shallit, J.: A Second Course in Formal Languages and Automata Theory. CUP (2008) 13. Yu, S.: Regular languages. In: Rozenerg, G., Salomaa, A. (eds.) Handook of Formal Languages, vol. 1, pp. 41 110. Springer (1997)