• Aucun résultat trouvé

Regular Temporal Cost Functions

N/A
N/A
Protected

Academic year: 2021

Partager "Regular Temporal Cost Functions"

Copied!
25
0
0

Texte intégral

(1)

HAL Id: hal-00859355

https://hal.archives-ouvertes.fr/hal-00859355

Submitted on 6 Sep 2013

HAL is a multi-disciplinary open access

archive for the deposit and dissemination of

sci-entific research documents, whether they are

pub-lished or not. The documents may come from

teaching and research institutions in France or

abroad, or from public or private research centers.

L’archive ouverte pluridisciplinaire HAL, est

destinée au dépôt et à la diffusion de documents

scientifiques de niveau recherche, publiés ou non,

émanant des établissements d’enseignement et de

recherche français ou étrangers, des laboratoires

publics ou privés.

Regular Temporal Cost Functions

Thomas Colcombet, Denis Kuperberg, Sylvain Lombardy

To cite this version:

Thomas Colcombet, Denis Kuperberg, Sylvain Lombardy. Regular Temporal Cost Functions.

Inter-national Colloquium on Automata, Languages and Programming (ICALP), 2010, Bordeaux, France.

pp.563-574. �hal-00859355�

(2)

ThomasCol ombet

1

, DenisKuperberg

1

,SylvainLombardy

2

1

Liafa/CNRS/UniversitéParis 7,DenisDiderot,Fran e

2

Ligm-UniversitéParis-EstMarne-la-Vallée, Fran e

Abstra t. Regular ostfun tionshavebeenintrodu ed re entlyas an exten-siontothenotionofregularlanguageswith ounting apabilities,whi hretains strong losure, equivalen e,and de idabilityproperties.Thespe i ity of ost fun tionsisthatexa tvaluesarenot onsidered,butonlyestimated.

In this paper, we studythe stri tsub lassof regular temporal ost fun tions. Insu h ostfun tions,itisonlyallowedto ountthenumberofo urren esof onse utiveevents.Forthisreason,thismodelintendstomeasurethelengthof intervals,i.e.,adis retenotionoftime.Weprovidevariousequivalent represen-tations forfun tionsinthis lass,usingautomata,and` lo kbased'redu tion toregularlanguages.Weshowthatthe onversionsaremu hsimplertoobtain, andmu hmoree ientthaninthegeneral aseofregular ostfun tions. Ourse ondaiminthispaperistousetemporal ostfun tionasatest- asefor exploringthealgebrai natureof regular ostfun tions.Following theseminal ideasofS hützenberger,thisresultsinade idablealgebrai hara terizationof regulartemporal ostfun tionsinsidethe lassofregular ostfun tions.

1 Introdu tion

Sin etheseminal works ofKleene [Kle56℄ andRabin andS ott [RS59℄, thetheoryof regularlanguagesisoneofthe ornerstonesin omputers ien e.Regularlanguageshave manygoodproperties, of losure, of equivalent hara terizations,and of de idability, whi h makesthem entralin manysituations.

Re ently, the notion of regular ost fun tion for words has been presented as a andidateforbeingaquantitativeextensiontothenotionofregularlanguages[Col09 ℄, while retainingmostof thefundamental properties oftheoriginal theorysu h asthe losure properties, the various equivalent hara terizations, and the de idability. A ost fun tion is an equivalen e lass of thefun tions from the domain (wordsin our ase) to

N

, modulo an equivalen e relation

whi h allows some distortion, but preservestheboundedness propertyoverea h subsetofthedomain. Themodelisan extensiontothenotionoflanguagesinthefollowingsense:one anidentifyalanguage withthefun tionmappingea hwordinsidethelanguageto

0

,andea hwordoutside thelanguageto

. It isastri t extension sin eregular ostfun tions have ounting apabilities, e.g., ountingthenumberofo urren esofletters, measuringthelength ofintervals,et ...

Related worksand motivatingexamples

Regular ostfun tions arethe ontinuationofasequen eofworksthat haveintended to solve di ult questions in language theory. The prominent example is the star-heightproblem:givenaregularlanguage

L

andaninteger

k

,de idewhether

L

anbe expressed using a regular expression using at most

k

-nestingof Kleene stars. It was

(3)

re entlyproposedbyKirsten[Kir05℄. Thetwoproofsworkalongthesamelines:show thattheoriginalproblem anberedu edtotheexisten eofaboundoversomefun tion fromwordstointegers.Thisfun tion anberepresentedusinganautomatonthathave ountingfeatures (adistan e automatonfor Hashigu hi,and anesteddistan edesert automaton for Kirsten). The proof is on luded by showing that su h boundedness problemsarede idable.

Otherde isionproblems analsoberedu edtoboundednessquestions overwords: in languagetheorythenite powerproperty [Sim78,Has79℄ andthenite substitution problem[Bal04,Kir04℄,andinmodeltheorytheboundednessproblemofmonadi formu-lasoverwords[BOW09℄.Distan eautomataarealsoused inthe ontextofdatabases andimage ompression.AutomatasimilartotheonesofKirstenhavealsobeen intro-du edindependentlyinthe ontextofveri ation[AKY08℄.

Finally, using also ideasinspiredfrom [BC06℄, the theoryof those automata over wordshasbeenuniedin[Col09 ℄,inwhi h ostfun tionsareintrodu ed,andsuitable models of automata, algebra, and logi for dening them are presented and shown equivalent. Correspondingde idabilityresults areprovided. Theresulting theoryis a neat extension of the standardtheory of regularlanguages to aquantitative setting. All the limitedness problems from theliterature appear asspe ial instan es of those results,aswellasallthe entralresultsknownforregularlanguages.

Contributions

We introdu e thesub lass of regular temporal ost fun tions.Regular temporal ost fun tionsareregular ostfun tionsinwhi hone anonly ount onse utiveevents:for instan e,overthealphabet

{a, b},

themaximallengthofasequen eof onse utive let-ter

a

'sistemporal,whilethenumberofo urren esofletter

a

isnot.This orresponds to the model of desert automata introdu ed by Kirsten [Kir04℄. We believe that the notionofregulartemporal ostfun tionisofinterestinthe ontextofmodelizationof time.

We show that regular temporal ost fun tions admit various equivalent presenta-tions.Therstsu hrepresentationisobtainedasasynta ti restri tionofB-automata andS-automata(theautomatausedfordes ribingregular ostfun tions[Col09 ℄). Se -ond,weprovideanequivalent lo k-based presentation,inwhi htheregulartemporal ostfun tionsisrepresentedasaregularlanguageoverwordslabeledwiththeti ksof a lo kasan extrainformation. Weshowallthe losure resultsforregular temporal ostfun tions(e.g.,min,max,et ...)usingthispresentation.Asopposedtothegeneral theoryof regular ostfun tions,allthose resultsare obtainedbyatranslationtothe theoryofregularlanguages.Thisresultsin onstru tionsofbetter omplexity,bothin termsofnumberofstatesofautomata,andintermsofte hni alityofthe onstru tions themselves.Lastbutnotleast,whileinthegeneraltheoryofregular ostfun tionsthe error ommitted during the onstru tionis bounded by apolynomial,it is linearfor regulartemporal ostfun tions.

Our se ond ontributionis analgebrai hara terization of this lass. It is known from [Col09 ℄ that regular ost fun tions are the one re ognizable by stabilization monoids.Thismodelofmonoidsextendsthestandardapproa hforlanguages.Oneof ourobje tivesin studyingregular temporal ost fun tion wasto validatethe interest ofthisalgebrai approa h,andshowthatresultssimilartothefamousS hützenberger theorem on star-free languages [S h65℄ were possible. We believe that we su eeded in this dire tion, sin e we are able to algebrai ally hara terize the lass of regular

(4)

After somenotations,we present ost fun tions and ost automata in Se tion 2,and introdu e the sub lass of regular temporal ost fun tions. In Se tion 3 we propose a lo k-basedpresentation to temporal ost fun tions, and advo atesome of its ad-vantages. In Se tion 4 we present the algebrai formalism and sket h our algebrai hara terizationforregulartemporal ostfun tions.Wenally on lude.

Notations

We will note

N

the set of non-negative integers and

N

the set

N ∪ {∞}

, ordered by

0 < 1 < · · · < ∞

.If

E

isaset,

E

N

isthesetof innitesequen esof elementsof

E

(wewillnotuseherethenotionof innitewords).Su h sequen eswillbedenotedby boldletters (

a

,

b

,...). We will work with axed nite alphabet

A

. The set of words over

A

is

A

. The empty word

ǫ

, and

A

+

= A

\ {ǫ}

. The on atenation of words

u

and

v

is

uv

.Thelengthof

u

is

|u|

.Thenumberofo urren esofletter

a

in

u

is

|u|

a

.We willnote

inf E

and

sup E

thelowerandupperbounds ofaset

E ⊆ N

,in parti ular

inf ∅ = ∞

and

sup ∅ = 0

.

2 Regular ost fun tions

Thetheoryofregular ostfun tionshasbeenproposedin [Col09 ℄.Inthisse tion,we reviewsomeofthedenitionsusefulforthepresentpaper.

2.1 Basi son ost fun tions

Theprin ipleof ostfun tionsisto onsiderfun tionsmoduloanequivalen erelation

allowingsomedistortionsofthevalues.Thisdistortionis ontrolledusingaparameter (

α, α

, α

1

. . .

)whi hisamappingfrom

N

to

N

su hthat

α(n) ≥ n

forall

n

, alledthe orre tion fun tion.For

x, y ∈ N

,

x 4

α

y

meansthat either

x

and

y

arein

N

and

x ≤ α(y)

, or

y = ∞

. It is equivalent to write that

x ≤ α(y)

in whi h weimpli itly extend

α

to

N

by

α(∞) = ∞

. Forallsets

E

,

4

α

isnaturallyextendedto mappings from

E

to

N

by

f 4

α

g

if

f (x) 4

α

g(x)

forall

x ∈ E

,orequivalentlyif

f ≤ α ◦ g

(using thesameexpli itextensionof

α

).Theintuitionhereisto onsiderthat

g

dominates

f

upto a`stret hingfa tor'

