An algebraic characterization of strictly piecewise languages

Similar documents
CS311 Computational Structures Regular Languages and Regular Grammars. Lecture 6

Technische Universität München Winter term 2009/10 I7 Prof. J. Esparza / J. Křetínský / M. Luttenberger 11. Februar Solution

CS 573 Automata Theory and Formal Languages

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER MACHINES AND THEIR LANGUAGES ANSWERS

Nondeterministic Finite Automata

Nondeterministic Automata vs Deterministic Automata

= state, a = reading and q j

NON-DETERMINISTIC FSA

Minimal DFA. minimal DFA for L starting from any other

The Word Problem in Quandles

Coalgebra, Lecture 15: Equations for Deterministic Automata

Convert the NFA into DFA

A Lower Bound for the Length of a Partial Transversal in a Latin Square, Revised Version

Descriptional Complexity of Non-Unary Self-Verifying Symmetric Difference Automata

Compression of Palindromes and Regularity.

Hybrid Systems Modeling, Analysis and Control

1 PYTHAGORAS THEOREM 1. Given a right angled triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides.

Discrete Structures, Test 2 Monday, March 28, 2016 SOLUTIONS, VERSION α

On Implicative and Strong Implicative Filters of Lattice Wajsberg Algebras

Finite State Automata and Determinisation

Regular languages refresher

Chapter 3. Vector Spaces. 3.1 Images and Image Arithmetic

Matrices SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics (c) 1. Definition of a Matrix

Prefix-Free Regular-Expression Matching

CS 491G Combinatorial Optimization Lecture Notes

Bisimulation, Games & Hennessy Milner logic

Solutions for HW9. Bipartite: put the red vertices in V 1 and the black in V 2. Not bipartite!

Compiler Design. Spring Lexical Analysis. Sample Exercises and Solutions. Prof. Pedro C. Diniz

Part 4. Integration (with Proofs)

Introduction to Olympiad Inequalities

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2

Formal Languages and Automata

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb.

CMSC 330: Organization of Programming Languages

Counting Paths Between Vertices. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs

Nondeterminism and Nodeterministic Automata

Finite Automata-cont d

Regular expressions, Finite Automata, transition graphs are all the same!!

ON LEFT(RIGHT) SEMI-REGULAR AND g-reguar po-semigroups. Sang Keun Lee

1 Nondeterministic Finite Automata

Discrete Structures Lecture 11

Lecture Notes No. 10

CSCI 340: Computational Models. Kleene s Theorem. Department of Computer Science

Test Generation from Timed Input Output Automata

Lecture 08: Feb. 08, 2019

2.4 Theoretical Foundations

Grammar. Languages. Content 5/10/16. Automata and Languages. Regular Languages. Regular Languages

Myhill-Nerode Theorem

Mid-Term Examination - Spring 2014 Mathematical Programming with Applications to Economics Total Score: 45; Time: 3 hours

Project 6: Minigoals Towards Simplifying and Rewriting Expressions

Linear Algebra Introduction

Algorithms & Data Structures Homework 8 HS 18 Exercise Class (Room & TA): Submitted by: Peer Feedback by: Points:

Bases for Vector Spaces

6.5 Improper integrals

Learning Subregular Classes of Languages with Factored Deterministic Automata

LIP. Laboratoire de l Informatique du Parallélisme. Ecole Normale Supérieure de Lyon

where the box contains a finite number of gates from the given collection. Examples of gates that are commonly used are the following: a b

THE PYTHAGOREAN THEOREM

Lesson 2: The Pythagorean Theorem and Similar Triangles. A Brief Review of the Pythagorean Theorem.

Assignment 1 Automata, Languages, and Computability. 1 Finite State Automata and Regular Languages

Learning Subregular Classes of Languages with Factored Deterministic Automata

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton

Intermediate Math Circles Wednesday 17 October 2012 Geometry II: Side Lengths

Chapter 4 State-Space Planning

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

