sequen es
ÉmilieCharlier
DépartementdeMathématique,UniversitédeLiège
I. b-automati sequen esandb-re ognizablesets
II. Chara terizingb-re ognizablesetsvialogi
III. Appli ationstode idabilityquestionsforautomati sequen es
IV. Enumeration: ountingb-denablepropertiesof b-automati sequen esis b-regular
Let b
≥
2beaninteger(theintegerbase).Anaturalnumbernis representedbythenite word
rep b
(
n)
=
ℓ
· · ·
1 0 over thealphabetAb
= {
0
,
1, . . . ,
b−
1}
obtainedfromthegreedy algorithm: n=
ℓ
X
i=
0 i b i.
Takeb
=
2and onsiderthefollowingDFAO:0 1
0 0
1
1
Forea hn ,theDFAOreads rep 2
(
n
)
andoutputs0or1a ordingtothe laststate thatis rea hed.WeobtaintheThue-Morsesequen e
Asequen ex
: N
d→ N
issaidtobeb-automati ifthereexistsaDFAO withinputalphabetAb
su hthatforea hn
∈ N
d,x
(
n)
isthesymbol outputted bytheDFAOafterreadingrepb
(
n)
.Tworemarks:
◮
Ab-automati sequen e antakeonlynitelymanyvalues.
◮
We anworkin anydimensiond:
rep 2
5 3 10
=
101 11 1010
0=
0101 0011 1010
=
0 0 1
1 0 0
0 1 1
1 1 0
.
AsetX
⊆ N
disb-re ognizableifthelanguage
rep b
(
X)
= {
rep b(
n) :
n∈
X}
is regular.Itisequivalenttosaythatits hara teristi sequen e
χ
X
: N
d→ {
0,
1}
is b-automati : thereexistsa DFAOthatoninputrepb
(
n
)
ouputs1if n∈
X,andoutputs0otherwise.The setofevilnumbers
{
0,
3,
5,
6,
9,
10,
12,
15,
17,
18,
20,
23, . . .}
,i.e.the naturalnumbershavinganevennumberof1inbase 2,is 2-re ognizable. Its hara teristi sequen eistheThue-Morsesequen e.Semi-linearsetsof
N
dareniteunionsofsetsoftheform
p 0
+
p 1N
+ · · · +
pℓ
N
where p 0,
p 1, . . . ,
pℓ
∈ N
d .Theorem(Cobham 1969, Semenov 1977)
Let bandb
′
bemultipli ativelyindependentintegerbases. Ifasubsetof
N
d
issimultaneouslyb-re ognizableandb
′
-re ognizable, thenitissemi-linear.
There existseveralequivalentdenitionsofb-re ognizablesetsof integers using
◮
logi◮
b-uniformmorphisms◮
nitenessoftheb-kernel
◮
algebrai formalseries
◮
re ognizable/rationalformalseries
Theorem(Bü hi 1960, Bruyère 1985)
AsubsetX of
N
dLet
S
bealogi alstru ture whosedomainisS. AsetX⊆
Sd
is denablein
S
ifthereexistsarst-order formulaϕ(
x 1, . . . ,
x d)
ofS
su hthat X= {(
s 1, . . . ,
s d) ∈
S d: S ϕ(
s 1, . . . ,
s d)}.
Arst-orderformulais denedre ursively from
◮
variablesx 1,
x 2,
x 3, . . .
des ribingelementsofthedomainS
◮
theequality
=
◮
therelationsandfun tionsgiven inthestru ture
S
◮
the onne tives
¬, ∨, ∧, =⇒ , ⇐⇒
◮
Presburger arithmeti
hN, +i
x
≤
y isdenable by(∃
z) (
x+
z=
y)
. NottrueinhZ, +i
.x
=
0isdenable byx+
x=
x. OK inhZ, +i
.x
=
1isdenablebyx6=
0∧ ((∀
y) (
y=
0∨
x≤
y))
. NottrueinhZ, +i
. Indu tively,x=
is denablefor every∈ N
.The setsa
N
+
baredenable: aN
+
b= {
x: (∃
y) (
x=
a·
y+
b)}
where a·
y standsfory+
y+ · · ·
y (atimes).Infa t,asubsetX
⊆ N
isdenable inhN, +i
i itisaniteunionof arithmeti progressions,orequivalently,ultimatelyperiodi .AsubsetX
⊆ N
dAsetX
⊆ N
disb-denableifitis denableinthestru ture
hN, +,
V bi
, where
◮
+(
x
,
y,
z)
is theternaryrelationdenedbyx+
y=
z,◮
V
b
(
x
)
istheunaryfun tiondened asthelargestpowerofb dividing x ifx≥
1andVb
(
0) =
1.Forexample,thesetX
= {
x∈ N :
x isapowerofb}
is denableby Vb
(
x) =
x.It anbeshownthatthestru tures
hN, +,
V bi
andhN, +,
P bi
arenot equivalent, whereP b(
Theorem(Bü hi 1960, Bruyère 1985)
AsubsetX of
N
disb-re ognizablei itisb-denable. Moreover,both dire tionsareee tive.
Sket hoftheproof.
◮
From aDFAa eptingrep b
(
X
)
, onstru tarst-order formulaϕ
of thestru turehN, +,
Vb
i
deningX, i.e.su hthat
X
= {(
n 1, . . . ,
n d) ∈ N
d: ϕ(
n 1, . . . ,
n d)
is true}.
◮
Conversely,given arst-order formula
ϕ
ofthestru turehN, +,
V bi
deningX,builda DFAa eptingrepb
(
X)
.The rstorder theoryof
hN, +,
V bi
isde idable
Proof.
◮
Wehavetoshow that,given any losedrst-order formulaof
hN, +,
V bi
,we ande idewhetheritistrueorfalsein
N
.◮
Sin ethere isno onstantinthestru ture,a losedformula of
hN, +,
V bi
isne essarilyoftheform
∃
xϕ(
x)
or∀
xϕ(
x)
.◮
The set
X
ϕ
= {
n∈ N : hN, +,
V bi ϕ(
n
)}
isb-denable,soitisb-re ognizablebytheBü hi-Bruyèretheorem. Thismeans thatwe anee tively onstru ta DFAa epting rep
b
(
Xϕ
)
.◮
The losedformula
∃
xϕ(
x)
istrueifrep b(
X
ϕ
)
isnonempty,and falseotherwise.◮
Astheemptinessofthelanguagea eptedbyaDFAisde idable, we ande ideif
∃
xϕ(
x)
is true.◮
The ase
∀
xϕ(
x)
redu estothepreviousonesin e∀
xϕ(
x)
is logi allyequivalentto¬∃
x¬ϕ(
x)
. We an onstru taDFA a eptingthebase-brepresentationsofX
¬ϕ
= N \
Xϕ
.
Ifwe anexpressapropertyP
(
n)
usingquantiers,logi aloperations, addition,subtra tion, omparison,andelements ofsomeb-automati sequen es,then∃
nP(
n), ∃
∞
In parti ular, what about the property x
(
i) =
x(
j)
?Ifx
: N
d→ N
is ab-automati sequen ethen,foralllettersao urring in x,thesubsetsx−
1(
a)
ofN
dareb-re ognizable.
Hen e theyaredenablebysomerst-order formulae
ψ
aof
hN, +,
V bi
(byBü hi-Bruyère theorem):ψ
a
(
n
)
istrueix(
n) =
a .Therefore,we anexpressx
(
i) =
x(
j)
bytherst-order formulaϕ(
x 1, . . . ,
x d,
y 1, . . . ,
y d)
ofhN, +,
V bi
:ϕ(
i,
j) ≡
_
a(ψ
a(
i) ∧ ψ
a(
j)).
Considerthepropertyofhavinganoverlap.
A(unidimensional)sequen ex hasanoverlapbeginningatpositioni i
(∃ℓ ≥
1) (∀
j≤ ℓ)
x(
i+
j) =
x(
i+ ℓ +
j)
.Nowsupposethatx is b-automati .
GivenaDFAOM 1
generatingx,werst reateanNFAM 2
thatoninput
(
i, ℓ)
a eptsif(∃
j≤ ℓ)
x(
i+
j) 6=
x(
i+
j+ ℓ)
.Todothis,M 2
guessesthebase-brepresentationofj digit-by-digit, veries thatj
≤ ℓ
, omputes i+
j andi+
j+ ℓ
onthey, anda eptsif x(
i+
j) 6=
x(
i+
j+ ℓ)
.2 3
inverse thenal statusofea hstate. Thus, M 3
a eptsthosepairs
(
i, ℓ)
su hthat(∀
j≤ ℓ)
x(
i+
j) =
x(
i+
j+ ℓ)
.Nowwe reateanNFAM 4
thatoninput iguesses
ℓ
≥
1anda eptsi M3
a epts
(
i, ℓ)
.Aswe ande ideifM 4
a eptsanything,wehaveobtained:
Proposition
◮
Itisde idablewhetherab-automati sequen ehask-powers (fora xedk).
◮
Itisde idablewhetherab-automati sequen eisultimately periodi .
◮
Giventwob-automati sequen esx andy,itis de idablewhether Fa
(
x) ⊆
Fa(
y)
.◮
The predi ate
∀
n∃
p≥
1∀ℓ
x(
n) =
x(
n+ ℓ
p)
is notarst orderformulain
hN, +,
V bi
. Why? Isthisproperty b-denable? Whataboutthe ase wheretheperiods parerestri tedto powersofthebaseb?
Ifx is anarbitraryb-automati sequen e,thenthepredi ate
“
x[
i,
i+
2n−
1]
is anabeliansquareis notexpressibleinthelogi altheory
hN, +,
V bi
Intheworst ase,wehaveatowerofexponentials: 2 2
·
·
·
2 nwhere nisthenumberofstatesofthegivenDFAOandtheheightof the toweristhenumberofalternatingquantiersiftherst-order predi ate.
This pro edurewasimplementedbyMousavi,givingbirththeWalnut software.
Inpra ti e,Go ,Henshall,Mousavi,Shallit andotherswereabletorun their programsinordertoprove(and/orreprove)manyresultsabout b-automati sequen es.
Proposition
Let x
: N → N
beab-automati sequen eandlety: N → N
bedened asy(
i) =
1ifx hasanoverlapatpositioni,andy(
i) =
0otherwise. Then y isb-automati .Inthesamevein,we anprovethat ountingb-denablepropertiesof a b-automati sequen egiverisetoab-regularsequen e.
Let K bea ommutativesemiring. Asequen ex
: N
d→
K is(
K,
b)
-regularif thereexist◮
anintegerm≥
1◮
ve torsλ
∈
K 1×
m andγ
∈
K m×
1◮
amorphismofmonoidsµ: ((
A b)
d)
∗
→
K m×
m su hthat∀
n∈ N
d,
x(
n) = λµ
rep b(
n)γ.
The triple
(λ, µ, γ)
is alled alinearrepresentationofx andmisitsTheorem
Foranyb-denablesubsetX of
N
d+
1 ,thesequen ea: N
d→ N ∪{∞}
dened by a(
n 1, . . . ,
n d) =
Card{
m∈ N : (
n 1, . . . ,
n d,
m) ∈
X}
is(N ∪{∞},
b)
-regular. Ifmoreovera(N
d) ⊆ N
,thenais(N,
b)
-regular.Corollary
Foranyb-automati sequen ex
: N → N
,thefa tor omplexityofx is(N,
b)
-regular.◮
Letx
: N → N
beab-automati sequen e.◮
Forall n
∈ N
,letp x(
n
)
denotethenumberoflength-n fa torsof x.◮
Then p x(
n) = #{
i∈ N : ∀
j<
i,
x[
j,
j+
n−
1] 6=
x[
i,
i+
n−
1]}
.◮
ConsiderX= {(
i,
n) ∈ N
2: ∀
j<
i,
x[
j,
j+
n−
1] 6=
x[
i,
i+
n−
1]}
.◮
Sin ex is b-automati ,thesetX isb-denable.
◮
By hoi eofX,wehave p x
(
n
) = #{
i∈ N : (
i,
n) ∈
X}
.◮
What aboutthe ountingthenumberofre tangularfa torsofsize
(
m,
n)
in abidimensionalb-automati sequen e? Isthe orrespondingLet F
= (
Fi
)
i≥
0= (
1
,
2,
3,
5,
8, . . .)
bethesequen eobtainedfromthe rules: F 0=
1,
F 1=
2andF i+
2=
F i+
1+
F i fori≥
0.
Anaturalnumbernis representedbythenite wordrep F
(
n)
=
ℓ
· · ·
1 0 over thealphabetAF
= {
0
,
1}
obtainedfromthegreedyalgorithm:n
=
ℓ
X
i=
0 i F i.
The greedyalgorithmimposes,inadditiontohavinganonzeroleading digit
ℓ
,thatthevalidrepresentationsdo not ontaintwo onse utive digits1. The setofall possiblerepresentationsisL
F=
1
{
0,
01}
Let U
= (
Ui
)
i≥
0= (
1
,
2,
3,
5,
8, . . .)
bea basesequen e,thatis,an in reasingsequen eofpositive integerssatisfying:U 0
=
1 and C U=
sup i≥
0 U i+
1 U i<
+∞.
Anaturalnumbernis representedbythenite word
rep U
(
n)
=
ℓ
· · ·
1 0 over thealphabetAU
= {
0
,
1, . . . ,
⌈
C U⌉ −
1
}
obtainedfromthegreedy algorithm: n=
ℓ
X
i=
0 i U i.
Twoproblems:
◮
Ingeneral,
N
is notU-re ognizable.◮
APisotnumberis analgebrai integer
>
1su hthatall ofitsGalois onjugateshave absolutevalue<
1.WorkingHypothesis(WH): U satiesalinearre urren ewhose hara teristi polynomialistheminimalpolynomialofaPisotnumber.
Forsu hsystems,Frougnyshowedthat
N
andtheadditionare re ognizablebyniteautomata.U-denablesetsaresubsetsof
N
dthataredenable inthelogi al stru ture
hN, +,
VU
i
,where◮
+(
x
,
y,
z)
is theternaryrelationdenedbyx+
y=
z,◮
V
U
(
x
)
istheunaryfun tiondenedasthesmallestU iorresponding
toanonzerodigitinrep
U
(
x
)
ifx≥
1,andV U(
0
) =
1.Theorem(Bruyère-Hansel 1997)
Under WH,theU-re ognizablesetsofintegers oin idewiththe U-denablesetsofintegers.
The rstorder theoryof
hN, +,
V Ui
is de idable
This resultimpliesthatthereexistalgorithmstode ideU-denable propertiesforU-automati sequen es.
Asanappli ation,one anprove(andreprove,orverify) manyresults abouttheFibona i inniteword
f
=
01001010010010100101001001010010· · ·
(whi his thexedpoint of0
7→
01,
17→
0).0 1
0 1
Manon Stipulanti)
What isaU-regularsequen e? Several hoi esofdenitionsarepossible.
InManonStipulanti's PhDthesis,itis provedthatsomesequen e S
ϕ
: N → N
isF-regularbyprovingthatthereexist◮
anintegerm≥
1◮
ve torsλ
∈
K 1×
m andγ
∈
K m×
1◮
amorphismofmonoidsµ: {
0,
01}
∗
→
K m×
m su hthat∀
n∈ N,
Sϕ
(
n) = λµ
0rep U(
n)γ
where,inorder to omputeµ
0repU
(
n)
,itis understoodthat0rep U
(
Asequen ex
: N
d→
K is(
K,
U)
-regularifthereexist◮
anintegerm≥
1◮
ve torsλ
∈
K 1×
m andγ
∈
K m×
1◮
amorphismofmonoidsµ: ((
A b)
d)
∗
→
K m×
m su hthat C1∀
n∈ N
d,
x(
n) = λµ
rep U(
n)γ
C2∀
w∈ ((
A U)
d)
∗
,
x(
val U(
w)) = λµ(
w)γ
.Under WH,C1
⇐⇒
C2.Conje ture (analogue of the useful result)
Under WH,foranyU-denablesubsetX of
N
d+
1 ,thesequen e a: N
d→ N ∪{∞}
denedby a(
n 1, . . . ,
n d) =
Card{
m∈ N : (
n 1, . . . ,
n d,
m) ∈
X}
is(N ∪{∞},
U)
-regular. Ifmoreovera(N
d) ⊆ N
, thenais(N,
U)
-regular.Ingeneral realnumbersarerepresentedbyinnitewords.
Inthis ontext,we onsiderBü hiautomata. Aninnitewordisa epted when the orrespondingpathgoesinnitelymanytimesthroughan a epting state.
β
-re ognizable andβ
-denable subsets ofR
d◮
Notionof
β
-re ognizabilityofsubsetsofR
d , whereβ >
1is areal base.◮
Forβ
=
1+
√
5 2,the
ω
-languageofthe(quasi-greedy)β
-representationsof[
0,
1]
isa eptedby1
0 0
◮
First ordertheory
hR, +, ≤, Z
β
,
Xβ
i
leadingtoanotionofβ
-denability.◮
For
β
Pisot,β
-re ognizability oin idewithβ
-denability.◮
For
β
Pisot,thefollowingpropertiesofβ
-re ognizablesubsetsX ofR
d arede idable:◮
X hasanonemptyinterior:
(∃
x∈
X) (∃ε >
0) (∀
y) (|
x−
y| < ε =⇒
y∈
X).
◮
X isopen:(∀
x∈
X) (∃ε >
0) (∀
y) (|
x−
y| < ε =⇒
y∈
X).
◮
X is losed: OKasR
d\
X isb-re ognizable.◮
...◮
Bruyère-Hansel-Mi haux-Villemaire,Logi andp-re ognizablesetsof integers,Bull. Belg. Math. So . 1(1994)191238.
◮
Bruyère-Hansel,Bertrandnumerationsystemsandre ognizability,TCS 181(1997)1743.
◮
Charlier,First-OrderLogi andNumerationSystems. Sequen es,Groups, andNumberTheory,Chapter3,89141. TrendsinMathemati s, Birkhaüser/Springer,Cham,2018.
◮
Charlier-Leroy-Rigo,AnanalogueofCobham'stheoremforgraphdire ted iteratedfun tionsystems. Adv. inMath. 280(2015)8612.
◮
Charlier-Rampersad-Shallit,Enumerationandde idablepropertiesof automati sequen es. IJFCS23(5)(2012)10351066.
◮
Du-Mousavi-Rowland-S haeer-Shallit,De isionalgorithmsfor Fibona i-automati words,II:Relatedsequen esandavoidability,TCS 657(2017)146162.