α

. Wenote

f ≈

α

g

if

f 4

α

g

and

g 4

α

f

.Finally, wenote

f 4g

(resp.

f ≈g

)if

f 4

α

g

(resp.

f ≈

α

g

)forsome

α

.A ostfun tion (overaset

E

)is anequivalen e lass of

amongthesetoffun tions from

E

to

N

.

Therelation

4

hasother hara terizations:

Proposition 1 For allfun tions

f, g : E → N

,the following itemsareequivalent: 

f 4 g

,

 Forall

X ⊆ E

,

g

boundedover

X

implies

f

boundedover

X

.

Thelast hara terizationshowsthat

preservestheexisten eofbounds.

Toea hsubset

X ⊆ E

,oneasso iatesits hara teristi mapping

χ

X

from

E

to

N

whi h to

x

asso iates

0

if

x ∈ X

, and

otherwise. It is easy to see that

X ⊆ Y

i

χ

X

< χ

Y

. Inthis way, thenotionof ost fun tions anbeseenasanextension to

(5)

Inthis se tion, wewill des ribe howsomefun tions from

A

to

N

anbe a epted by ertainformsofautomatausing ountersofvaluerangingin

N

.Wenamesu h ost fun tions`regular'.

A ostautomaton isatuple

hQ, A, In, Fin, Γ, ∆i

where

Q

isanitesetofstates,

A

isanitealphabet,

In

and

Fin

are theset ofinitial and nal statesrespe tively,

Γ

is aniteset of ounters,and

∆ ⊆ Q × A × ({i, r, c}

)

Γ

× Q

istheset oftransitions. Thevalueofea h ounterrangesover

N

,andevolvesa ordingtoatomi a tions in

{i, r, c}

:

i

in rementsthevalueby

1

,

r

resets thevalueto

0

,and

c

he ksthevalue(but does not hange it). Ea h a tion in

({i, r, c}

)

Γ

tells for ea h ounter what sequen e ofatomi a tionshasto beperformed. Hen e,givenasequen eof a tions

u

, one an exe uteitasfollows:atthe begining, all ounters sharethe value

0

, andwereadthe word

u

letterbyletterfromlefttoright.Forea hletter,oneappliesthe orresponding sequen e ofatomi a tionson ea h ounter. One setsthe set

C(u)⊆ N

to ontainall valuesthataretakenbya ounterwhen he ked(thisset olle tsallthe he kedvalues indistin tly:there is nodistin tion on erningthe ounter thevalue originatesfrom, orthemomentofthe he k).

Arun

σ

of a ostautomatonoveraword

a

1

. . . a

n

isasequen ein

oftheform

(q

0

, a

1

, t

1

, q

1

)(q

1

, a

2

, t

2

, q

2

) . . . (q

n−1

, a

n

, σ

n

, q

n

)

su h that

q

0

is initial,

q

n

is nal (the run

ε

isalsovalidithereexists

q

0

,bothinitialandnal).Onesets

C(σ)= C(t

1

. . . t

n

)

, i.e.,to olle tthesetofvalues he kedwhenexe utingtherunoverthe ounters.

Atthis point, ostautomata areinstantiated intwoversions,namely

B

-automata and

S

-automata thatdiersbytheirdualsemanti s,

[[·]]

B

and

[[·]]

S

respe tively.These semanti s aredenedforall

u ∈ A

by:

[[A]]

B

(u) = inf{sup C(σ) : σ

runover

u} ,

and

[[A]]

S

(u) = sup{inf C(σ) : σ

runover

u} .

(Re all that

sup ∅ = 0

and

inf ∅ = ∞

) One says that a B-automaton (resp. an S-automaton)a epts

[[A]]

B

(resp.

[[A]]

S

).

Example 1. If

A

isastandardnon-deterministi automatona epting

L ⊆ A

, it an beseen as a ost automatonwithout any ounter. Seen asa B-automaton,we have

[[A]]

B

(u) = χ

L

,andseenasan

S

-automaton,

[[A]]

S

(u) = χ

A

\L

.

Example 2. Wedes ribethetwoone ounter ostautomata

A

and

A

bydrawings:

a : ic

b : r

a, b : ǫ

b : ǫ

a : i

a, b : cr

a, b : ǫ

Cir lesrepresentstates,and atransition

(p, a, t, q)

is denoted byanedge from

p

to

q

labeled

a : t

(the notation

a, b : t

abbreviatesmultiple transitions). Initial statesare identiedbyunlabeledingoingarrows,whilenalstatesuseunlabeledoutgoingarrows. One he ksthat

[[A]]

B

≈ [[A

]]

S

≈ f

a

where

f

a

(u) = max{n ∈ N / u = va

n

w}

.

AB-automaton issimple ifitusesa tionsin

{ǫ, ic, r}

Γ

.A S-automatonissimple ifit usesa tionsin

{ǫ, i, cr}

Γ

.Thefollowingtheoremis entralinthetheory:

(6)

Theorem3 ([Col09 ℄). The relations

4

and

are de idable for regular ost fun -tions.

2.3 Regular temporal ost fun tions

Thesubje tofthepaperisto studytheregulartemporal ostfun tions,asub lassof regular ostfun tions.Wegiveherearstdenition ofthis lass.

A

B

-automaton(resp.

S

-automaton)istemporal ifit usesonlya tionsin

{ic, r}

Γ

(resp.

{i, cr}

Γ

).Hen etemporalautomataaresimpleautomatainwhi hitisdisallowed inana tiontoleave ountersun hanged.Intuitively,su hautomata anonlymeasure onse utiveevents.We dene

temp

B

(resp.

temp

S

)to map sequen esin

{ic, r}

to

N

(resp.

{i, cr}

to

N

)whi hto

u

asso iates

(sup C(u))

(resp.

(inf C(u))

).Those fun -tionsareextendedtosetsof ountersandrunsasinthegeneral aseof ostautomata. We say that a ost fun tion is

B

-temporal (resp.

S

-temporal) if it is a epted by a temporal

B

-automaton(resp.atemporal

S

-automaton).Wewill seebelowthat these twonotions oin ide,upto

(Theorem7).

Example 3. Over the alphabet

{a, b}

, the ost fun tion

f

a

from Example 2 is

B

-temporal(as witnessedbytheexampleautomaton).

However, the fun tion

u 7→ |u|

a

is not B-temporal, even modulo

. Indeed, for the sake of ontradi tion, assume that there exists a temporal B-automaton

A =

hQ, A, In, Fin, Γ, ∆i

a epting

g

, with

g ≈

α

| · |

a

for some

α

. Let

K = |Q| + 1

and

N = α(K) + 1

.Let

σ

betherunof

A

over

u = (b

N

a)

K

whi h minimizes

sup C(σ)

(it hastoexistsin e

g(u) ≈

α

|u|

a

< ∞

).Sin e

K > |Q| + 1

,one ande ompose

u

as

xvy

su h that

|v|

a

≥ 1

,

|v| ≥ N

, andtherun

σ

assumessamestate

p

after readingboth

x

and

xv

.Let

σ

x

σ

v

σ

y

bethe orrespondingde ompositionoftherun

σ

.Assumerstthat thereexistsa ounterwhi hisneverresetduring

σ

v

,thenweget

g(u) ≥ N > α(|u|

a

)

. This ontradi ts

g ≈

α

| · |

a

.Hen eall ountershavetoberesetsomewherein

σ

v

. Con-sidertheword

u

m

= xv

m

y

.Oneeasily he ksthat

|u

m

|

a

≥ m

sin e

|u|

a

1

.However, therun

σ

x

σ

m

v

σ

y

witnessesthat

g(u

m

) ≤ max(g(u), |u|)

.Hen e

| · |

a

isunboundedover the

u

m

's, while

g

is bounded overthe sameset. This is a ontradi tion a ordingto Proposition1.

3 Clo k-form of temporal ost fun tions

Inthisse tion,wegiveanother hara terizationtoB-temporalandS-temporalregular ostfun tions. Thispresentationmakesuse of lo ks (the notionof lo kshould not be onfusedwiththenotionof lo kusedfortimed automata).

A lo k

c

is a word overthe alphabet

{

, ↓}

. It should be seenas des ribingthe ti ks ofa lo k:theletteris ifthereisnoti katthismoment,anditis

whenthere is a ti k. A lo k naturallydetermines a fa torization of time into intervals(we say segments).Here,onefa torizes

c

as:

c = (

n

1

−1

↓)(

n

2

−1

↓) . . . (

n

k

−1

↓)

m−1

.

Onesets

max−seg(c)

tobe

max{n

1

, . . . , n

k

, m} ∈ N

,and

min−seg

tobe

inf{n

1

, . . . , n

k

} ∈

N

(remarktheasymmetry). A lo k

c

has period

P ∈ N

if

n

1

= n

2

= · · · = n

k

= P

, and

m ≤ P

. This is equivalent to stating

3

max−seg(c) ≤ P ≤ min−seg(c)

. Remark

3

(7)

thatgiven

n

and

P

,thereexistsoneandonlyone lo koflength

n

andperiod

P

.You anremarkthat

max−seg(c) = temp

B

(h

B

(c)) + 1

inwhi h

h

B

maps to

ic

and

to

r

. Similarly,

min−seg(c) = temp

S

(h

S

(c)) + 1

inwhi h

h

B

maps to

i

and

to

cr

. A lo kon

u ∈ A

is a lo k

c

oflength

|u|

,Inthis ase,one denotesby

hu, ci

the wordover

A × {

, ↓}

obtainedbypairingthelettersin

u

andin

c

ofsameindex.For

L

alanguagein

(A × {

, ↓})

,wedenethefollowingfun tions from

A

to

N

:

hhLii

B

: u 7→ inf{max−seg(c) : c

lo kon

u, hu, ci ∈ L}

hhLii

S

: u 7→ sup{min−seg(c) : c

lo kon

u, hu, ci /

∈ L} + 1

Lemma1. For alllanguages

L ⊆ (A × {

, ↓})

,

hhLii

B

≤ hhLii

S

.

Proof. Fix

u

.Considertheminimal

P

su hthat the lo k

c

over

u

ofperiod

P

issu h that

hu, ci ∈ L

(ifthereisnosu hperiod,

hu,

|u|

i /

∈ L

,and

hhLii

S

(u) = ω

).We learly have

hhLii

B

(u) ≤ P

. On the other hand,

hu, c

i 6∈ L

, where

c

is the lo k over

u

of period

P − 1

.Hen e

hhLii

B

(u) ≤ P ≤ hhLii

S

(u)

.

Thenotations

hh·ii

B

and

hh·ii

S

areeasily onvertibleintotemporal ostautomataas shownbyFa t4.

Fa t 4 If

L

isregularand

L

(resp.

∁L

) isa eptedbyanon-deterministi automaton with

n

states, then

hhLii

B

− 1

(resp.

hhLii

S

− 1

)isa eptedby atemporalB-automaton (resp.atemporal S-automaton)with

n

statesandone ounter.

Proof. Wehave seenthat

max−seg = (temp

B

◦ h

B

) + 1

.Hen e, if werepla e in the automatonfor

L

ea htransitionoftheform

(p, (a, c), q)

byatransition

(p, a, h

B

(c), q)

, weimmediatelygetthedesiredtemporalB-automaton.The onstru tionfortemporal S-automataisidenti al, startingfromthe omplementautomaton,andusing

h

S

.

Theimportantdenitionisthefollowing:

Denition5 An

α

- lo k-language (or simply a lo k-language if there exists su h an

α

) is a language

L ⊆ (A × {

, ↓})

su hthat

hhLii

B

α

hhLii

S

. A fun tion

f

has an

α

- lo k-form ifthere existsan

α

- lo k-language

L

su hthat

hhLii

S

≤ f 4

α

hhLii

B

. A ostfun tion hasa lo k-form ifit ontainsafun tionthathas an

α

- lo k-formfor some

α

.Wenote

CF

the setof ostfun tionsthathave a lo k-form.

One an remark that it is su ient to prove

hhLii

S

4

α

hhLii

B

for proving that

L

is an

α

- lo k-language:Lemma 1providesindeedtheotherdire tion.

Example 4. For

L ⊆ A

,

K = L × {

, ↓}

isa lo k-language,whi hwitnessesthat

χ

L

hasan

identity

- lo k-form.

Example 5. Consider again the fun tion

f

a

of Example 2, omputing the maximal numberof onse utive

a

's. Thelanguage

M = ((a,

) + (b, ↓))

veries

hhM ii

B

≈ f

a

, but it is not a lo k-language:for instan e the word

ba

m

is su h that

f

a

(ba

m

) = m

, meanwhile,

hhM ii

S

(ba

m

) = 0

.This ontradi ts

hhM ii

S

≈ f

a

a ordingtoProposition1. This omes from thefa t that the lo k witnessing

hhM ii

B

≈ f

a

is hosengiventhe word(theoneti kingexa tlyover

b

-letters).Thisisin ontradi tionwiththeimportant intuitionbehindbeingin lo k-formwhi histhatthe lo k anbe hosenindependently fromtheword.

However, it is possible to onstru t a rational lo k-language

L

for

f

a

. It he ks thatea hsegmentof onse utive

a

's ontainsatmostoneti kofthe lo k,i.e.:

L = K[((b,

) + (b, ↓))K]

inwhi h

K = (a,

)

(8)

Let

u

beaword,and

c

bea lo ksu hthat

min−seg(c) = n

and

hu, ci 6∈ L

.Sin e

hu, ci 6∈

L

, there exists afa torof

u

of theform

a

k

in whi h there are twoti ksof the lo k. Hen e,

k ≥ n + 1

.Fromwhi hweobtain

hhLii

S

≤ f

a

.Conversely,let

u

beaword,and

c

bea lo ksu hthat

max−seg(c) = n

and

hu, ci ∈ L

. Let

k = f

a

(u)

.This meansthat thereis afa tor oftheform

a

k

in

u

.Sin e

hu, ci ∈ L

, thereisat mostoneti kofthe lo kinthisfa tor

a

k

.Hen e,

k ≤ 2n − 1

.Weobtainthat

f

a

< 2hhLii

B

.Hen e,

L

isan

α

- lo k-languagefor

f

a

,with

α : n 7→ 2n

.

Letus turnourselvesto losurepropertiesforlanguagesin lo k-form.Considera mapping

f

from

A

to

N

andamapping

h

from

A

to

B

(

B

beinganotheralphabet) thatweextendinto amonoidmorphismfrom

A

to

B

,the

inf

-proje tionof

f

(resp.

sup

-proje tion)with respe tto

h

is themapping

f

inf,h

(resp.

f

sup,h

)from

B

to

N

denedforall

v ∈ B

by:

f

inf,h

(v) = inf {f (u) : h(u) = v}

(resp.

f

sup,h

(v) = sup {f (u) : h(u) = v}

)

Thefollowingtheoremshows losurepropertiesof ostfun tionsin lo k-formthat areobtainedbytranslationtoadire t ounterpartinlanguagetheory:

Theorem6 Given

L, M α

- lo k-languages over

A

,

h

from

A

to

B

and

g

from

B

to

A

, wehave:



L ∪ M

isan

α

- lo k-language and

hhL ∪ M ii

B

= min(hhLii

B

, hhM ii

B

)



L ∩ M

isan

α

- lo k-language and

hhL ∩ M ii

S

= max(hhLii

S

, hhM ii

S

)



L

◦g

= {hu, ci : hg(u), ci ∈ L}

isan

α

- lo k-language and

hhL

◦g

ii

B

= hhLii

B

◦ g



L

inf,h

= {hh(u), ci : hu, ci ∈ L}

isan

α

- lo k-languageand

hhL

inf,h

ii

B

= (hhLii

B

)

inf,h



L

sup,h

= ∁ {hh(u), ci : hu, ci /

∈ L}

isan

α

- lo k-languageand

hhL

sup,h

ii

S

= (hhLii

S

)

sup,h

Proof. Theveitems followallthesameproofprin iple.Letus treatthe aseof

inf

-proje tion.Theequalityisprovedbythefollowingsequen eofequalities:

(hhL

inf,h

ii

B

)(v) = inf{max−seg(c) : hv, ci ∈ L

inf,h

}

= inf{max−seg(c) : hu, ci ∈ L, h(u) = v}

= inf{inf{max−seg(c) : hu, ci ∈ L} : h(u) = v}

= (hhLii

B

)

inf,h

(v)

Assume

L

is an

α

- lo k-language, it remains to be shown that

L

inf,h

is also an

α

- lo k-language.Let

v

beawordand

c

bethe lo kwitnessing

hhLii

B

(v) = n

,i.e.,su h that

hv, ci ∈ L

inf,h

and

max−seg(c) = n

.Let

c

bea lo kover

v

su hthat

min−seg(c

) >

α(n)

, we have to show

hv, c

i ∈ L

inf,h

. Sin e

hv, ci ∈ L

inf,h

, there exists

u

su h that

v = h(u)

and

hu, ci ∈ L

. Hen e, sin e

L

is an

α

- lo k-language,

hu, c

i ∈ L

. It

followsthat

hv, ci ∈ L

inf,h

.

Lemma2.

temp

B

and

temp

S

have

×2

- lo k-formswith

×2(n) = 2n

.

Proof. The proof for

temp

B

is the sameas in Example 5, in whi h one repla esthe letter

a

by

ic

andtheletter

b

by

r

.The

temp

S

sideissimilar.(SeeAppendixA.1)

Theorem7 If

f

isaregular ostfun tion,the following assertionsareequivalent: 1.

f

hasa lo k-form,

2.

f

isB-temporal,

3.

f

is omputedby atemporal

B

-automatonwith onlyone ounter, 4.

f

isS-temporal,

(9)

Proof. (1)

(3)followsfromFa t4.(3)

(2)istrivial.

(2)

(1): Consider atemporal B-automaton

A = hQ, A, In, Fin, Γ, ∆i

using ounters

Γ = {γ

1

, . . . , γ

k

}

.Arunof

A

isawordonthealphabet

B = Q × A × {ic, r}

Γ

× Q

.It followsfromthedenitionof

[[·]]

B

that forall

u ∈ A

:

[[A]]

B

(u) = inf

σ∈B

{max(χ

R

(σ), temp

B

◦ π

1

(σ), · · · , temp

B

◦ π

k

(σ)) : π

A

(σ) = u}

in whi h

R ⊆ ∆

is the (regular) set of valid runs; for all

i ∈ [[1, k]]

,

π

i

proje ts ea h transition

(p, a, t, q)

to the its

γ

th

i

omponent of

t

(and is extended to words). Finally

π

A

proje tsea h transition

(p, a, t, q)

to

a

(andisalsoextended towords).By Example 4,

χ

R

∈ CF

. By Lemma 2,

temp

B

∈ CF

, and by Theorem 6,

CF

is stable under omposition,

max

and

inf

-proje tion.Hen e

[[A]]

B

∈ CF

.

Theequivalen es(2)

(4)

(5)areprovedin asimilarway.

A tually,Theorem6andLemma2allowtostatethatifafun tion

f

isgivenbyoneof thevedes riptionsofTheorem7,thenforanyotheramongthesedes riptions,there existsafun tion

g

whi his

×2

-equivalentto

f

.

In the following, we will simply say that

f

is atemporal ost fun tion insteadof

B

-temporal or

S

-temporal.

Con lusion on lo k-forms, and perspe tives

Independentlyfromthese ondpartofthepaper,webelievethatsomeextra omments onthe lo k-formapproa hareinteresting.

First ofall,letusstresstheremarkablepropertyof the lo k-formpresentationof temporal ostfun tions:those anbeseeneither asdeningafun tion asaninmum (

hh·ii

B

) orasa supremum(

hh·ii

S

). Hen e,regular ostfun tion in lo k-forms anbe seeneither asB-automata orasS-automata. Thispresentation isin somesense `self-dual'.Nothingsimilarisknownforgeneralregular ostfun tions.

