HAL Id: hal-00379256
https://hal.archives-ouvertes.fr/hal-00379256
Preprint submitted on 28 Apr 2009
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
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
Regular sets over extended tree structures
Severine Fratani
To cite this version:
Severine Fratani. Regular sets over extended tree structures. 2009. �hal-00379256�
SéverineFratani
Laboratoired'InformatiqueFondamentaledeMarseille(LIF)CNRS:UMR6166
UniversitédelaMéditerranée-Aix-MarseilleII
Universitéde Provene-Aix-MarseilleI
Abstrat
WeinvestigatenotionsofdeidabilityanddenabilityfortheMonadiSeond-
Order Logi of labeled tree strutures, and links with nite automata using
oralestotestinputprexes.
A generalframework is dened allowing to transfersome MSO-properties
from agraph-strutureto a labeledtree struture. Transferredpropertiesare
deidabilityofsentenesandexisteneofadenablemodelforeverysatisable
formula. Alassofniteautomatawithprex-oralesisalsodened,reogniz-
ingexatlylanguagesdened byMSO-formulasinanylabeledtree-struture.
Applying these results, the well-known equality between languages reog-
nized by nite automata, sets of verties MSO denable in a tree-struture
andsetsofpushdownontextsgeneratedbypushdown-automataisextendedto
k
-iteratedpushdownautomata.Keywords: Labeledtreestrutures; MSOdenablesets; Automatawith
orale;Iteratedpushdownstrutures.
Introdution
InitiatedbytheworkofBühionwords,thestudyoflinksbetweenautomata
andlogihaspermittoidentifystrutureshavingadeidableMonadiSeond-
Ordertheory. Inpartiular,Rabinprovedin[28℄deidabilityoftheMSO-theory
ofinnitetreestruturesinwhihnumerouspropertiesaredenableandtheories
areinterpretable. Theseworkshavealsoledtoalogiharaterisationofregular
languages: languagesreognisedbyniteautomata areexatlysets denedby
MSO-formulasinatreestruture.
The goal of this paper is to extend these works to the study of labelled
tree strutures: identify labellings for whih tree struture have a deidable
MSO-theory, for whih every formula admits a denable model and give an
automata-haraterizationofthedenablesets.
Toahievethisgoal,weintroduenewinterestingobjetsandresults. First,
wedene alassof word/tree automatawith prex-orales(i.e.,sets ofwords
overthe inputalphabet) used to testthe alreadyproessed prexesofinputs.
Languagesandforestreognizedbyprex-oralesautomataenjoynieproperty,
ofMSO-formulasoverinnitetreesanbeextendedtotheselanguages: forests
reognized by automata with orales
O 1 , . . . , O m
are forestsMSO-denable in treestruturesextendedbyunaryrelationsO 1 , . . . , O m
. Remarkthat this ap-proahhasalreadybeendevisedin [32℄to haraterisesomepropersublasses
ofregularlanguagesbyusingregularprex-oralesandtostudytheirdenabil-
ityinFirst-OrderLogioverextendedwordstrutures. However,thedenition
of automata with prex-oralesdoes not expliitlyappear in this paper sine
regularprex-oralesanbesimulatedbythediretprodutofniteautomata.
Seond,weestablishtransfertheorems, allowingfrom astruture,to onstrut
atreestruturehavingsomesimilarMSOproperties. Thisapproahisommon
for the transferof deidability (for example the transfer of deidability from
astruture to its tree-like struture,(see [31℄ or[35℄), or from a graphto it's
unfolding(see[10℄)),buthere,inadditiontodeidability,transferredproperties
alsoapplied to sets MSO denable in suhstrutures and lassesof automata
reognisingthem. Inaddition,ourtransferofdeidabilityallowstoobtainnew
deidabilityresultswhiharenotoverbytheonesitedabove. Propertiesare
transferred to a labelled tree struture from its image struture by any mor-
phism. If
µ : D → D
′ isamappingandS
isarelationalstruture overD
, theimagestruture
µ( S )
ofS
hasD
′ asdomainanditsrelationsaretheimagesbyµ
oftherelationsofS
.Let
t
be a labelled tree, andt
be the struture assoiated tot
. For anymorphismofmonoid
µ
,andundersomesimplehypothesisonthelabellingoft
,weobtainthefollowingmainresults:
•
Transferofdeidability: (Theorem55)ifµ(t)
hasadeidableMSO-theory,then
t
hasadeidableMSO-theory,•
Transfer of the property of Denable Model: (Theorem57) under aon-dition on
µ
, ifµ(t)
satisesthe propertyof Denable Model (DM),thent
satises DM. This propertyensures for a strutureS
that any satis-ableformulaadmitsatleastonemodelwhih isMSO-denablein
S
(seeDenition15),
•
Theorem of struture: (Theorem 58) under the same ondition onµ
, ifµ(t)
satises DM, then anyset is MSO-denableint
i it is reognisedbyanite automatonusing onlyorales oftheform
µ
−1(D)
whereD
isMSO-denablein
µ(t)
. (TheneahoraletestsapropertyMSO-denable inµ(t)
, ontheimagebyµ
ofinputwordprexes).Applying these results, weobtaintree strutures having adeidable MSO
theoryandlassesoflanguageshavingtwoequivalentharaterizations:aslan-
guagesreognizedbyautomatawithorales,andassetsMSO-denableinsome
labelled tree strutures. We thus extend the two haraterizations of regular
languagesmentionedabove.
But regularlanguagesadmit athird haraterization,assets of pushdown
ontextsgeneratedbyapushdownsystemoftransitions[21℄. Somereentworks
roughlyastakofstak... ofstak(seeforexamples[5,7,24,19℄),itisthennat-
uralto attemptto deneanotionofregular setsof
k
-pushdowns(i.e.,stakswith
k
level of embedded pushdowns) whih generalize the previousequality.Wegiveequalities betweenlanguagesof
k
-pushdownsreognized byautomatawithp-orales,languagesMSO-denableinapartiulartreestrutureandsets
of
k
-pushdownontextsgenerated byak
-pushdownsystemof transitions. We iteratively use the three transfer theorems on a family of strutures( P
k) k≥1
havingaprexwordslanguage
P k
fordomain. ThelanguageP k
denesanen-odingoftheset
k
-pdsofallk
-pushdowns. ThestrutureP
kisMSO-equivalent withthestruture PDSk
whose domain isk
-pdsand whoserelations arethoseinduedby thelassial instrutionson
k
-pushdowns. This allows to dene a lassoflanguagesinP k
thatanbeexpressedinfourequivalentways(Theorem85):
•
aslanguagesreognisedbyniteautomatawithprex-orale,•
aslanguagesdenedbyMSO-formulasinthetreestrutureofdomainP k
,•
asenodingsofsetsdened byMSO-formulasinPDSk
,•
asenodingofsets ofk
-pushdownsgenerated byastore-ontrolledk
-pdssystemoftransitions.
Weshowin additionthatPDS
k
satisesthepropertyofDenableModel.Thispaperisorganizedasfollows. Setion 1isdevoted tobasidenitions
onwords,logi,automataand
k
-pushdownsstrutures. Itisalsointroduedthenotionofwordautomatawithorales. InSetion2,weextendtotreeautomata
the use of orales. The Rabin's orrespondene between regular forests and
modelsofMSO-formulasovertreesisadaptedtotheselanguages.InSetion3,
we developa game-theoretial approah to provethe three transfertheorems.
Wegivealsoasimpleappliation ofthetransfertheorems. Finally,wegivein
Setion4adenitionof
k
-regularsets ofpushdowns.1. Preliminaries
1.1. Basi denitions
1.1.1. Somenotations andonventions
Givenaset
A
,wedenoteby|A|
theardinalofA
. Ifs
isamapfromasetA
, thens(A) = {s(a) | a ∈ A}
. IfV ~ = (V 1 , . . . , V n )
isavetorofsubsets ofA
then
s( A) = (s(V ~ 1 ), . . . , s(V n ))
. Theharateristifuntion ofV ~
inA
isamapχ V A ~ : A → {0, 1} n
denedforallx ∈ A
,byχ V A ~ (x) = (b 1 , . . . , b n )
where∀i
,b i = 1
i
u ∈ S i
.If
A
isaset,A
∗ denotesthesetofwords(nitesequenes)overA
,andε
theemptyword. For
u, v ∈ A
∗,thelengthofu
isdenoted|u|
andwewritev 4 u
ifv
isprexofu
. AsetP ⊆ A
∗ isaprexlosedlanguageif∀u ∈ P
,∀v ∈ A
∗, ifv 4 u
thenv ∈ P
.1.1.3. Freegroup
Givenanitealphabet
A
,letusassoiatetoeaha ∈ A
theinversesymbol¯
a
whihdoesnotbelongtoA
. Wedenote byA
theset of inverselettersofA
anddene
A b = A ∪ A
. Foreveryu = a 1 · · · a n ∈ A b
∗,theinverse wordofu
isu = b n · · · b 1
where∀i ∈ [1, n]
:if
a i ∈ A
thenb i = ¯ a i
,andifa i = ¯ a ∈ A
thenb i = a
.Letusthenonsidertheredutionsystem
S = {(a¯ a, ε), (¯ aa, ε)}
. AwordinA b
∗issaidto bereduedifitis
S
-redued,i.e.,itdoesnotontainourrenesofa¯ a
or¯ aa
,fora ∈ A
. Wedenote byIrr(A)
the setof reduedwordsinA b
∗. AsS
isonuent,eahwordw
is equivalent(mod↔
∗S
)to auniquereduedworddenoted
ρ(w)
.Wedenethefreegroup
(Irr(A), ε, •)
, where∀u, v ∈ Irr(A)
,u • v = ρ(u · v)
.1.1.4. Projetions
Foranyintegers
0 < i ≤ j ≤ n
, forany vetorofelements(a 1 , . . . , a n )
, wedene the projetion
π i (a 1 , . . . , a n ) = a i
andπ i,...,j (a 1 , . . . , a n ) = (a i , . . . , a j )
.For any alphabets
B
andA
withB ⊆ A
, the projetionπ B : A
∗→ B
∗ is amorphismdened
∀a ∈ A
byπ B (a) = a
ifa ∈ B
andπ B (a) = ε
else.1.1.5. Treesand forests
Given nite alphabets
Σ
andA
and a prex losed languageP ⊆ A
∗, aP
-tree(Σ)
(treeofdomainP
labelledbyΣ
)is atotalfuntiont : P → Σ
. Thesetofall
P
-tree(Σ)
isdenotedP
-Tree(Σ)
. Inordertodealwithunlabelledtreesin an uniform way, we introdue the speial symbol
⊤
. Unlabelled trees arethen funtions
t : P → {⊤}
. We will often onsider trees inP
-Tree({0, 1} n )
,for
n ≥ 0
(withthe onvention that{0, 1} 0 = {⊤}
), we will denote this lassP
-Treen
. RemarkthatatreeinP
-Treen
analwaysbeseenastheharateristi funtionχ S P ~
ofavetorS ~ = (S 1 , . . . , S n )
,forS i ⊆ P
.Wewillusetwokindsofoperationsontreesandtree-languages:
•
Restrition: lett ∈ A
∗-Tree(Σ)
,t
|P istheP
-tree(Σ)
obtainedbyrestrit-ingthedomainof
t
toP
. IfF ⊆ A
∗-Tree(Σ)
,thenF
|P= {t
|P, t ∈ F }
.•
Produt: lett 1
be aP
-tree(Σ 1 )
andt 2
aP
-tree(Σ 2 )
, the produt oft 1
and
t 2
is thetreet 1 b t 2 ∈ P
-Tree(Σ 1 × Σ 2 )
fullling∀u ∈ P
,t 1 b t 2 (u) = (t 1 (u), t 2 (u))
. Thisdenitionanbeextendedto treelanguages:if
F 1 , F 2 ⊆ P
-Tree(Σ)
,thenF 1 b F 2 = {t 1 b t 2 | t 1 ∈ F 1 , t 2 ∈ F 2 }
.Finite automata with prex-orale (or p-orale) extend the lass of nite
automatabyallowingsomemembershiptests onprexof theinputword. An
automaton
A
with p-orales, on the input alphabetA
is a nite automatonassoiatedtoavetor
O ~ = (O 1 , . . . , O m )
ofsubsetsofA
∗ andwhosetransitions ontainabooleanvetorofsizem
alledtest. DuringtheomputationbyA
ofaninputword,thealreadyproessedpart
u
oftheinputiskeptinmemoryandatransition withtest
~o
anbeappliedif~o
isequaltotheharateristivetor ofu
insideO ~
(i.e.,if~o = χ O A ~
∗(u)
).Denition1(Finite automatonwith p-orales). Given
m ≥ 1
, an au-tomaton with
m
p-orales is a tupleA = (Q, A, ~ O, ∆, q 0 , F )
whereQ
is anite set of states,
A
is the input alphabet,O ~ = (O 1 , . . . , O m )
,O i ⊆ A
∗,∆ ⊆ Q × A × {0, 1} m × Q
is theset oftransitions,q 0 ∈ Q
isthe initialstate,and
F ⊆ Q
isthesetofnalstates.Aongurationof
A
is apair(q, u
↑v)
whereuv ∈ A
∗ and↑ isasymbolwhihdoesnotbelongto
A
. Thebinaryrelationonongurationsis→
Aandonsistsinallpairs
(q, u
↑av) →
A(p, ua
↑v)
suhthat(q, a, χ O A ~
∗(u), p) ∈ ∆
. Thelanguagereognisedby
A
isL(A) = {u ∈ A
∗| (q 0 ,
↑u) →
∗A(q F , u
↑), q F ∈ F}
.Wewill usethefollowingnotations: FA
O ~ (A)
isthefamilyof automataoverA
withp-orale
O ~
,thelassofO ~
-regularlanguages(i.e.,reognisedbyautomatainFA
O ~ (A)
) isREGO ~ (A)
. Remark that anautomatonwithorale∅
is simplyaniteautomaton. WewritethenFA ratherthanFA
∅
andREGforREG
∅
.
Denition2. Anautomatonwith
m
p-oralesA = (Q, A, ~ O, ∆, q 0 , F )
issaidto be deterministi if
∀p ∈ Q, a ∈ A, ~o ∈ {0, 1} m
, there is oneand only oneq ∈ Q
suhthat(p, a, ~o, q) ∈ ∆
.Example3. Thefollowing automatonisdeterministi and reognizethelan-
guage
{a n b n c n } n≥1
.A = ({q 0 , q 1 , q 2 , q 3 , q F }, {a, b, c}, (O 1 , O 2 ), ∆, q 0 , {q F })
whereO 1 = {a n b n } n≥1
,O 2 = {a m b n c n−1 } n≥1, m≥0
and∆
onsistsin(q 0 , a, (0, 0), q 1 )
,(q 1 , a, (0, 0), q 1 )
,(q 1 , b, (0, 0), q 2 )
,(q 2 , b, (0, 0), q 2 )
,(q 2 , b, (0, 1), q 2 ) (q 2 , c, (1, 0), q 3 )
,(q 2 , c, (1, 1), q F )
,(q 3 , c, (0, 0), q 3 )
and(q 3 , c, (0, 1), q F )
.Weassoiatewith eah automatonwith
m
p-oralesA ∈
FAO ~ (A)
, anite au-tomaton
A ∈ e
FA(A × {0, 1} m )
alled soureofA
andonstruted bymovingthetestofeahtransitionintotheinputletterofthetransition: eahtransition
(p, a, ~o, q)
istransformedin(p, (a, ~o), q)
. ThelanguageL(A)
anbeobtainfromthelanguage
L( A) e
andthe"harateristilanguageofO ~
inA
.Denition4. For every
O ~ = (O 1 , . . . , O m )
,O i ⊆ A
∗, the harateristi lan- guageofO ~
isdenedby:L O χ ~ = {(a 1 , ~o 1 ) . . . (a n , ~o n ) ∈ (A × {0, 1} m )
∗| ∀i ∈ [1, n], ~o i = χ O A ~
∗(a 1 . . . a i−1 )}
.Observation 5. Forevery
O ~ = (O 1 , . . . , O m )
,O i ⊆ A
∗:REG
O ~ (A) = {π 1 (L ∩ L O χ ~ ) | L ∈
REG(A × {0, 1} m )}.
UsingtheKleene'stheorem, weobtaineasily:
Theorem6. Let
A
analphabet, andO ~
avetor ofsubsets ofA
∗,1. REG
O ~ (A)
isthelass oflanguages reognizedbydeterministiautomatainFA
O ~ (A)
,2. REG
O ~ (A)
islosedunderbooleanoperations.1.3. Iteratedpushdown stores
OriginallydenedbyGreibahin[22℄,iteratedpushdownstoresarestorage
struturesbuiltiteratively. Letusxaninnitesequene
A = A 1 , A 2 , . . . , A k , . . .
of disjoint andnite alphabets. Forall
k ≥ 1
, wedenote byA k
the nite se- queneA 1 , . . . , A k
and adoptthe onventionthatA 0 = {⊥}
andthatA 0 ∩ A i
isemptyofall
i ≥ 1
.Denition7. Wedene indutivelythe set
k
-pds( A k )
(ork
-pdswhen alpha-bets ofstoreareunderstood)of
k
-iteratedpushdown-storesoverA k
:0
-pds( A 0 ) = {⊥}
,(k + 1)
-pds( A k+1 ) = (A k+1 [k
-pds( A k )])
∗⊥ [k
-pds( A k )]
.Theset forall
k
-pushdowns fork ≥ 0
is denotedit
-pds( A )
. In therest of thepaper, any
1
-pdsa 1 [⊥]a 2 [⊥] · · · a n [⊥] ⊥ [⊥]
will bewritten simplya 1 . . . a n ⊥
and
∀k ≥ 0
. We denoteby⊥ k
the emptyk
-pds ontainingonly symbols⊥
:⊥ 0 =⊥
and⊥ k+1 =⊥ [⊥ k ]
.From the denition, every
ω
in(k + 1)
-pds( A k+1 )
,k ≥ 0
, has a uniquedeompositionas
ω = a[ω 1 ]ω
′withω 1 ∈ k
-pds(A k )
,ω
′∈ (k + 1)(A k+1 )
-pds∪{ε}
and
a ∈ A k+1 ∪ {⊥}
. Furthermore,a =⊥
iω
′= ε
.Example8. Let
A 1 = {a 1 , b 1 }
,A 2 = {a 2 , b 2 }
,A 3 = {a 3 }
bestoragealphabets,ω ex = a 3 [b 2 [b 1 a 1 ⊥]a 2 [a 1 ⊥] ⊥ 2 ] ⊥ [a 2 [a 1 ⊥]a 2 [⊥] ⊥ 2 ] ∈ 3
-pds( A 3 )
.Its deomposition orresponds to
a = a 3
,ω 1 = b 2 [b 1 a 1 ⊥]a 2 [a 1 ⊥] ⊥ 2
andω
′=⊥ [a 2 [a 1 ⊥]a 2 [⊥] ⊥ 2 ]
.Thetwofollowingmapswillbeuseful.
Projetion: themap assoiatingeah
k
-pdsto itstopi
-pds,1 ≤ i ≤ k
isp k,i
:k
-pds(A 1 , . . . , A k ) → i
-pds(A 1 , . . . , A i )
,where∀ω = a[ω 1 ]ω
′∈ k
-pds,p k,k (ω) = ω
andp k,i (ω) = p k−1,i (ω 1 )
if1 ≤ i ≤ k − 1
.The double subsript notation will be used to handle inverse funtions,
therestofthetime,wewillnote
p i
forp k,i
.Top symbols: themap assoiatingany
k
-pds,k ≥ 1
to itsk
top-symbolsistop : k
-pds(A 1 , . . . , A k ) → (A k ∪ {⊥}) · · · (A 2 ∪ {⊥})(A 1 ∪ {⊥})
dened∀ω = a[ω 1 ]ω
′∈ k
-pdsbytop(ω) = a
,ifk = 1
,elsetop(ω) = a · top(ω 1 )
.For
i ∈ [1, k]
, andω ∈ k
-pds, we denote bytop i (ω)
thei
-th letter oftop(ω)
.Example9. Let
ω ex
bethe3
-pdsgivenin Example8:p 2 (ω ex ) = b 2 [b 1 a 1 ⊥]a 2 [a 1 ⊥] ⊥ 2
,p 1 (ω ex ) = b 1 a 1 ⊥
,andtop(ω ex ) = a 3 b 2 b 1
,top(p 2 (ω ex )) = b 2 b 1
,top(p 1 (ω ex )) = b 1
.An instrution on
it
-pds is a funtion fromit
-pds toit
-pds whih does notmodifythelevelofthe
k
-pushdowns(i.e.,ifinstrisaninstrutionthenforanyk ≥ 0
and anyω ∈ k
-pds,instr(ω) ∈ k
-pds). An instrution of leveli
isaninstrutionwhihdoesnotmodifythelevelsgreaterthan
i
ofanyit
-pds. Hene,giveninstraninstrutionoflevel
i
if
ω = a[ω 1 ]ω
′∈ k
-pds,k > i
,theninstr(ω) = a[
instr(ω 1 )]ω
′if
ω ∈ k
-pds,k < i
,theninstr(w) = w
.Therefore,to deneaninstrutionof level
i
, thereis onlyneedto deneitforany
ω ∈ i
-pds.Threeinstrutionsoflevel
k
aregenerallyappliabletoit
-pushdowns.Denition10. Classial instrutions of level
i ≥ 1
overA
are dened for everyω = b[ω 1 ]ω
′∈ i
-pds( A i )
by:pop i (ω) = ω
′ ifb 6=⊥
,elsepop i (ω)
isundened,push i,a (ω) = a[ω 1 ]ω
,change i,a (ω) = a[ω 1 ]ω
′,ifb 6=⊥
elsechange i,a (ω)
isundened.For
k ≥ 1
,I k ( A k ) = {pop i | i ∈ [1, k]} ∪ {push i,a , change i,a | a ∈ A i , i ∈ [1, k]}
.istheset ofinstrutionsover
A k
.Thus, given
ω ∈ k
-pds andi ≤ k
,pop i (ω)
erasesp i (ω)
on the top of thestore,
push i,a
i(ω)
onsists in adda i [p i−1 (ω)]
on the top of the topi
-pds andchange i,a
i(ω)
onsistsin replaetop i (ω)
bya i
.Example11. Let
ω = b 3 [b 2 [b 1 ⊥] ⊥ 2 ] ⊥ 3
bea3
-pds,pop 3 (ω) =⊥ 3
,pop 2 (ω) = b 3 [⊥ 2 ] ⊥ 3
,pop 1 (ω) = b 3 [b 2 [⊥] ⊥ 2 ] ⊥ 3
,push 2,a
2(ω) = b 3 [a 2 [b 1 ⊥]b 2 [b 1 ⊥] ⊥ 2 ] ⊥ 3
,push 1,a
1(ω) = b 3 [b 2 [a 1 b 1 ⊥] ⊥ 2 ] ⊥ 3
,change 3,a
3(ω) = a 3 [b 2 [b 1 ⊥] ⊥ 2 ] ⊥ 3
,change 1,a
1(ω) = b 3 [b 2 [a 1 ⊥] ⊥ 2 ] ⊥ 3
.Wealso dene theinverse instrutionof
push i,a
whih will beused to enodethe
k
-pushdownsaswords.Denition12. Forany
i ≥ 1
anda ∈ A i
, theinstrutionof leveli push i,a
isdenedforany
ω ∈ i
-pds( A i )
bypush i,a (ω) = ω
′ ifthereexistsω
′∈ i
-pdssuhthatω = push i,a (ω
′) push i,a (ω)
isundenedelse.Inotherwords,