NFA DFA Example 3 CMSC 330: Organization of Programming Languages. Equivalence of DFAs and NFAs. Equivalence of DFAs and NFAs (cont.

Let's start with an example:

@#? Text Search ] { "!" Nondeterministic Finite Automata. Transformation NFA to DFA and Simulation of NFA. Text Search Using Automata

A Study on the Properties of Rational Triangles

State Minimization for DFAs

ILLUSTRATING THE EXTENSION OF A SPECIAL PROPERTY OF CUBIC POLYNOMIALS TO NTH DEGREE POLYNOMIALS

CS 301. Lecture 04 Regular Expressions. Stephen Checkoway. January 29, 2018

arxiv: v1 [math.ca] 21 Aug 2018

Logic Synthesis and Verification

Converting Regular Expressions to Discrete Finite Automata: A Tutorial

Lecture 1 - Introduction and Basic Facts about PDEs

System Validation (IN4387) November 2, 2012, 14:00-17:00

Petri Nets. Rebecca Albrecht. Seminar: Automata Theory Chair of Software Engeneering

Arrow s Impossibility Theorem

QUADRATIC EQUATION. Contents

5. (±±) Λ = fw j w is string of even lengthg [ 00 = f11,00g 7. (11 [ 00)± Λ = fw j w egins with either 11 or 00g 8. (0 [ ffl)1 Λ = 01 Λ [ 1 Λ 9.

12.4 Similarity in Right Triangles

nd edges. Eh edge hs either one endpoint: end(e) = fxg in whih se e is termed loop t vertex x, or two endpoints: end(e) = fx; yg in whih se e is terme

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers. Mehryar Mohri Courant Institute and Google Research

Pre-Lie algebras, rooted trees and related algebraic structures

TOPIC: LINEAR ALGEBRA MATRICES

Homework 3 Solutions

Necessary and sucient conditions for some two. Abstract. Further we show that the necessary conditions for the existence of an OD(44 s 1 s 2 )

Model Reduction of Finite State Machines by Contraction

Symmetrical Components 1

Chapter 2 Finite Automata

CS375: Logic and Theory of Computing

First Midterm Examination

Exercise sheet 6: Solutions

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true.

s the set of onsequenes. Skeptil onsequenes re more roust in the sense tht they hold in ll possile relities desried y defult theory. All its desirle p

First Midterm Examination

CS 310 (sec 20) - Winter Final Exam (solutions) SOLUTIONS

Figure 1. The left-handed and right-handed trefoils

Theory of Computation Regular Languages. (NTU EE) Regular Languages Fall / 38

Transcription:

An lgeri hrteriztion of stritly pieewise lnguges Jie Fu, Jeffrey Heinz, nd Herert G. Tnner University of Delwre jiefu,heinz,tnner@udel.edu Astrt. This pper provides n lgeri hrteriztion of the Stritly Pieewise lss of lnguges studied y Rogers et l. 2010. These lnguge re nturl sulss of the Pieewise Testle lnguges (Simon 1975) nd re relevnt to nturl lnguge. The lgeri hrteriztion highlights similrity etween the Stritly Pieewise nd Stritly Lol lnguges, nd lso leds to proedure whih n deide whether regulr lnguge L is Stritly Pieewise in polynomil time in the size of the syntti monoid for L. 1 Introdution Rogers et l. [12] study the Stritly Pieewise (SP), whih re proper sulss of the Pieewise Testle (PT) lnguges of Simon [13]. The Stritly Pieewise lnguges re interesting for two resons. First, there re severl senses in whih the SP lss is nturl. For exmple, SP is extly the lss of those lnguges losed under susequene [12]. Also, they er the sme reltion to Pieewise Testle lnguges tht the Stritly Lol (SL) er to Lolly Testle (LT) lnguges [10, 12]. Seond, this lss expresses some of the kinds of long-distne dependenies found in nturl lnguge [6, 12]. While Rogers et l. provide severl hrteriztions of SP lnguges, they do not provide n lgeri one. Also, the proedure they give for deiding whether regulr lnguge L elongs to SP is exponentil in the size of the smllest deterministi eptor for L. This pper ddresses these issues. It provides n lgeri hrteriztion for the SP lss. This result not only revels n importnt similrity etween the SP nd SL lnguges, ut lso leds to proedure whih deides whether L elongs to SP in time qudrti in the size of syntti monoid for L. However, it remins n open question whether polynomil time deision proedure exists in the size of the smllest deterministi eptor. The rest of this pper is orgnized s follows. Setion 2 reviews foundtionl onepts nd nottion. Setion 3 defines the Pieewise Testle (PT), Stritly Pieewise (SP), nd Strily Lol (SL) lsses. Setion 4 presents our lgeri hrteriztion of the SP lss nd Setion 5 desries the polynomil-time deision proedure. Finlly, Setion 6 onludes. This reserh is supportedygrnt #1035577 from the Ntionl Siene Foundtion.

2 Preliminries A semigroup is set with n ssoitive opertion. A monoid is semigroup with n identity element (written 1). If S is semigroup, S 1 denotes the monoid equl to S if 1 S nd to S {1} otherwise. A zero is n element 0 suh tht, for every s S, s0 = 0s = 0. The free semigroup (monoid) of set S is the set of ll finite sequenes of one (zero) or more elements from S. If x is n element of set S nd π prtition of S, the lok of π ontining x is [x] π. The prtition of S indued y n equivlene reltion ρ is S/ρ. A right (left) ongruene is prtition suh tht if [x] π = [y] π then [xz] π = [yz] π ([zx] π = [zy] π ). A ongruene is oth left nd right ongruene. Following Clifford [2], left (right) idel of semigroup S is non-empty suset T of S suh tht ST T (TS T). The left (right) idel of S generted y T is T ST = S 1 T (T TS = TS 1 ). The prinipl left (right) idel of S generted y t T is PL(t) = S 1 t (PR(t) = ts 1 ). Let Σ denote finite set, lled the lphet. Sets Σ + nd Σ denote the free semigroup nd free monoid of Σ, respetively. We refer to the elements of Σ + nd Σ s strings nd words interhngely. The unique string of length zero is denoted λ. The set Σ k denotes the set of ll words of length t most k. The length of string u is denoted u, nd w σ denotes the numer of ourenes of σ in w. A string v is ftor of w iff there exist strings x,y Σ suh tht w = xvy. A string v is prefix (suffix) of w iff there exist x Σ suh tht w = vx (w = xv). A string v is susequene of string w iff v = σ 1 σ n nd w Σ σ 1 Σ Σ σ n Σ, nd we write v w. Lnguges re susets of Σ. The omplement of lnguge L is L = {w Σ : w L}. A semiutomton is tuple A = {Q,Σ,T}, where Q is non-empty finite set of sttes nd Σ is the lphet. The trnsition funtion is prtil funtion T : Q Σ Q. The domin of the trnsition funtion is expnded to Q Σ reursively s follows. For ll q Q, T(q,λ) = q nd for ll w Σ nd σ Σ, T(q,w) = T(T(q,w),). It follows tht T(q,xy) = T(T(q,x),y). By definition semi-utomt re deterministi. A finite-stte utomton (FSA) is tuple A = {Q,q 0,Q f,σ,t}, where {Q,Σ,T} is semi-utomton, q 0 Q is the initil stte, nd Q f Q is set of finl sttes. The lnguge reognized y A is {w Σ : T(q 0,w) Q f }. AlngugeL is regulr iff there existsfsa reognizingit. Foreveryregulr lnguge L there is unique (up to isomorphism) utomton with the fewest numer of sttes reognizing L lled the nonil FSA for L. Astte q of n utomtonis sink stte iff, for ll σ Σ, if T(q,σ) is defined then T(q,σ) = q. One n lwys mke the trnsition funtion totl y dding nonfinl sink stte nd direting ll the missing trnsitions for eh stte to this sink. When the sink stte is dded to nonil eptor, it is the only stte whih is oth sink nd nonfinl. The resulting utomton is omplete.

For ny utomton A nd stte q Q, let ρ q e tht reltion suh tht, for ll elements x nd y of Σ, xρ q y iff T(q,x) = T(q,y). More generlly, let f x = ( ) q1 q n. T(q 1,x) T(q n,x) For ll x,y Σ, let xρy iff f x = f y. The equivlene reltion ρ over Σ indues ongruene over Σ [15]. The index of ρ is finite euse Q is finite. Let F A = {f x : x Σ } denote the finite monoid of mppings nd Ī(A) = Σ /ρ. Then F A is isomorphi to Ī(A) under the orrespondene of f x of F A with [x] of Ī(A), where [x] is the ρ-ongruene oset ontining x of Σ. In this pper, when writing f x nd [x], we hoose x to e shortest-length element in the ongruene lss without ny miguity. For FSA A, where A is the ssoited semiutomton of A, F A is lled the trnsformtion semigroup nd Ī(A) is the hrteristi semigroup of A. Elements f x of F A n lso e written in mtrix form µ x, where the rows nd olumns indite sttes in Q = {q 1,...,q n } nd µ x [i,j] = 1 iff T(q i,x) = q j. The set of mtries is nother semigroup, the trnsition semigroup. The nme isderivedfromthe ft tht ehelementin this semigroupis trnsitionmtrix ssoited to wlk x in A. We write U A = {µ x : x Σ }. Clerly U A is isomorphi to Ī(A) under the orrespondne of µ x of U A with [x] of Ī(A). Definition 1 (Pin 1997). The syntti semigroup of regulr lnguge L is the trnsformtion semigroup given y its omplete nonil semiutomton. In the syntti semigroup of n utomton A, the set of genertors of F A is Gen(F A ) = {f σ : σ Σ}. The syntti monoid of regulr lnguge L is the syntti semigroup with identity, Gen(F 1 A ) = {f σ : σ Σ λ}. Pin [11] disusses the equivlene etween utomt nd semigroups. Note tht sine the trnsition semigroup U A of A is represented s semigroup of oolenmtriesoforder Q Q, wordw is reognizedy A iffµ x (q 0,q f ) = 1 for some finl stte q f Q f. It follows tht finite utomton reognizes regulr lnguge L iff its trnsition semigroup reognizes L. A monoid grph is useful method employed y ontemporry lgeri theorists to visulize monoids. The nodes of the grph re elements in the monoid, though n initil node leled λ is inluded y onvention. The lels on edges re the elements in the set of genertorsof the monoid. Given monoid M, x s y iff xs = y, where x,y M, nd s Gen(M). The monoid grph of F A is denoted s MG(F A ). We mrk elements x in the monoid grph s finl iff f x F A nd there exists finl stte q in the nonil eptor suh tht T(q 0,x) = q [11]. Exmples of monoid grphs re in Figures 1,2, nd 3. Definition 2. A unique nonfinl sink stte in n utomton A is lled zero. An element f x is zero element of the trnsformtion semigroup iff ( ) q1... q f x = n. 0... 0

We use the nottion f x = 0 for the trnsformtion semigroup, µ x = 0 for the trnsition semigroup, nd x = 0 for the free semigroup Σ. The orresponding zero in the hrteristi semigroup Ī(A) is denoted [0]. While every omplete nonil utomton (exept the one reognizing Σ ) hs unique nonfinl sink stte, not every trnsformtion semigroup hs zero. 3 Pieewise Testle nd Stritly Pieewise lnguges The onept of susequene is entrl to the notion of pieewise testility. Definition 3. The priniple shuffle idel of v is the lnguge of ll words for whih v is susequene. We write SI(v) = {w Σ v w}. The Pieewise Testle lnguges is the smllest lss of lnguges inluding SI(w) for ll w Σ nd losed under Boolen opertions [13]. Similrly, the lss of Pieewise k-testle (PT k ) lnguges is the smllest lss of lnguges inluding SI(w) for ll w Σ k nd losed under Boolen opertions. A well-known hrteriztion of the PT lnguges is stted in terms of the sets ofsusequenes within words.ifp k (w) def = {v : v w nd v k} then the following hrteriztion (sometimes tken s the definition of PT [3]) holds. Theorem 1. A lnguge L is Pieewise Testle iff there exists k suh tht, for ll words w 1,w 2 Σ, if P k (w 1 ) = P k (w 2 ) then w 1 L iff w 2 L. When k is known, L is sid to e Pieewise k-testle (L PT k ). Simon proved one of the first exmples of wht lter eme known s Eilenerg s orrespondene theorem [11]. One of the reltions tht Green [4] defines on semigroups is the J reltion, whih reltes two elements of semigroup S if they generte the sme two-sided prinipl idel of S: J iff S 1 S 1 = S 1 S 1. A semigroup S is J-trivil iff, for ll, S, if J then =. Simon proved the following lgeri hrteriztion of pieewise testle lnguges. Theorem 2 (Simon 1975). A lnguge is Pieewise Testle iff its syntti monoid is J-trivil. As n exmple, onsider the lnguge of ll words with extly one, L = {w : w = 1}. The nonil eptor for this lnguge is shown in Figure 1. There re three elements in the monoid F 1 A 1 = {,1,0}, (for simpliity of nottion, let x stnd for f x ). The J-trivility is estlished y lulting F 1 A 1 xf 1 A 1, for ll x F 1 A 1 : F 1 A 1 F 1 A 1 = {0,}, F 1 A 1 1F 1 A 1 = {0,,1}, nd F 1 A 1 0F 1 A 1 = {0}. The J-trivility is stisfied, whih mens this lngunge L is pieewise testle. Rogers et l. [12] study proper sulss of the Pieewise Testle lnguges, the Stritly Pieewise lss. This pper tkes s definition of Stritly Pieewise lnguges those lnguges whih re losed under susequene. (Unknown to Rogers et l., lnguges losed under susequene were studied forty yers erlier y Hines [5] (see lso Higmn [7]).)

,, 1 2 λ,,, 0,, Fig.1. The nonil utomton nd the monoid grph for L = {w : w = 1}, whih is the lnguge of ll words with extly one. Definition 4. A lnguge is Pieewise Testle in the Strit Sense (L SP) iff, for ll w Σ, if w L nd v w then v L. Rogers et l. [12] estlish the following equivlenes (see lso [5]). Theorem 3. The following re equivlent: 1. L SP. 2. L = SI(X),X Σ. 3. L w S SI(w), for S finite. 4. there exists k suh tht if P k (w) P k (L) then w L. It follows from the third hrteriztion ove tht ny SP lnguge n e hrterized y finite set S. Elements of this set re the foridden susequenes, nd the lnguge is ll words whih do not ontin ny of these foridden susequenes. The longest word in S is the length k in the 4th hrteriztion ove, in whih se we sy L is Stritly k-pieewise (L SP k ). 1 By foridding susequenes, SP lnguges resemle the Strily Lol lnguges whih forid ftors [10]. Any SL lnguge L n e defined s the intersetion of the omplements of sets defined to e those words whih ontin foridden ftor. Formlly, let the ontiner of w Σ e C(w) = {u Σ : w is ftor of u } then lnguge L SL iff there exists finite set of foridden ftors S Σ suh tht L = w S C(w).2 Figure 2 shows the nonil eptor nd the monoid grph for the SL lnguge L = Σ Σ = C(), i.e. ll words exept those ontining the ftor. To illustrte SP lnguges, onsider the lnguge L = SI() SI(), whih is the lnguge of ll words exept those ontining either the susequenes or ; i.e., nd re the foridden susequenes. Thus this SP lnguge n e hrterized y the set {, } of foridden susequenes (or equivlently y the set Σ 2 /{,} of permissile susequenes [12]). Hene this lnguge elongs to SP 2. Figure 3 shows ths nonil utomt nd the monoid grph for L. The 0 element is not shown there, ut note tht ll missing edges go to 0. 1 While every SP lnguge is onvex [14], it is not the se tht ll onvex lnguges re SP sine, for exmple, there re nonempty suword-onvex lnguges tht do not ontin λ ut the only SP lnguge not ontining λ is the empty one. 2 The symols nd invoke left nd right word oundries nd re neessry euse SL lnguges mke distintions t word edges [10].

, 1 2 λ,,,,,, Fig.2. The nonil eptor nd the monoid for the lnguge L = C(), whih is ll words exept those ontining the ftor.,, 4 3 1 2 λ Fig.3. The nonil utomt nd the monoid grph of the syntti monoid of L = SI() SI(), i.e. the lnguge where the susequenes nd re foridden. As with the other pieewise testle lnguges like the one in Figure 1, it is not diffiult to verify tht the syntti monoid of this lnguge is J- trivil. However, this lnguge, like every other SP lnguge, hs two dditionl properties. Furthermore, no non-sp lnguge hs oth of these properties. 4 Algeri Chrteriztion of SP There re two importnt onepts tht need to e introdued. Definition 5. Let L e regulr lnguge reognized y FSA, nd onsider its hrteristi semigroup. Lnguge L is wholly nonzero if nd only if L = [0]. In other words, lnguge is wholly nonzero if nd only if every word not in the lnguge is in the zero lok of the hrteristi semigroup. In terms of the trnsformtion semigroup, this mens tht every word x not in the lnguge is zero; i.e., f x = 0. Theorem 4. A lnguge L is wholly nonzero if nd only if L is losed under prefix nd losed under suffix. Proof. Clerly, [0] L. Now suppose L is losed under prefix nd suffix, nd onsider ny x L. For ontrdition, suppose f x 0. Then in the nonil eptor A for L there re sttes q,q in A suh tht x trnsforms q to q. Sine

A is nonil, there exist strings w,y suh tht w trnsforms q 0 to q nd y trnsforms q to finl stte. Thus wxy L. Sine L is losed under prefix wx elongs to L nd sine L is losed under suffix, x elongs to L, whih ontrdits the ssumption. Therefore f x = 0, whih ompletes one diretion of the proof. Now suppose L = [0] nd onsider ny w L nd ny prefix (suffix) v of w, whih mens there exists x suh tht w = vx (w = xv). If v L then y ssumption f v = 0. It follows tht f w = f vx = 0f x = 0 (f w = f xv = f x 0 = 0), whih ontrdits tht w L. Oserve tht L = Σ nd the empty lnguge re wholly nonzero vuously. The following two orollries re lmost immedite. Corollry 1. The Stritly Pieewise lnguges re wholly nonzero. Proof. The Stritly Pieewise re losed under susequene y definition nd re therefore losed under prefix nd suffix. Corollry 2. The Stritly Lol lnguges re wholly nonzero. Proof. Consider ny Stritly Lol lnguge L nd ny w L. Sine w L, there re no foridden ftors in w nd therefore there re none in ny prefix or suffix of w. Hene every prefix nd suffix of w elongs to L s well. Tht oth the Stritly Lol nd Stritly Pieewise re wholly nonzero is nontrivil property they hve in ommon. To illustrte, rell the SL lnguge L = C() (Figure 2). Every string not in this SL lnguge trnsforms ny stte in its monoid grph to 0. These re ll the strings with the 2-ftor. Similrly, onsider gin the lnguge L = SI() SI() (Figure 3). Every string not in thissplngugetrnsformsnystteinitsmonoidgrphto0.thesereextly those strings with either susequene or. The seond property is n lgeri hrteriztion of wht Rogers et l. desrie in utomt-theoreti terms s missing edges propgte down. This mens tht if some stte q in the nonil epter does not hve trnsition leled with symol σ then no stte rehle from q hs n outgoing trnsition leled with σ. To pture this, we need the following onept relting to zeroes. Definition 6. Let M e monoid. The set of right nnihiltors of n element x M, is RA(x) = { M : x = 0}. In other words, the elements of RA(x) nnihilte x from the right. The set of left nnihiltors n e defined similrly, ut it does not ply role here. We now define the following property whih ptures the notion of missing edges propgting down. Definition 7. A lnguge L is right nnihilting iff for ny element f x in the syntti monoid F A (L), nd for ll f w in the priniple right idel generted y f x, it is the se tht RA FA(L)(f x ) RA FA(L)(f w ). The min theorem of this pper n now e stted nd proved.

Theorem 5. A lnguge L is SP iff L is wholly nonzero nd right nnihilting. Proof. By Corollry 1, ny SP lnguge is wholly nonzero. Next onsider ny L SP nd ny element f x nd ny f t RA FA(L)(f x ). It follows tht f x f t = 0; hene, f xt = 0. Sine L SP, there must e some v xt suh tht v is foridden; i.e SI(v) L. For ny f w in the prinipl right idel of f x, it is the se tht there exists f suh tht f w = f x f. Thus f w f t = f x f f t = f xt. Sine v xt it follows tht v xt nd therefore f w f t = f xt = 0 nd so f t RA FA(L)(f w ). The generlity of f w nd f t ensures tht w PR(x),RA FA(L)(f x ) RA FA(L)(f w ). Now for the other diretion. The empty lnguge vuously stisfies the ove onditions nd elongs to SP so onsider ny nonempty regulr lnguge L, whih is wholly nonzero nd right nnihilting. We show tht L elongs to SP. By ontrdition, suppose L is wholly nonzero nd right nnihilting, ut not in SP. By definition of SP, L is not losed under susequene. So there is some w nd v suh tht w L nd v w ut v L. Sine v w, there exists u 0,u 1,,u n suh tht for v = σ 1 σ 2...σ n, w = u 0 σ 1 u 1 σ 2 u 2 σ n u n. Sine v L nd sine L is wholly nonzero, v [0]. It will e useful to refer to the suffixes of v s follows: v i = σ i σ n for 1 i n. For exmple, v = v 1 = σ 1 σ n nd v 2 = σ 2 σ n, nd v n = σ n. Now v 2 is right nnihiltor of u 0 σ 1 sine u 0 σ 1 v 2 = u 0 v = u 0 0 = 0. Also, sine L is right nnihilting, RA(u 0 σ 1 ) is suset of RA(u 0 σ 1 u 1 ), nd so v 2 right nnihiltes u 0 σ 1 u 1 s well. Next onsider tht v 3 is right nnihiltor of u 0 σ 1 u 1 σ 2 sine u 0 σ 1 u 1 σ 2 v 3 = u 0 σ 1 u 1 v 2 nd ove we showed tht v 2 right nnihiltes u 0 σ 1 u 1. Agin, sine L is right nnihilting, RA(u 0 σ 1 u 2 σ 2 ) is suset of RA(u 0 σ 1 u 1 σ 2 u 2 ), nd so v 3 right nnihiltes u 0 σ 1 u 1 σ 2 u 2 s well. Crrying this rgument through to its onlusion, we see tht v n = σ n is right nnihiltor of u 0 σ 1 u 1 σ 2 u 2 u n 1 σ n 1. Therefore σ n is right nnihiltor ofu 0 σ 1 u 1 σ 2 u 2 u n 2 σ n 1 u n swell.heneu 0 σ 1 u 1 σ 2 u 2 u n 2 σ n 1 u n σ n = 0. But this mens tht w = u 0 σ 1 u 1 σ 2 u 2 u n 2 σ n 1 u n σ n u n = 0u n = 0. Sine L is wholly nonzero, it follows tht w L, whih ontrdits the redutio ssumption. Therefore there is no v,w suh tht w L, v w, nd v L. It follows tht regulr lnguges tht re wholly nonzero nd right nnihilting re losed under susequene nd re therefore SP. We illustrte this property in the ontext of the deision proedure we present elow for deiding whether regulr lnguge is SP. 5 Algorithms for SP lnguges Theorem 3 provides polynomil-time deision proedure for deiding whether ny regulr lnguge L is SP, nd if it is, it finds the finite set of the shortest foridden susequenes neessry to define L.

5.1 Deiding SP The input to the lgorithms elow is tken to e the monoid grph of the syntti monoid for regulr lnguge L, with the initil stte eing the node leled λ nd the finl sttes eing mrked. Sine this grph is determinsti, it is possile to otin the nonil eptor in time O(nlogn) [9]. Given miniml DFA A, the syntti monoid F A n e otined through the set of genertors {f σ }, σ Σ. The reder is referred to [1] for the onstrution method of syntti monoid F A. Theorem 3 provides the sis for the deision proedure, whih we ll DSP. DSP simply heks whether the syntti monoid stisfies the wholly nonzero nd the right nnihiltion onditions. The wholly nonzero ondition n e heked in two steps, essentilly y heking losure under prefixes nd suffixes. To hek losure under prefixes, one simplyneedhekwhethereverysttein thenonilepteraisfinl.ifthey re not, then the syntti monoid of A is not wholly nonzero. To hek losure under suffixes, oth the omplete nonil eptor nd the trnsformtion semigroup F A re exmined. Let 0 e the non-finl sink stte in the omplete utomton. If there exists one nonzero element f x in F A nd one noninitil stte q in the nonil eptor suh tht T(q,x) 0 ut T(q 0,x) = 0, then the wholly nonzero ondition is violted. If no suh f x or q exist, however, we n onlude the lnguge is wholly nonzero. Whether the right nnihilting ondition is stisfied n e determined from the Cyleytle forf A. The olumnsnd rowsofcyleytlereleledwith the elements in the syntti monoid F A, nd the ell is the produt(x y) of the row-th(x) nd olumn-th(y) elements [2]. Then for eh f x F A, the prinipl right idel generted y x (PR(x)) n e found y the union of ll distint elements in the xth row of the tle nd the right nnhiltors of x (RA(x)) re given y those elements y suh tht the x th row nd y th olumn is 0. Then for eh z PR(x), it is suffiient to hek whether RA(x) RA(z). If for ny x F A nd ny z PR(x), it is the se tht RA(x) RA(z) then the lgorithm exits nd returns flse. Otherwise it returns true. We illustrte these proedures with three exmples. Consider first the SP lnguge L = SI() SI() in Figure 3. The elements of its trnsformtion semigroup F A (L) = {f x,x Σ } re: ( ) ( ) ( ) 1 2 3 4 1 2 3 4 1 2 3 4 f = f = f = 0 0 3 4 ( ) 1 2 3 4 f = 0 0 0 3 ( ) 1 2 3 4 f = 0 0 0 2 2 0 0 3 ( ) 1 2 3 4 f = 2 0 0 2 ( ) 1 2 3 4 0 =. 0 0 0 0 f = 1 2 2 1 ( ) 1 2 3 4 0 0 2 1 Sine F A is isomorphi to the hrteristi semigroup Ī(A), it follows tht Ī(A) = {[0],[],[],[],[],[],[],[]}. The trnsition semigroup U(A) re the set of the djeny mtries given y eh string x in f x,f x F A.

λ λ λ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Tle 1. Cyley tle for syntti monoid for L = SI() SI(). The monoid grph for this lnguge is in Figure 3. Rell tht lthough the 0 element is not shown, it is understood tht ll missing edges go to 0. The Cyley tle is given in Tle 1. With little use of nottion, in the followingontext, x is used to denote the element f x in syntti monoid F A. The wholly non-zero ondition n e heked y exmining the syntti monoid. It is notied tht in this nonil epter ll sttes re finls nd there is no suh f x F A nd q Q suh tht T(q,x) 0 ut T(q 0,x) = 0. The next step is to determine whether the right nnihiltion ondition is stisfied with the help of Cyley tle. For exmple in the Cyley tle, the -row is ll the elements tht re in the right idel generted y, F 1 A = {,,0}. The elements in those olumns orresponding to 0s form the set RA() = {,,,}. The right nnihilting ondition requires tht w xf A, RA(x) RA(w). From the tle it is esy to verify tht RA() = {,,,,,}, whih is superset of RA(). Sine RA(0) = F A, it likewise follows tht RA() RA(0). The right nnihiltion ondition for other elements n e verified in the sme mnner nd it n e shown this syntti monoid is right-nnhilting. Now onsider the lnguge L = {w : w = 1} (Figure 1). L is not SP euse it does not stisfy the wholly nonzero ondition. The element is not in the lnguge ut it is not zero in its syntti semigroup. ForthelngugeL = C()inFigure2,thoughitstisfiesthewhollynonzero ondition, the right nnihilting ondition is violted. Oserve tht = 0 nd PR(). If L were right nnihilting then RA() RA(). However, = 0 nd thus the right nnihilting ondition is not met. Therefore, L = C() is not SP. 5.2 Finding the shortest foridden susequenes The following proedure Find-ssq tkes the syntti monoid of SP lnguge s input nd finds the finite set of shortest foridden susequenes whih desrie the SP lnguge. In order to link the syntti monoid nd the length of foridden susequenes, the monoid grph is employed. In MG(F A ), the set of the shortest pths tht led to 0 of F A form the set P(F A ).

Find-ssq egins with the syntti monoid for some L SP nd k = 1. 1. Clulte the set of sets of k-susequenes: P k (P(F A )) def = { {P k (p)} : p P(F A ) }. 2. Find ll singleton sets in P k (P(F A )) nd onstrut the set FS k, whih is the set of hypothesized foridden susequenes of length k. This set is formed y tking the union of the singleton sets in P k (P(F A )). If there is no singleton set found, updte k y one nd return to step 1. 3. Verify whether eh set P P k ( P(FA ) ) hs nonempty intersetion with FS k. If every set P does then FS k is set of foridden sequenes whih n define L nd L is Stritly k-pieewise. Otherwise, updte k y one nd return to step 1. Theorem 6. Find-ssq termintes t the shortest k for L SP. Proof. Suppose this k is not the shortest one for the SP lnguge L, nd there exists k > k suh tht L SP k. This mens tht there exists t lest one pth p P(F A ), with p > k, suh tht P k (p ) P k (L) nd P k (p ) P k (L) =, for some k > k. The ft tht P k (p ) P k (L) implies tht v P k (p ), v L, whih is gurnteed y the syntti monoid of L eing wholly nonzero. However, if the lgorithm does not terminte t k ensures tht there exists t lest one element h P k (p ) with h FS k. Sine FS k is the set of ll pths of length k tht led to 0, h / L. This ontrdits the previous sttement tht v P k (p ), v L. Therefore, no suh p exists nd thus the lgorithm termintes t the shortest k for the stritly pieewise lnguge L. We illustrte this lgorithm with the utomton in Figure 3, ssuming it hs lredy een verified with DSP tht it desries n SP lnguge. We refer to the monoid in Figure 3 with F A. The set of the shortest pths whih led to 0 is P(F A ) = {,,,,,,,,,,,,,,}. 1. For k = 1, ll sets in P =1 (P(F A )) re not singleton. Therefore, inrese k y 1. 2. For k = 2, P =2 (P(F A )) = { {},{},{,,},{,,},{,,}, {,},{,,},{,,},{,},{,,,,,},{,,,, },{,,,,,},{,,,},{,,,} }. The singleton sets re {},{} nd thus FS 2 = {,}. It is esy to verify tht for ll P P =2 (P(F A )), P hs nonempty intersetion with FS 2. The lgorithm termintes nd outputs {, }}, whih re the foridden susequenes whih desrie this lnguge. In sum, this proedure tells us tht this lnguge is SP for k = 2. Together DSP nd Find-ssq provide mens to hek whether regulr lnguge is SP, nd if it is to find the finite set of the shortest foridden susequenes. Wht is the time omplexity for DSP nd Find-ssq? Letting n e the size of the syntti monoid, the wholly nonzero ondition n e heked with time

O(n) nd right nnihilting ondition runs in time O(n 2 ). Thus DSP runs in O(n 2 ). Find-ssq runs t time O ( p rd(σ) ), where p is the totl numer of pths tht leds to 0. Holzer studies the size of the syntti monoid s nturl mesure of desriptive omplexity for regulr lnguges [8]. 6 Conlusion Stritly Pieewise lnguges re wholly nonzero nd right nnihilting. The wholly nonzero property is shred y the Stritly Lol lnguges nd provides definition for the Strit spet, independent of the reltion to the Testle lsses. Also, the lgeri hrteriztion for SP provides polynomil-time deision proedure for regulr lnguge in the size of its syntti monoid. This pper lso leves open some interesting questions. In prtiulr, we would like to know whether every wholly nonzero, J-trivil lnguge is right nnihilting. Referenes 1. Anderson, J.A.: Automt Theory with Modern Applitions. Cmridge University Press (2006) 2. Clifford, A.: The Algeri Theory of Semigroups. Amerin Mthemtil Soiety, Providene (1967) 3. Grí, P., Ruiz, J.: Lerning k-testle nd k-pieewise testle lnguges from positive dt. Grmmrs 7, 125 140 (2004) 4. Green, J.A.: On the struture of semigroups. The Annls of Mthemtis 54(1), pp. 163 172 (1951) 5. Hines, L.H.: On free moniods prtilly ordered y emedding. Journl of Comintoril Theory 6, 94 98 (1969) 6. Heinz, J.: Lerning long-distne phonottis. Linguisti Inquiry 41(4), 623 661 (2010) 7. Higmn, G.: Ordering y divisiility in strt lgers. Proeedings of the London Mthemtil Soiety 3(2), 326 336 (1952) 8. Holzer, M., König, B.: Regulr lnguges, sizes of syntti monoids, grph olouring, stte omplexity results, nd how these topis re relted to eh other. EATCS Bulletin 83, 139 155 (June 2004) 9. Hoproft, J.E.: An n log n lgorithm for minimizing sttes in finite utomton. Teh. rep., Stnford, CA, USA (1971) 10. MNughton, R., Ppert, S.: Counter-Free Automt. MIT Press (1971) 11. Pin, J.É., et A. Slom (éd.), G.R.: Syntti semigroups, vol. 1. Springer Verlg (1997) 12. Rogers, J., Heinz, J., Biley, G., Edlefsen, M., Vissher, M., Wellome, D., Wiel, S.: On lnguges pieewise testle in the strit sense. In: Eert, C., Jäger, G., Mihelis, J. (eds.) The Mthemtis of Lnguge. Leture Notes in Artifil Intelligene, vol. 6149, pp. 255 265. Springer (2010) 13. Simon, I.: Pieewise testle events. In: Automt Theory nd Forml Lnguges, pp. 214 222 (1975) 14. Thierrin, G.: Convex lnguges. In: ICALP 72. pp. 481 492 (1972) 15. Wtne, T., Nkmur, A.: On the trnsformtion semigroups of finite utomt. Journl of Computer nd System Sienes 26(1), 107 138 (1983)