Anotherdieren ewiththegeneral aseisthatall onstru tionsareinfa t redu -tion to onstru tions for languages: This is parti ularly obvious in the statement of Theorem6.Furthermore,sin eeverythingisdoneat theleveloflanguages,wedonot requireanyspe i presentationforthelanguages.Those anbedes ribede.g.byany formof automataoralgebra.Forthis reason,anyspe i optimised onstru tionsfor regularlanguageshouldbereusableforregulartemporal ostfun tions.However,sin e twodierentlanguages

L, L

anbesu h that

hhLii

B

≈ hhL

ii

B

(even

hhLii

B

= hhL

ii

B

), onemustkeepawarethatoptimaloperationsperformedattheleveloflanguagessu h asminimizationwillnotbeoptimal anymorewhenusedfor des ribingtemporal ost fun tions.It is aperspe tiveof resear hto developdedi ated algorithmi forregular temporal ostfun tions.

Athirddieren eisthattheerror ommitted,whi hismeasuredbythestret hing fa tor

α

, is linear. This is mu h better than the general ase of ost fun tions, in whi h,e.g.,theequivalen ebetweenB-automataandS-automatarequiresapolynomial stret hingfa tor.However,wedonottakeyetfulladvantageofthisinthepresentpaper sin ewedo nottryto use this pre ision,e.g., in new de isionpro edures.There are alsohereresear hestobe ondu ted.

In fa t, the argument underlying temporal ost fun tions in lo k-forms is inter-esting perse: it onsists in approximating somequantitativenotion, herethe notion oflengthofintervals,usingsomeextraunaryinformation, heretheti ksofthe lo k. Sin eunaryinformation anbehandledbyautomata,theapproximationofthe

(10)

quan-to onsiderti ksofa lo koveraninniteword(infa tthefa tthatwordsareniteis evenentailingproblems).Itwouldbenodierentontrees(seenasabran hing presen-tationoftime),betheyniteorinnite.Keepingonthesametra k,a lo kisevennot requiredto ountthetime, it ould ountsome events alreadywritten on theinput, su h asthenumberof

a

's,et .These examplesshowtheversatilityoftheapproa h.

4 Algebrai approa h

We rst re all denitions of lassi semigroups and stabilization semigroups for the general aseofregular ostfun tions.Weusetheminade idablealgebrai hara ter-izationoftemporal ostfun tions.

4.1 Standard semigroups

Denition Anorderedsemigroup

S

= hS, ·, ≤i

isaset

S

endowedwithanasso iative produ t

· : S × S → S

andapartial order

over

S

ompatible with

·

(i.e. if

a ≤ a

and

b ≤ b

,then

a · b ≤ a

· b

).

An idempotent elementof

S

isanelement

e ∈ S

su hthat

e · e = e

.Wenote

E(S)

thesetofidempotentelementsof

S

.

Re ognizing languages Inthestandardtheory,the re ognitionof alanguageby a nite semigroup is made through a morphism from wordsinto the semigroupwhi h anbede omposedinto twosteps:rst, alength-preservingmorphism

h : A

+

→ S

+

, where

S

+

isthesetofwordswhoselettersarein

S

,andse ondthefun tion

π

:

S

+

→ S

whi hmapseverywordon

S

ontotheprodu tofitsletters.Thelanguage

L

re ognized by the triple

(S, h, P )

, where

P

is a subset of

S

, is

L = h

−1

−1

(P )

, i.e.

u ∈ L

i

π(h(u)) ∈ P

.

Itisstandardthatlanguagesre ognizedbynitesemigroupsareexa tlytheregular languages.Itisalsobynowwellknownthatfamiliesofregularlanguages anbe har-a terizedbyrestri tionsonthesemigroupswhi hre ognizethem. Thisisforinstan e the asein Eilenberg's variety theoremorinS hützenberger'stheorem hara terizing star-freelanguagesastheonere ognizedbyaperiodi semigroups[S h65℄.

4.2 Stabilization semigroup

Thenotionof stabilization monoidhas been introdu ed in [Col09 ℄ asaquantitative extensionofstandardmonoids,forthere ognitionof ostfun tions.Stabilization semi-groupis a more onvenient obje t in the presentpaper,sin e the empty word plays a spe ial role (it has length

0

). The relationship between stabilization monoids and stabilization semigroupsis made expli it in [Col09b℄. A side ee t is that it is more easyto speakaboutregular ostfun tions overnon-emptywords.Wedoitfrom now forsimpli ity.

Denition8 A stabilization semigroup

hS, ·, ≤, ♯i

is an ordered semigroup

hS, ·, ≤i

together withanoperator

♯: E(S) → E(S)

( alled stabilization)su hthat:

 for all

a, b ∈ S

with

a · b ∈ E(S)

and

b · a ∈ E(S)

,

(a · b)

= a · (b · a)

· b

;  for all

e ∈ E(S)

,

(e

)

= e

≤ e

;  for all

e ≤ f

in

E(S)

,

e

≤ f

;

Inthispaper,weonly onsidernitestabilizationsemigroups.Theintuitionofthe

operatoristhat

e

representsthevaluethatgets

e

`whenrepeatedmanytimes'.This maybedierentfrom

e

ifoneisinterestedin ountingthenumberofo urren esof

e

.

(11)

Therststepforre ognizing ostfun tionistoprovidea`quantitativesemanti 'tothe stabilizationsemigroup

S

= hS, ·, ≤, ♯i

.Thisisdonebyamapping

ρ

nameda ompatible mapping, whi h maps everyword of

S

+

to aninnitenon-de reasingsequen e of

S

N

(the original denition doesnot use non-de reasing sequen es, but is equivalent, see e.g.,[Col09 ℄).Theprin ipleisthatthe

i

thpositioninthesequen e

ρ(u)

tellsthevalue oftheword

u

forathreshold

i

separatingwhatis onsideredasfewandaslot.Thisis betterseenonanexample.

Example 6. Considerthefollowingstabilizationsemigroup:

b a 0

b b a 0

b

a a a 0

0

0 0 0 0

0

b

a

0

b

a

0

a, b

0

0, a, b

Itisgivenbothbyitstableofprodu taugmentedbya olumnforthestabilizationand byitsCayleygraph.IntheCayleygraphthereisanedgelabelledby

y

linkingelement

x

to element

x · y

. Thereis furthermoreadouble arrowgoing fromea hidempotent to itsstabilizedversion.

The intention is to ount the number of

a

's. Words with no

a

's orrespond to element

b

.Wordswithatleastone,butfew

a

's orrespondtoelement

a

.Finally,words that ontainalotof

a

'sshouldhavevalue

0

:forinstan e,

a

= 0

witnessesthatiterating alot oftimeawordwithatleastone

a

yieldsawordwithalotof

a

's.

A possible ompatible mapping

ρ

forthis stabilizationsemigroupatta hesto ea h word over

{b, a, 0}

+

an innite sequen e of values in

{b, a, 0}

as follows: everyword in

b

+

ismappedtothe onstantsequen e

b

;everyword ontaining

0

ismappedtothe onstantsequen e

0

;everyword

u ∈ b

(ab

)

+

ismappedto

0

forindi esupto

|u|

a

− 1

and

a

for indi e

|u|

a

and beyond. Theideais that forathreshold

i < |u|

a

, theword is onsideredashavingalotof

a

'sinfrontof

i

(hen evalue

0

),whileithasfew

a

'sin frontof

i

for

i ≥ |u|

a

(hen e thevalue

a

). One anseethat this sequen e` odes'the numberof

a

'sin thepositionin whi hitswit hesfrom value

0

to value

a

.

Aformaldenitionofa ompatiblemappingrequirestostatethepropertiesithas to satisfy, and whi h relate it to the stabilisation monoid. This would requiremu h more material, and we have to stay at this informal level in this short paper (See Appendix A.6). The important resulthereis that givena nitestabilization monoid, there exists a mapping ompatible with it, and furthermore that it is unique up to anequivalen e

(whi hessentially orrespondsto

)[Col09 ,Col09b℄. Hen e,inthe aboveexample,the ompatiblemappingdes ribedistheuniquepossible(upto

).

Nowthat weknow what the semanti s of stabilization semigroupslook like, one uses it for re ognizing ost fun tions. Instead of omputing the produ t of elements and he king whether it belongs to a subset

P

of the semigroup, the quantitative re ognition onsists in onsidering the innite sequen e obtained by the ompatible mappingandobservingtherstmomentitleavesaxedideal

I

of thesemigroup(an idealisadownward

- losedsubset).Formally,the ostfun tion

f

over

A

+

re ognized by

(S, h, I)

is

f : u 7→ inf{n ∈ ω, ρ(h(u))(n) /

∈ I}

, where

h : A

+

→ S

+

is a length-preservingmorphism,and

ρ

isamapping ompatiblewith

S

.

Typi ally,ontheaboveexample,theidealis

{0}

,and

h

mapsea h letterin

{a, b}

to the element of same name. For all words

u ∈ {a + b}

+

, the value omputed is exa tly

|u|

a

.

(12)

semigroup.

Likeforregularlanguages,thisalgebrai presentation anbeminimized.

Theorem10 If

f

is aregular ost fun tion,there existsee tively a (quotient-wise) minimal stabilizationsemigroup re ognizing

f

.

Thisminimalstabilizationsemigroup anbeobtainedfrom

(S, h, I)

byaMoore algo-rithm omputingthe oarsest ongruen e, ompatiblewiththesemigroupand stabiliza-tionoperations,whi hseparateselementsof

I

fromtheotherelements.Thispro edure ispolynomialin thesize of

S

.(SeeAppendixA.7)

4.4 Temporalstabilization semigroups

Letusnow hara terizetheregulartemporal ostfun tions. We say that an idempotent

e

is stable if

e

= e

. Otherwise it is unstable. The intuitionisthat stableidempotentsarenot ountedbythestabilizationsemigroup(

b

intheexample),whiletheiterationofunstableidempotentsmatters(

a

intheexample).

Denition11 Let

S

= hS, ·, ≤, ♯i

beastabilizationsemigroup.

S

is temporalifforall idempotents

s

and

e = x · s · y

,if

s

isstable then

e

isalsostable.

For instan e, the example stabilization semigroup is not temporal sin e

b

is stable but

a = a · b · a

isunstable.Thisisrelatedtotemporal ostfun tions asfollows:

Theorem12 Let

f

bearegular ostfun tion,the following assertionsareequivalent:



f

istemporal



f

isre ognizedby atemporal stabilizationsemigroup

 the minimal stabilizationsemigroup re ognizing

f

istemporal

Wewill brieygiveanideaonhowthedenition oftemporalsemigroupsisrelatedto theintuitionof onse utiveevents.Indeed,anunstableidempotentmustbeseenasan eventwewantto`measure',whereaswearenotinterestedinthenumberofo urren es ofastableidempotent.Butifwehave

e = x · s · y

with

e

unstableand

s

stable,itmeans that wewantto` ount'thenumberofo urren esof

e

without ountingthenumber of

s

within

e

. In other words,wewant to in rement a ounter when

e

is seen, but

s

anbe repeateda lot inside asingleo urren eof

e

. Toa omplishthis, wehaveno other hoi e but doinga tion

ǫ

on the ounter measuring

e

while reading allthe

s

's, however,thiskindofbehaviourisdisallowedfortemporalautomata.

The twolast assertionsare equivalent, sin etemporalityis preserved by quotient ofstabilizationsemigroups.Onourexample,thestabilizationsemigroupisalreadythe minimalonere ognizingthenumberofo urren esof

a

,andhen e,this ostfun tion isnottemporal.Wegaveadire tproofforthisfa t inExample3.

Corollary1. The lass oftemporal ostfun tionsisde idable.

The orollaryisobvioussin etheproperty anbede idedontheminimalstabilization semigroup, whi h an be omputed either from a ost automaton or a stabilization

(13)

Wedenedasub lassofregular ostfun tions alledthetemporal lass.Ourrst def-inition used ostautomata.Wethen hara terizedregulartemporal ostfun tions as theonesdes ribableby lo k-languages.Thispresentationallowstoreuseallstandard onstru tionforregularlanguagestakenfrom lassi languagetheory.Wethen hara -terizedthe lassin thealgebrai frameworkof stabilizationsemigroups,thealgebrai notionallowingtodes riberegular ostfun tions.Thistogetherwiththe onstru tion ofminimalstabilizationsemigroupsgaveusade isionpro edureforthetemporal lass, andhopefullyformore lassesinfuture works.

The later de idable hara terization result alls for ontinuations. Temporal ost fun tions orrespond to desert automata of Kirsten [Kir04℄, but other sub lasses of automataarepresentintheliteraturesu hasdistan eautomata(whi h orrespondto one- ounter no-resetB-automata)ordistan e desert automata (a spe ial aseof two ountersB-automata).Istherede idable hara terizationsfortheregular ostfun tions des ribed bythose automata? More generally, what is the nature of thehierar hyof ounters?

Referen es

[AKY08℄ ParoshAzizAbdulla,PavelKr al,andWangYi.R-automata.InFran kvanBreugel and Mar haChe hik,editors, Pro eedings ofCONCUR'08,Toronto,Canada., vol-ume5201ofLe tureNotesinComputerS ien e,pages6781.Springer-Verlag,2008. [Bal04℄ Sebastian Bala. Regularlanguage mat hingand otherde idable asesof the sat-isability problemfor onstraintsbetween regularopenterms. InSTACS, volume 2996 ofLe ture NotesinComputer S ien e,pages596607.Springer,2004. [BC06℄ Mikolaj Boja« zykand Thomas Col ombet. Bounds in

ω

-regularity. InLICS06,

pages285296,August2006.

[BOW09℄ A him Blumensath, Martin Otto, and Mark Weyer. Boundedness of monadi se ond-order formulae overnite words. In36th ICALP, Le ture Notes in Com-puterS ien e,pages6778.Springer,July2009.

[Col09a℄ ThomasCol ombet.Regular ostfun tionsoverwords.Manus riptavailableonline, 2009.

[Col09b℄ Thomas Col ombet. Regular ost fun tions,part i:logi and algebra overwords. Submitted,2009.

[Col09 ℄ ThomasCol ombet.Thetheoryofstabilizationmonoidsandregular ostfun tions. ICALP,Le tureNotesinComputer S ien e,2009.

[Egg63℄ L. C. Eggan. Transition graphs and the star-height of regular events. Mi higan Math. J.,10:385397,1963.

[Has79℄ KosaburoHashigu hi. A de isionpro edurefor theorderof regularevents. Theo-reti alComputerS ien e,8:6972,1979.

[Has88℄ K.Hashigu hi. Relativestarheight,star height andniteautomatawithdistan e fun tions. InFormalPropertiesofFiniteAutomataandAppli ations,pages7488, 1988.

[Has90℄ K. Hashigu hi. Improved limitedness theorems onnite automata with distan e fun tions. Theor.Comput.S i.,72:2738, 1990.

[Kir04℄ Daniel Kirsten. Desert automataandthe nitesubstitution problem. InSTACS, volume2996ofLe tureNotesinComputerS ien e,pages305316.Springer,2004. [Kir05℄ Daniel Kirsten. Distan e desertautomata and thestar height problem. RAIRO,

3(39):455509,2005.

[Kle56℄ StephenC.Kleene. Representationofeventsinnervenetsandniteautomata. In C.E.ShannonandJ.M Carthy,editors,AutomataStudies,pages342. Prin eton

(14)

IBMJ.Res. andDevelop.,3:114125, April1959.

[S h65℄ M.-P.S hützenberger.Onnitemonoidshavingonlytrivialsubgroups.Information andControl8,pages190194,1965.

(15)

A.1 Some proofs on

S

-automata

temp

S

-side of Lemma2 Wewill onstru tarationallanguage

L ×2

- lo k-formof

temp

S

.

Wewill saythat a lo k

c

is ompatible withaword

u

on

{i, cr}

+

if

u

and

c

have thesamelengthandthereisatmostone

ofthe lo k

c

insomeblo kof

i

'sendedby a

cr

in

u

.Let

L = {hu, ci, c

ompatiblewith

u}

L = K[((cr,

) + (cr, ↓))K]

((i,

) + (i, ↓))

in whi h

K = (i,

)

+ (i,

)

(i, ↓)(i,

)

.

We will show that

L

is a

×2

- lo k-form of

temp

S

. We just need to show that

temp

S

4 ϕ

B

L

and

hhLii

S

4 temp

S

. Let

u ∈ {a, b}

+

, and

c

be a lo k on

u

su h that

hu, ci ∈ L

and

max−seg(c)

is minimal. Let

n = temp

S

(u)

be the size of the smallestblo k of

i

's in

u

followed by a

cr

. If

max−seg(c) ≤ ⌊n/2⌋

, there isat leasttwo

of

c

inthe smallest(thereforein any) blo k of

i

'sfollowed by a

cr

in

u

, so

c

annotbe ompatible with

u

. Hen e we musthave

hhLii

B

(u) = max−seg(c) > ⌊n/2⌋ = ⌊temp

S

(u)/2⌋

.Thisistrueforall

u

,so

temp

S

4

×2

hhLii

B

.

Wenowneedtoshowthat

hhLii

S

4 temp

S

. Let

u ∈ A

+

,and

c

bea lo kon

u

su hthat

hu, ci /

∈ L

and

min−seg(c)

ismaximal.

hu, ci /

∈ L

impliesthat thereistwo

in

c

in anyblo kof

i

'sended bya

cr

in

u

.This implies

min−seg(c) ≤ temp

S

(u)

. Hen e bydenition of

c

,

hhLii

S

(u) = min−seg(c) ≤

temp

S

(u)

.It istrueforall

u

so

hhLii

S

≤ temp

S

.



S

-sideof Theorem7 (4)

(1)

Considera

S

-automaton

A = hQ, A, In, Fin, Γ, ∆i

with

Γ = {γ

1

, . . . , γ

k

}

. Arunof

A

isasawordonalphabet

∆ ⊆ Q × A × {i, cr}

Γ

× Q

. Itfollowsfromthedenitionof

[[·]]

S

that forall

u ∈ A

:

[[A]]

S

(u) = sup

σ∈∆

{min(χ

∁R

(σ), temp

S

◦ π

1

(σ), · · · , temp

S

◦ π

k

(σ)) : π

A

(σ) = u}

in whi h

R ⊆ ∆

is the(regular)set of validruns; forall

i ∈ [[1, k]]

,

π

i

proje tsea h transition

(p, a, t, q)

tothe

γ

th

i

omponentof

t

(andisextended towords).Finally

π

A

proje tsea h transition

(p, a, t, q)

to

a

(and isalso extended to words). ByExample 4,

χ

∁R

∈ CF

. By Lemma 2,

temp

S

∈ CF

, and by Theorem 6,

CF

is stable under omposition,

min

and

sup

-proje tion.Hen e

[[A]]

S

∈ CF

.



A.2 Cost sequen es

Theaimistogiveasemanti tostabilizationsemigroups.Somemathemati al prelim-inariesarerequired.

Let

(E, ≤)

beanorderedset,

α

afun tionfrom

N

to

N

,and

a

, b ∈ E

N

twosequen es. Wedenetherelation



α

by

a



α

b

if:

∀n.∀m. α(n) ≤ m → a(n) ≤ b(m) .

Asequen e

a

issaid

α

-non-de reasing if

a



α

a

.Wedene

α

as



α

∩ 

α

,and

a

b

(resp.

a

∼b

)if

a



α

b

(resp.

a

α

b

)forsome

α

.

(16)

 if

α ≤ α

then

a



α

b

implies

a



α

b

,

 if

a

is

α

-non-de reasing,thenitis

α

-equivalenttoanon-de reasingsequen e, 

a

is

id

-non-de reasingiitisnon-de reasing,

 let

a

, b ∈ E

N

betwonon-de reasingsequen es,then

a



α

b

i

a

◦ α ≤ b

.

The

α

-non-de reasingsequen esorderedby



α

anbeseenasaweakeningofthe

α = id

ase.Wewill identifytheelements

a ∈ E

withthe onstantsequen eofvalue

a

.

Therelations



α

and

α

arenottransitives,butthefollowingpropertyguarantees a ertainkindoftransitivity.

Fa t 13

a



α

b



α

c

implies

a



α◦α

c

and

a

α

b

α

c

implies

a

α◦α

c

.

The fun tion

α

is used as a "pre ision" parameter for

and



. Fa t 13 shows that atransitivitystep ostsomepre ision.Forany

α

, therelation



α

oin ide over onstantsequen es withorder

(up to identi ationof onstantsequen ewiththeir onstantvalue).In onsequen e,thesequen ein

E

N

orderedby



α

formanextension of

(E, ≤)

.

In thefollowing, whileusing relations



α

and

α

, wemayforget thesubs ript

α

andverifyinsteadthattheproofhasaboundednumberoftransitivitysteps.

Let

(E, ≤)

and

(F, ≤)

twoorderedsets,afun tion

E → F

N

is

α

-monotone if

∀a, b ∈ E. a ≤ b → f (a) 

α

f (b) .

Inparti ular, forea h

a ∈ E

, wehave

a ≤ a

, so

f (a) 

α

f (a)

,hen e

f (a)

is

α

-non-de reasing. To ea h

α

-monotone fun tion

f : E → F

N

we asso iate

f

˜

:

E

N

→ F

N

denedin thefollowingway:

forall

a

∈ E

N

andall

n ∈ N

,

f (a)(n) = f (a(n))(n) .

˜

Proposition 14 Let

f : E → F

N

bea

α

-monotonefun tion and

a

, b ∈ E

N

,then:

a



α

b

implies

f (a) 

˜

α

f (b) .

˜

Inparti ular,if

f : E → F

N

and

g : F → G

N

are

α

-monotone,then

˜

g◦f

is

α

-monotone. Moreover,

^

g ◦ f ) = ˜

g ◦ ˜

f

.

Denition15 If

f

and

g

are fun tions

E → F

N

, we will say that

f ∼

α

g

if for all

u ∈ E

,

f (u) ∼

α

g(u)

.Asusual,

f ∼ g

ifthere exists

α

su hthat

f ∼

α

g

.

We will alsouse this notionswiththe produ torder : if

(E, ≤)

isan ordered set, thesetofwordsin

u ∈ E

is anoni allyorderedby

a

1

. . . a

n

≤ b

1

. . . b

m

i

m = n

and

a

i

≤ b

i

for

i = 1 . . . n

. We identify the elements of

(E

N

)

(wordsof sequen es) with someelementsof

(E

)

N

(sequen esof wordsof thesamelength).Noti e that forany sequen es

a

1

, . . . , a

n

, b

1

, . . . , b

n

∈ E

N

,

a

1

. . . a

n



α

b

1

. . . b

n

i

a

i



α

b

i

for

i = 1 . . . n

.

A.3 Ideals of anordered set

This notionwill beessentialto dene the ostfun tion re ognized byastabilization semigroup.

Let

(E, ≤)

be anordered set,an ideal is a

≤ −closed

subset

I ⊆ E

, i.e. if

a ∈ I

and

b ≤ a

, then

b ∈ I

. let

a ∈ E

,the'ideal generatedby

a

is

I

a

= {b ∈ E : b ≤ a}

.Let

a

∈ E

N

and

I

beanideal,wedene

I[a]= sup{n + 1 : a(n) ∈ I}

. 4

Let

I

beanideal, its omplementin

E

isdenotedby

I

.Let

a

∈ E

N

,wedene

I[a]= inf{n : a(n) ∈ I}

. 4

(17)

Proposition 16 Let

f

and

g

be fun tions

E → S

N

su h that

f ∼

α

g

and for any

u ∈ E

,

f (u)

and

g(u)

arenon-de reasing.Thenfor anyideal

I

of

S

,the ostfun tions

u 7→ I[f (u)]

and

u 7→ I[g(u)]

are

α

equivalent.

Indeed,let

u ∈ E

,and

n = I[f (u)]

.Then

g(u)(α(n)) ≥ f (u)(n) /

∈ I

.

I

isanidealsowe get

g(u)(α(n)) /

∈ I

.

g(u)

isnon-de reasingso

I[g(u)] ≤ α(n)

.Bysymmetryof

f

and

g

wenallyget

u 7→ I[f (u)] ≈

α

u 7→ I[g(u)]

.

Denition17 Let

a, b ∈ E

and

n ∈ N

,wedene the sequen e

a|

n

b

by:

for all

k ∈ N

,

(a|

n

b)(k) =

(

a

if

k < n

,

b

otherwise.

A.4 Compatible fun tions

Wenowdenethesemanti ofastabilizationsemigroupwiththenotionof ompatible fun tion.Theideaisto generalizethenotionof produ t,byasso iatingtoea hword of

S

+

, no longer an element of

S

, but a ost sequen e in

S

N

. this will allow us to express stabilization in a quantitative way. Intuitively, when

n

is xed in the ost sequen e, we aninterpret the semanti asan automatonwith limited resour es.To avoidambiguities, wewill write

uv

the on atenationof

u

and

v

aswordsin

S

+

and

a · b

theprodu tof

a

and

b

aselementsof

S

.

hS

+

, , ≤i

forms a semigroup, partially ordered by the produ t ordered between wordsofsamelengthdes ribedabove.

Denition18 Let

S

= hS, ·, ≤, ♯i

bestabilizationsemigroup.Afun tion

ρ

from

S

+

to

S

N

is said ompatible with

S

ifthereexists

α

su hthat : Monotoni ity.

ρ

is

α

-monotone,

Letter. for all

a ∈ S

,

ρ(a) ∼

α

a

,

Produ t. for all

a, b ∈ S

,

ρ(ab) ∼

α

a · b

, Stabilization. for all

e ∈ E(S)

,

m ∈ N

,

ρ(e

m

) ∼

α

(e

|

m

e)

, Substitution. for all

u

1

, . . . , u

n

∈ S

+

,

n ∈ N

,

ρ(u

1

. . . u

n

) ∼

α

ρ(ρ(u

˜

1

) . . . ρ(u

n

))

(re-mind:weidentify sequen eof wordsandwordof sequen es, seese tion A.2)

Example 7. Let

S

be the stabilization semigroup with

3

elements

⊥ ≤ a ≤ b

, with produ tdenedby:

x · y = min

(x, y)

(

b

neutralelement),andstabilizationby

b

= b

and

a

= ⊥

= ⊥

.Lett

u ∈ {⊥, a, b}

+

,wedene

ρ

by:

ρ(u) =

b

if

u ∈ b

+

⊥|

|u|

a

a

if

u ∈ b

(ab

)

+

sinon.

Then

ρ

is ompatiblewith

S

. Remark19 When

istheidentityfun tion,

S

be omesastandardorderedsemigroup, andthe lassi al extendedprodu t

π

is ompatiblewith

S

.

Theorem20 ([Col09 ℄) Foranystabilizationsemigroup

S

,thereexistsafun tion

ρ

ompatiblewith

S

.Moreover,

ρ

isuniqueupto

.

(18)

Lemma3. Let

ρ

ompatible with a semigroup

S

. There exists

γ

su h that for any

n ∈ N

and

u ∈ S

+

,if

|u| ≤ n

thenfor all

k ≥ γ(n), ρ(u)(k) = π(u)

Proof. Weshowthisresultbyindu tionon

n

.Itistruefor

n = 1

bytaking

γ(1) = 1

.We assume

γ(k)

onstru tedfor

k < n

,andwewanttoshowtheresultfor

n

.Let

u ∈ S

+

of length

n

,

u = va

with

|v| = n−1

and

a ∈ S

.Let

α

awitnessof

ρ

ompatiblewith

S

.The substitutionpropertytellsusthat

ρ(u) ∼

α

ρ(ρ(v)a)

˜

. but by indu tionhypothesis,for all

k ≥ γ(n − 1)

,

ρ(ρ(v)a)(k) = ρ(ρ(v)(k)a)(k) = ρ(π(v)a)(k)

˜

.Moreover,

ρ(π(v)a) ∼

α

π(v) · a = π(u)

.Hen e wehaveforall

k ≥ α(γ(α(n − 1))), ρ(u)(k) = π(u)

.Wegetthe resultwith

γ(n) = α(γ(α(n − 1)))

.



A.5 Generalities about stabilization semigroups

Stru ture An idempotent elementof

S

is anelement

e ∈ S

su h that

e · e = e

.We note

E(S)

thesetofidempotentelementsof

S

.

Inthesequel,weusea lassi Green'srelation.Let

a

and

b

bein

S

;wedenote

a≤

J

b

ifthere exists

x

and

y

in

S ∪ {1}

su h that

a = xby

. Therelation

J

is apreorder. If

a ≤

J

b

and

b ≤

J

a

, then

a

and

b

are in the same

J

- lass, and we denote

aJ b

. Obviously,

J

indu esanorder over

J

- lasses,alsonoted

J

.

A regular element of

S

isanelement

a

su hthat there exists

e ∈ E(S)

with

aJ e

. Consequently,either alltheelementsofa

J

- lassareregular(wesaythat the

J

- lass isregular),either noelementis(the

J

- lassisirregular).

We anextend

toallregularelementsof

S

. If

a

isaregularelement,thereexists

e ∈ E(S)

and

x, y ∈ S ∪ {1}

su hthat

x · e · y = a

.Wedenethen

a

= x · e

· y

,whi h doesnotdependonthe hoi eofthede omposition( f.[Kir05℄).

Denition21 Aregular

J

- lass

J

isstable ifthereexistsanidempotent

a

in

J

su h that

a

∈ J

, otherwise

J

is unstable. If

J

is stable, then for all idempotent

a

in

J

,

a

= a

.

Denition22 (Produ t ofstabilization semigroups) Let

S

1

= hS

1

, ·

1

, ≤

1

, ♯

1

i

and

S

2

=

hS

2

, ·

2

, ≤

2

, ♯

2

i

be stabilization semigroups, then their produ t

S

1

× S

2

is the tuple

hS

1

× S

2

, ·, ≤, ♯i

su hthat

(a

1

, a

2

) · (b

1

, b

2

) = (a

1

· b

1

, a

2

· b

2

)

,

(a

1

, a

2

) ≤ (b

1

, b

2

)

if

a

1

≤ b

1

and

a

2

≤ b

2

,and

(e

1

, e

2

)

= (e

1

1

, e

2

2

)

.

Proposition 23 If

S

1

and

S

2

are stabilization semigroups, then

S

1

× S

2

is one too. Moreover,if

ρ

1

is ompatiblewith

S

1

and

ρ

2

with

S

2

then

ρ

denedforall

u = (u

1

, u

2

) ∈

(S

1

× S

2

)

+

and

k ∈ N

by

ρ(u)(k) = (ρ

1

(u

1

)(k), ρ

2

(u

2

)(k))

,is ompatiblewith

S

1

× S

2

.

Denition24 Afun tion

φ

from

S

to

S

isamorphism ofstabilizationsemigroupsif

 for all

u, v

in

S

,

φ(u · v) = φ(u) · φ(v)

,  Forall

u ∈ E(S)

,

φ(u) ∈ E(S

)

and

φ(u

) = φ(u)

. Lemma4. Let

S

, S

be stabilization semigroups,

ρ

and

ρ

ompatible with

S

and

S

. We assume there exists a morphism of stabilization semigroups

τ

from

S

to

S

. Let

τ

+

: S

+

→ S

′+

and

τ

N

: S

N

→ S

′N

the natural extensions of

τ

to nite and innite sequen es.Then

τ

N

◦ ρ ∼ ρ

◦ τ

+

.

Proof. Let

K = {(a, τ (a)), a ∈ S}

.We anprovide

K

withastru tureofstabilization semigroup,asasub-stabilization semigroupof

S

× S

. Let

φ : K

+

→ K

N

dened by

φ(u, τ

+

(u)) = (ρ(u), τ

N

(ρ(u))

. Let

α

beawitnessof

(19)

 Monotoni ity.

ρ

is

α

-monotone, so

φ

istoo

 Letter.Let

a ∈ K

,

a = (b, τ (b))

with

b ∈ S

,

φ(a) = (ρ(b), τ (ρ(b)) ∼

α

(b, τ (b)) = a

 Produ t.Let

a, b ∈ K

,

a = (a

, τ (a

)), b = (b

, τ (b

)), φ(ab) = (ρ(a

b

), τ (ρ(a

b

))) ∼

α

(a

· b

, τ (a

· b

)) = a · b

,

 Stabilization. Let

e ∈ E(K)

,

m ∈ N

,

e = (a, τ (a))

with

a ∈ E(S)

,

φ(e

m

) =

(ρ(a

m

), τ

N

(ρ(a

m

))) ∼

α

(a

|

m

a, τ

N

(a

|

m

a)) = e

|

m

e

,  Substitution.Let

u

1

, . . . , u

n

∈ S

+

,

n ∈ N

,

∀i, ∃v

i

∈ S

+

, u

i

= (v

i

, τ

+

(v

i

))

,

φ(u

1

. . . u

n

) =

(ρ(v

1

. . . v

n

), τ

N

(ρ(v

1

. . . v

n

))) ∼

α

ρ(ρ(v

1

) . . . ρ(v

n

)), τ

N

ρ(ρ(v

1

) . . . ρ(v

n

)))

. Weget

φ ∼

α

g

with

g(u

1

. . . u

n

)(k) = (ρ(ρ(v

1

)(k) . . . ρ(v

n

)(k))(k), τ

N

(ρ(ρ(v

1

)(k) . . . ρ(v

n

)(k))(k)))

. To on lude,

˜

φ(φ(u

1

) . . . φ(u

n

))(k) = φ((ρ(v

1

), τ

N

(ρ(v

1

))(k) . . . (ρ(v

n

), τ

N

(ρ(v

n

))(k))(k)

= φ(ρ(v

1

)(k) . . . ρ(v

n

)(k), τ

+

(ρ(v

1

)(k) . . . ρ(v

n

)(k))(k)

= (ρ(ρ(v

1

)(k) . . . ρ(v

n

)(k))(k), τ

+

(ρ(ρ(v

1

)(k) . . . ρ(v

n

)(k))(k)))

α

φ(u

1

. . . u

n

)(k)

But

(ρ, ρ

)

is also ompatible with

K

, sin e

K

is asub-stabilization semigroupof

S ×S

(Proposition23).Theuniqueness(upto

)ofthe ompatiblefun tion(Theorem 20)givesus

φ ∼ (ρ, ρ

)

,hen ebyproje tiononthese ond omponent,weget

τ

N

◦ ρ ∼

ρ

◦ τ

+

.



A.6 Re ognized ostfun tions

We now haveall the mathemati al tools to dene how stabilization semigroups an re ognize ostfun tions.

Let

S

= hS, ·, ≤, ♯i

be astabilization semigroup. Let

h : A → S

be amorphism, anoni allyextendedto

h : A

+

→ S

+

,and

I ⊆ S

anideal.Thenthetriplet

S

, h, I

re -ognizes thefun tion

f : A

+

→ N

dened by

f (u) = I[ρ(h(u))]

where

ρ

is ompatible with

S

. A ostfun tion from

A

+

to

N

issaid re ognizableifitis

-equivalentto a fun tion re ognized by some

S

, h, I

. By Proposition 16, there ognized ost fun tion doesnotdependonthe hoi eof

ρ

.

Example 8. Let

A = {a, b}

,the ostfun tion

| · |

a

is re ognizable.Wetakethe stabi-lizationsemigroupfrom Example7,

h

denedby

h(a) = a, h(b) = b

,and

I = {⊥}

.We havethen

|u|

a

= I[ρ(h(u))]

forall

u ∈ A

+

.

Thefollowingresultshowstheanalogywithregularlanguages,andjustifythename of"regular" ostfun tions :

Theorem25 ([Col09 ℄) For a ostfun tion, the following propertiesare equivalent :

 beingre ognizable bystabilizationsemigroup,  being omputableby

B

-automaton,

 being omputableby

S

-automaton.

Références

Documents relatifs