J
OURNAL DE
T
HÉORIE DES
N
OMBRES DE
B
ORDEAUX
B
RIGITTE
V
ALLÉE
Digits and continuants in euclidean algorithms.
Ergodic versus tauberian theorems
Journal de Théorie des Nombres de Bordeaux, tome
12, n
o2 (2000),
p. 531-570
<http://www.numdam.org/item?id=JTNB_2000__12_2_531_0>
© Université Bordeaux 1, 2000, tous droits réservés.
L’accès aux archives de la revue « Journal de Théorie des Nombres de Bordeaux » (http://jtnb.cedram.org/) implique l’accord avec les condi-tions générales d’utilisation (http://www.numdam.org/conditions). Toute uti-lisation commerciale ou impression systématique est constitutive d’une infraction pénale. Toute copie ou impression de ce fichier doit conte-nir la présente mention de copyright.
Article numérisé dans le cadre du programme Numérisation de documents anciens mathématiques
Digits
and
continuants in
Euclidean
algorithms.
Ergodic
versusTauberian theorems
par BRIGITTE VALLEEA Jacques Martinet, meneur d’hommes et de science
RÉSUMÉ. Nous faisons ici
l’analyse
en moyenne desprincipales
quantités
qui interviennent dans desalgorithmes
de typeEu-clide -quotients
partiels
(chiffres)
et continuants-. L’étude de cesparamètres
est enparticulier
essentiellequand
on s’intéresse à une mesure trèsprécise
(et
trèsréaliste)
de lacomplexité
de cesalgorithmes,
i.e., lacomplexité
enbits,
où l’on compte toutesles opérations sur les bits. Nous
développons
un cadregénéral
pour une telle
analyse,
où lacomplexité
moyenne est reliée aucomportement
analytique
dans leplan complexe
deshomogra-phies
utilisées parl’algorithme.
Nos méthodes sont fondées surl’utilisation des
opérateurs
detransfert, objets
de base de la théorie dessystèmes dynamiques,
que nousadaptons
à nosbe-soins. Nous
opérons
dans un cadrediscret,
où les théorèmesTaubériens prennent le relais des théorèmes
ergodiques. Ainsi,
nous obtenons des résultats nouveaux sur la
complexité
moyenne-mesurée en bits- de toute une classe
d’algorithmes
de typeEuclide,
et ce, dans un cadre unificateur.ABSTRACT. We obtain new results
regarding
the precise average-caseanalysis
of the main quantities that intervene inalgorithms
ofa broad Euclidean type. We
develop
ageneral
framework for theanalysis
of suchalgorithms,
where the average-casecomplexity
of an
algorithm
is related to theanalytic
behaviour in thecom-plex plane
of the set ofelementary
transformations determinedby
thealgorithms.
The methodsrely
on properties of transferoperators
suitably adapted
fromdynamical
systemstheory
andprovide a
unifying
framework for theanalysis
of the mainpa-rameters
-digits
and continuants2014 that intervene in an entireclass of
gcd-like algorithms.
We operate ageneral
transfer from the continuous case(Continued
FractionAlgorithms)
to thedis-crete case
(Euclidean
Algorithms),
whereErgodic
Theorems are1. Introduction
The metric
theory
of continued fractions has been establishedby
studies ofGauss, Levy
[26],
Khinchin[22],
Kuzmin[25],
Wirsing
[40]
and Babenko[2].
These authorsmainly
deal with aspecific
density
transformer that can also be used forstudying
the mainparameters
ofinterest,
namely
thequotients
and the continuants. Thequotients
play
the role ofdigits
(in
the related numerationsystem)
and the continuants are the denominatorsof the rational
approximations
provided by
the truncation of thecontin-ued fraction.
Properties
of thedensity
transformer entail thevalidity
ofergodic
methods[8],
which are bothsimple
andpowerful
whileproviding
asymptotic
estimates that hold almosteverywhere.
Thus,
such results are not suitable forproviding
any information on thebehaviour of the main
parameters
that intervene in the continued fractionexpansion
of a rationalnumber,
since rationalinputs
have zero measure.On the other
hand,
thisparticular
case of a rationalinput
isquite important
in
computer
science since it isclosely
related to the average-caseanalysis
of the EuclideanAlgorithm.
The discrete
counterparts
of continued fractionalgorithms,
i.e.,
the Eu-clideanalgorithms,
have been lessextensively
studied. There are twoma-jor
classical EuclideanAlgorithms,
that are called Standard(S),
andCen-tered
(C).
Thecomplexity
of thesealgorithms
is nowwell-understood,
butonly
asregards
of the number of arithmeticaloperations
to beperformed:
The standard Euclidean
Algorithm
wasanalysed
first in the worst case in1733
by
deLagny,
then in the average-case around 1969independently
by
Heilbronn
[19]
and Dixon(11),
andfinally
in distributionby
Hensley
[20]
whoproved
in 1994 that the Euclideanalgorithm
has Gaussian behaviour. The centeredalgorithm
was studiedby
Rieger
[30].
Brent[6, 7]
and Vall6e[36]
haveanalysed
theBinary
algorithm.
The methods used till theearly
1980’s arequite varied,
sincethey
range from combinatorial(de
Lagny,
Heilbronn)
toprobabilistic
(Dixon).
The more recent works
[20], [35], [37]
rely
for agood
deal on the idea ofus-ing
transferoperators,
afar-reaching
generalization
ofdensity transformers,
originally
introducedby
Ruelle[31, 32]
in connection with thethermody-,
namic formalism and
dynamical
systems
theory
[3].
ThenMayer
[29, 28]
hasapplied
suchoperators
to the continued fraction transformation.Fi-nally, Hensley
in hisstudy
"in distribution" or Vall6e in heranalysis
of theBinary
GCDAlgorithm
[36],
propose new methods wherethey
use thesetools,
originally well-adapted
to continuousmodels,
in the discrete models of EuclideanAlgorithms.
Recently,
these methods are proven to bequite
general,
andprovide
aunifying
framework foranalysing
the number ofsteps
However,
until now, manyparameters
ofinterest,
likedigits
andcontinu-ants, that intervene in Euclidean
Algorithm
have not been studiedby
these methods. The average values ofdigits
or continuantsplay a
central rolein the
precise
analysis
of EuclideanAlgorithms.
First,
the averagebit-complexity
of EuclideanAlgorithms
involvesexpressions
where bothdigits
and continuants intervene.Second,
the continued fractionexpansion
of arational number
naturally provides
anencoding
forinteger pairs
that usesthe
digits
of the continued fractionexpansion.
Incomputer
systems
thatdirectly
deal with continued fractionexpansions
[4], [39],
it isimportant
toanalyse
the averagelength
of this continued fractionencoding.
In this paper, we
provide
newanalyses
of theprecise
expected
values ofthe main
parameters
in the discrete framevvork. We then obtain newre-sults about the average
bit-complexity
of classical Euclideanalgorithms
and propose aunifying
framework for theanalysis
of the mainparameters
of
gcd-like algorithms.
Methods. Our
approach
is a refinement of methods that have beenal-ready
used[9,
16,
35, 36, 37,
38]:
it consists inviewing
analgorithm
ofthe
gcd
type
as adynamical
system,
where each iterativestep
is a linearfractional transformation
(LFT)
of the form z -(az
+b) / (cz
+d) .
Aspe-cific set of transformations is then associated to each
algorithm.
Italready
appears from
previous
treatments that thecomputational
complexity
of analgorithm
is in fact dictatedby
the collectivedynamics
of its associated setof transformations. More
precisely,
two factors intervene: thecharacteris-tics of the LFT’s in the
complex
domain and their contractionproperties,
notably
near fixedpoints.
Technically,
this paper relies on adescription
of relevantparameters
by
means ofgenerating functions,
aby
now common tool in the average-caseof
algorithms
[14, 15].
As is usual in numbertheory
contexts,
thegenerat-ing
functions are Dirichlet series.They
are firstproved
to bealgebraically
related tospecific
operators
thatencapsulate
all theimportant
informa-tions relative to the
"dynamics"
of thealgorithm.
Theiranalytical
prop-erties
depend
onspectral
properties
of theoperators
[27],
mostnotably
the existence of a
"spectral gap"
thatseparates
the dominanteigenvalue
from the remainder of the
spectrum.
This determines thesingularities
of Dirichlet series of costs. Theasymptotic
extraction of coefficients is then achievedby
means of Tauberian theorems[10, 34],
aprimary
tool inmul-tiplicative
numbertheory.
Average-case
estimates of the mainparameters
(digits, continuants)
finally
result. The main thread of the paper is thusadequately
summarizedby
the chain:Euclidean
algorithm --*
Associated transformations -- Transferoperator
~ Dirichlet series of costs ~ Tauberian inversionResults and
plan
of the paper. Sections 2 and 3 areintroductory
sections where we recall
descriptions
of EuclideanAlgorithms together
withthe
general ergodic
framework that iswell-adapted
to the case wheninputs
are random real numbers.Then,
in Section 4(that
is the central technicalsection of the
paper),
we consider the case whereinputs
are random rationalnumbers.
There,
wedevelop
the line of attack outlined earlier and introducesuccessively
Dirichletgenerating functions,
transferoperators
of the Ruelletype,
and the basic elements of Tauberiantheory
that areadequate
for ourpurposes. The main results of this section are summarized in Theorems 1
and 2: Theorem 1 describes the
singularities
ofgenerating
functions relativeto the main
parameters;
Theorem 2implies
ageneral
criterion forclassifying
behaviours of mean values relative to
digits
and continuantsIn Section
5,
we return to the solutions of ourspecific problems
-theaverage
bit-complexity
and the averagecode-length-
that fall as naturalconsequences of the
present
framework and are summarized in Theorems 3and 4. These results involve
entropies
of bothdynamical
system,
that are related to the
analysis
ofcontinuants,
together
to three constantsrelative to
binary
length
ofdigits,
of Khinchin’stype;
the first oneintervenes in the
analysis
ofparameters
of StandardAlgorithm,
while the last twointervene in the
analysis
ofparameters
of CenteredAlgorithm, together
with asupplementary
constant(relative
tosigns)
The average-case
bit-complexity
of bothalgorithms
whenapplied
toThe average
code-length
of continued fractions whenapplied
to randomintegers
less than N is of the formThe numerical values for the constants of
bit-complexities,
prove the
efficiency
of Classical EuclideanAlgorithms
whencompared
tonaive
multiplication
of numbers whose averagebit-complexity
islog2
Non
integers
less than N. In the samevein,
the numerical values for bothconstants of average
code-length,
prove the
near-optimality
of the continued-fractionencodings
whencom-pared
to the minimalencoding
ofinteger pairs
whose averagecode-length
is 2
1092
N forinteger pairs
less than N.Finally,
the paperprovides analyses
ofbit-complexities
of other EuclideanAlgorithms,
like theBinary
Algorithm
(Theorem 7),
the SubtractiveAlgo-rithms
(Theorem
5)
or otheralgorithms
thatcompute
the JacobiSymbol
(Theorem
6).
An extended abstract that summarizes some results of this paper and
fo-cuses on
analyses
ofbit-complexities
appeared
inProceedings
of ICALP’00[1] .
2. Euclidean
algorithms
We
present
here the Euclideanalgorithms
to beanalysed.
Then weexplain
the role of the main
parameters,
digits,
andcontinuants,
that appear whenanalysing bit-complexity. Finally,
we describe the costs that will be studied.2.1. Two Euclidean
Algorithms.
The standard Euclidean division ofv
by
u(v > u),
of the form v = au +r,
produces
apositive
remainder rsuch that 0 r ~. The centered division between u and v
(v >
u/2),
ofthe form v = au +
Er,
produces
apositive
remainder r suchthat 0 r
u/2.
A Euclideanalgorithm
is associated to eachtype
ofdivision,
andthey
arerespectively
called the StandardAlgorithm
(8)
andthe Centered
Algorithm
(C).
We denote
by
£(z)
the number of bits in thebinary
representation
of thepositive integer
x, so thatt(x)
= 1.Then,
the bit-cost of adivision
step,
of the form v = au is taken to beessentially
£(u)
x£(a) ,
aquantity
that weadopt
as ourbit-complexity
measure. 1
It is followedby exchanges
which involve numbers u and r, so that the total cost of astep
is xf(a) + f(u) + ~(r).
In the case of the centereddivision,
thereis
possibly
an additional subtraction(in
the casewhen c = -1)
in order toobtain a remainder in the interval
[0, u/2].
When
given
aninput
(vi, vo),
bothalgorithms perform
a certain number pof divisions of the form
and
decomposes
the rational x =(vl/vo)
as(vl/vo)
=h,
oh2
0... o
hp (0),
where the
hi’s
are linear fractional transformations(LFT)
of theform hi
=with =
1 /(a
+dx).
Thepair
m :=(a, d)
is called thedigit-pair
of the LFT. Thealgorithm
thencomputes
the continued fractionexpansion
of rational x =(vi/vo),
(CF-expansion
forshort),
In both cases, the last non-zero
integer
vp is thegcd
of thepair
(vl, vo).
Theprecise
form of thepossible
LFT’sdepends
on thespecific
algorithm;
thereexists a
special
set .~ of LFT’s in the finalstep.
However,
all the othersteps
use the same set of LFT’s that is denoted
by
1í. For the centeredalgorithm
(C),
the rationalbelongs
to Z =~0, 1/2~;
for the standardalgorithm
(S),
the rational x
belongs
to I =~0,1~.
Altogether,
the rationalinputs
of eachalgorithm belong
to the basic interval I =[0, p]
with p = 1 orp =
1/2.
2.2.Bit-complexities
related to EuclideanAlgorithms.
In bothcases, when
performing
p divisions on theinput
(vl, vo),
the bit-costC(vl, vo)
of thealgorithm
is a sum of pterms,
the i-th termrepresent-ing
the cost of the i-th division andbeing
aproduct
of twofactors;
the first factor involves thebinary
length
£(vj )
ofinteger vj (with j
possibly equal
to i or i +
1),
while the second one involves a cost relative to the i-th LFTto be
performed,
of the formc(hi),
or of the formc(mi),
where mi is thedigit-pair
that defines the LFThi.
In thesequel
(see
Remark at the end of Section4),
we will see that we canreplace
thelength
e(v)
ofinteger v by
its
logarithm
log2(v)
in base 2 andsystematically
considerlog2(vi)
as thefirst factor to be studied. In
contrast,
we have to work with the exact costFIGURE 1. The Euclidean
algorithms.
of the
algorithm
on theinput
(vi, vo)
will be of the formIY1
The array of
Figure
1 describes theprecise
forms of thedivisions,
thegeneric
set x of associated
LFT’s,
the final set ,~ and the cost of the LFT’s.It is also
quite
useful to describe thebit-complexity
of so-called Extended EuclideanAlgorithms,
thatcompute
at the same time Bezout coefficients ofpair
(vl,
vo),
i.e., integers
r and s such that rvo+svl =gcd(vi, vo)
=vp. The
principle
iswell-known,
and thecomputation
makes use of twoauxiliary
sequences riand si
thatsatisfy
for each index i the relation rjvo + sjvi =vi,
so that for i =
p, the Bezout relation holds with r := rp and s := sp. The sequences are initialized as ro =
l, so
=O, r1
=0, SI
=1,
thenthey
arebuilt with the
help
of sequence ai,in the same way as the sequence vi. The
supplementary
bit-cost due tothe extension of the
algorithm
is thus a sum terms, the i-th termrepresenting
the cost of the twomultiplications
of the i-thstep
described in(4),
andbeing
aproduct
of twofactors;
the first factor involves thebinary
lengths
ofintegers
ri, Si while the second one involves a costc(m2)
relative to the i-thdigit-pair
mi :=(ai, di).
Finally,
for the same reasons aspreviously
(that
we shallexplain
at the end of Section4),
the studied bit-costD(vi, vo)
of both Extendedalgorithms
on theinput
(vl, vo)
will be of the form
where the cost is defined in
Figure
1.We are
finally
interested indescribing
thelength
of thebinary
word thatencodes the
pair
(vl, vo).
There are two ways forcoding
thispair:
the firstthe second one deals with the
binary encoding
B(vl, va)
of the sequence ofdigits
(ml,
m2, ... ,mp).
It isimportant
to compare the averagelength
ofthese two
coding
words, since,
in someapplications
that useCF-expansions
in an extensive way, it may be useful to encode
efhciently
the sequence ofCF-digits,
so that thisencoding
can bedirectly
used in furthercomputa-tions. Classical results in Information
Theory
entail that the mean valueof
B(vl, vo)
is at leastequal
to the mean value ofA(vi,
vo).
This leads usto
study
thelength
of theCF-encoding
of apair
(vl, vo),
related to some
digit-cost
c, as well as totry
and findnear-optimal
encod-ings.
2.3. Main
parameters
for theanalysis
of EuclideanAlgorithms.
The costs to bestudied,
defined in(3), (5), (6),
involve five mainparam-eters : the
integer
p, the costsc(m)
ofdigit-pairs,
and thelogarithms
ofintegers v2
defined in(1),
together
with thelogarithms
ofintegers
[
defined in(4).
The firstparameter
isexactly
thedepth
of the continued fractionexpansion
ofvllvo,
or the number of divisions to beperformed
by
thealgorithm
oninput
(vi, vo).
Its average behaviour is now well-known.The cost
c(m)
of thedigit-pair
m =(a,
d)
may involve the
digit
a alone or thedigit d alone,
or both. Moregenerally,
it isinteresting
tostudy
the random behaviour of other functions ofdigit-pair
m =(a, d).
Finally,
theintegers
are related to continuants. When one"splits"
the
CF-expansion
(2)
ofvi /vo
atdepth
z,
one obtains twoCF-expansions
/B
defining
a rational number: the leftpart
defines the"beginning
rational"of the form
while the
right
part
defines the"ending
rational" of the formThe
beginning
rationalspi/qi
are useful forapproximating
the rationalFIGURE 2. The main costs to be studied.
continuants.
They
areclosely
related to sequences riand si
that appearin the Extended Euclidean
Algorithms,
via the relations pi =The
ending
continuants, i.e.,
the denominators wi of theending
rationals areclosely
related to theintegers vi
that appear in the execution(1)
of Euclideanalgorithm
oninput
vl /vo,
via therelation v2
=w2.
When
given
a validinput
(u, v)
relative to some EuclideanAlgorithm,
wewish to
study
the behaviour of sevenquantities,
thatfully
describe the costrelative to some
parameter
during
the execution of a EuclideanAlgorithm
on
input
(u, v) .
Thesequantities
define what we callgeneric
costs and arelisted in
Figure
2.The first five
quantities
(1-5)
ofFigure
2 areexpressed
only
in terms ofdepth,
digits
and continuants. Since thedepth
p, the sequence ofdigit-pairs
mi -(ai, di)
and the sequence of continuants qi or wionly
depend
on rational x :=
(u/v)
and not on thepair
(u, v)
itself,
thesequantities
define functions of the rational x =
(u/v) .
The first one is relative to somedigit-cost
defined on the sequence ofdigit-pairs
ml, m2, ... that appearin the continued fraction
expansion
of x. The second and the third onesare relative to
(beginning
orending)
continuants,
and the fourth and fifthor q2. All these costs can also be viewed as functions defined on
pairs
onintegers
that we denote in the same way,Finally,
the last twoquantities
(6-7)
to be studied involve the sequence ofintegers vi
that appear in the execution of EuclideanAlgorithm. They
depend
on thepair
(u,
v)
itself,
notonly
on the ratio(u/v)
but also on thegcd
r(u, v).
The relation between vi and Wi,i.e.,
vi(u, v)
=r(u, v) wj (u, v)
entails that V and
M[c]
arerespectively
related to W andK(c~,
2.4.
Average
values of costs.Here, I
denotes the basic interval. We consider thefollowing
setsfor the
possible
inputs
of a Euclideanalgorithm.
Remark that setQN
canbe viewed as the set of irreducible rationals with denominator less than N.
We denote
by
X (u,
v)
one of thegeneric
costs that are defined inFigure
2.We wish to
study
the mean value of X onQN
andON
that we denoteby
EN[X]
orEN ~X ) .
Moreprecisely,
we aim to evaluate theasymptotic
behaviour
(for
N -oo)
of the mean valuesWe will prove in the
sequel
that it is sufficient tostudy
the first five costs(1-5)
defined inFigure
2 that are relative to rational numbers. The nextsection
analyses
these costs when x isreal,
andgives
some indications onwhat can be
expected
in the rational case.3. Continued Fraction
Algorithms. Symbolic Dynamics
andErgodic
TheoremsWe now relate Euclidean
algorithms
with continued fractionsalgorithms
that can be viewed as continuous extensions of them. Continued fractions
algorithms
areimportant particular
cases of what isusually
calleddynamics
concerns itself with theinterplay
betweenproperties
of thetrans-formation and discrete
properties
oftrajectories
ofpoints
under iteration of the transformation.There,
ergodic
theorems are very useful tostudy
themain
parameters
ofinterest,
when x is almost any real of the interval.We
adopt
here ananalytic
point
ofview,
withhypotheses
stronger
thanusual,
which entails easierproofs
and iswell-adapted
to continued fractionsystems.
3.1. Piecewise
analytic
maps of the interval.Here,
we restrictour-selves to the
particular
case where the transformation ispiecewise
analytic.
Definition 1.
[Piecewise
analytic
maps of theinterval]
Let I be a realinterval. A
mapping
U : Z -~ I ispiecewise analytic
if there exists a(finite
ordenumerable)
setAs
whose elements are calleddigits,
and apartition
of the interval I in subintervals
Ij
such that the function x ~ Ux mapsanalytically
eachIj
onto 1.A
piecewise analytic
map thus consists ofdenumerably
many branchesin-dexed
by
some set .M. We letM(x)
E Mrepresent
theindex j
of the subintervalIj
where x falls. Acoding
of a real number x is then obtainedby
the sequence ofdigits
of the successive iterates of x,Here powers denote
iteration, U2
= U oU,
etc. The sequence ofdigits
ofx is then
produced by
thefollowing
simple
algorithm.
Procedure
Expansion
(x)
A
special
role isplayed by
the set H of branches of the inverse functionU-1
of U that are also
naturally
numberedby
the index set we denoteby
the inverse of the restriction If Xk := and the sequence
m =
(ml, ... ,
of the first kdigits
areknown,
thealgorithm
can be runbackwards,
and theoriginal
xo is recoveredby
The
semi-group
:=generated by
H is the set of all finitecom-positions
o ... o thelength
of thedecomposition
of h iscalled the
depth
of h and denotedby
lhl.
The scheme
(14)
generalizes
the usualbinary representation
of real numbers and it constitutes also a very convenient framework for a discussion of continued fractionalgorithm.
3.2.
Ergodicity
andErgodic
Theorem. We recall here some classicaldefinitions cast in our
particular
framework.Here,
I denotes a real intervalendowed with its
Lebesgue
measure dt. We consider here another measureti with a continuous
density
g, so thatd¡,t(t)
=g(t)dt.
Definitions 2.
[U-invariant measure]
Let U be a measurablemapping
U : Z - 1. The measure ft is said to be U-invariant
if,
for any subintervalone has
~c(U-1,7) _
[Ergodicity]
Let U be a measurablemapping
U : Z ~ Iand p
be aU-invariant measure. The
triple
(I,
U,
isergodic if,
for any subintervaly C
I such that C,7,
one has = 0 or 1.[Strongly mixing]
Let U be a measurablemapping
U : Z -> Z and ti be a U-invariant measure. Thetriple
(I,
U,
tt)
isstrongly
mixing if,
for anysubinterval
:1, JC
CI,
one has rlNaturally,
themixing
property
implies
theergodic
property.
Ergodic
Theorems relate two different kinds of means relative to a functionf :
the mean value off along
an orbit of the form(x,
Ux,
UZx, ...
Unx, ... )
and the mean value of
f
relative to measure 1L.BirkhofF’s
Ergodic
Theorem. Let(I,
U,
p)
beergodic.
Then,
for anyf
E£1(I),
onehas,
for almost all x of1,
3.3.
Strongly expanding
maps of the interval andergodicity.
Clearly,
the stochastic behaviour of anumbering
system
isclosely
relatedto the
dynamics
of map U on the intervalZ;
thisdynamics
is itselfiso-morphic
to thedynamics
of thesemigroup
7~C* that isgenerated by
theset H of inverse branches. We now consider an
important
class of mapsU for which this
dynamics
is well understood: the case of the(strongly)
expanding
maps.Definition 3.
[Strongly
expanding
maps of theinterval]
Let I be a realinterval,
and let U : Z ~ ~ be apiecewise
analytic
mapping
whose set of inverse branches is denotedby
~‘~C. Themapping
U isstrongly expanding
if there exist an open disk V whose closure contains the interval I and a reala 2 such that the
following
holds:(a)
every h E 1t has ananalytic
continuation onV;
(b) h
maps the closure V of disk V insideV;
(c)
Forany h
EH,
the absolute valuelh’I [
of the derivative has ananalytic
(d)
Forany h
E1t,
the supremumJ(h)
:= EVI
satisfiesb(h)
1 and the series¿hE1-l
converges.Remark 1. The
quantity 6
:=sup {8(h), h
E?-L}
satisfies 6 1 and defines the contraction ratio. The map U is calledexpanding
since the derivative satisfies(1/b)
> 1. When there exists someinteger
k > 1 for which
Uk
isstrongly
expansive,
then U is calledeventually
strongly expanding.
Thetriple
(V,
a,6)
that intervenes in Definition 3 iscalled the
triple
of U.Remark 2. The map U is called
strongly
expanding
because of twoas-sumptions :
(i)
the variousanalytic
continuations of h andIh’l
on some diskV that
strictly
contains intervalZ~,
(ii)
the fact that the real a isstrictly
less 2.
We state now the
important
and classical result that shows that astrongly
expanding
map of the interval isstrong
mixing
(and
thusergodic)
withrespect
to its(unique)
invariant measure.Theorem. Let U be an
eventually strongly
expanding
map of Z. Thenthere is a
unique
U-invariant measure JL.Moreover,
thetriple
(I,
U,
~,)
isstrongly
mixing
(thus ergodic)
and the measure p is of formdp =
0(t)dt
where 0
isanalytic
on theneighborhood
V of 1.The main tool used in the
proof
is the Perron-Frobenius operator that we now introduce.3.4. The Perron-Frobenius
operator
relative to astrongly
ex-panding
map. Aspreviously,
the set 1t denotes the set of inverse branches of U. The Perron-Frobeniusoperator
H relative to1t,
together
with itscomponent operators
Rh
relative to each inverse branchh,
is defined asfollows:
First,
the operator H is adensity transformer, i.e.,
Second,
the n-th iterate of H describes whathappens
during
the n-th iter-ation ofmapping
U.Multiplicative properties
of the derivative entail thatthe n-th iterate of H involves all the inverse branches of
depth n,
If U is
strongly expanding,
we can prove thefollowing.
Denoteby
the set formed with functions
f
that areanalytic
on V and continuous onV.
Endowed with the sup-norm, this set is a Banach space and eachcom-ponent operator
Rh
is acomposition
operator.
Thistype
ofoperators
wasextensively
studiedby Shapiro
[33]
who provesthat,
underassumptions
(a), (b), (c),
they
act on arecompact,
and even nuclear in the senseof Grothendieck
[17, 18].
Under condition(d),
theoperator
H itself actson is
compact
and nuclear.Furthermore,
theoperator
H haspos-itive
properties
that entail(via
Theorems of Perron-Frobeniustype
due toKrasnoselsky
[24])
the existence of dominantspectral objects:
there exista
unique
dominanteigenvalue
Astrictly
positive,
a dominanteigenfunction
denoted
by
strictly
positive
on VnR and a dominantprojector
E. Undernormalization condition =
1,
these last twoobjects
areunique
too.Then, compacity
entails the existence of aspectral
gap between thedom-inant
eigenvalue
and the remainder of thespectrum.
Since H is adensity
transformer,
the dominanteigenvalue
satisfies A = 1 and the dominant
pro-jector
satisfiesE[f]
= II f(t)dt.
Then the dominanteigenvector 0
is alsoan invariant function under H and the measure 1L defined as
dp(t) = (t) dt
is U-invariant.
Finally,
thedecomposition
where the
operator
N relative to the remainder of thespectrum
(cf
aprecise
definition in
[27])
has aspectral
radiusstrictly
less than1,
proves thatwith
exponential speed,
and 7p
is also the the limitdensity
on I when mapwhen
applied
to g
:= 13 ’ljJ
andf
:=1~
for some subintervals entailthat measure p defined
by
:=qp(t)dt
isstrong
mixing
(with
exponen-tial
speed)
and thusergodic.
Remark. We
only
need in theprevious
proof
a weak form of condition(d),
i.e.,
the fact that the series¿hE1-l
converges for a = 2.However,
the
strong
form of condition(d)
(i.e., ~
2)
will bequite important
for thesequel, particularly
in Section 4.5.3.5. Some
important
asymptotic
mean values. Sincefunction 0
isalso the limit
density
on Z~ when the map U is iterated manytimes,
the meanvalues relative
to p
can be also considered asasymptotic
mean values anddenoted
by
Eco. Here,
wegive
someimportant asymptotic
mean valuesthat
play a
central role in thesequel. They
are relative todigits
or toentropy
of thedynamical
system.
If M denotes thenumbering
function,
and c denotes acost-digit
function c : .ll~I -~R+,
then theasymptotic
mean value of c o M is
The
entropy
of thedynamical
system
is defined as thelimit,
if itexists,
of a
quantity
that involves measures ug of intervalsg(Z), (for g
E71*)
Via a classical formula due to
Rohlin,
theentropy
is related to theasymp-totic mean value of
log
lU’l
[
In the
sequel,
we describe the numerationsystems
relative to continuedfrac-tions,
the standard continued fractionsystem
and the centered continued fraction. In both cases, we obtain real extensions of Euclideanalgorithms
that
give
rise toexpanding
maps where theergodic
framework can be used.3.6. Standard and centered continued fraction
expansions.
Thecontinued fraction
systems
fit into thegeneral
framework ofpiecewise
integer
part
function denotedby x ~
l x J
and the fractionalpart
function~ 2013~ := x - It is described
by
thequadruple
(I,
U,
m,H)
We also let
U(0)
=0,1/0
= 0. Centered continued fractions are obtainedwhen one
replaces
truncation(integer
part
function)
by rounding
to thenearest
integer x -->
~~x~~.
First introduce the notationsso that the
following identity
holds:Then,
the centered continued fractionsystem
is definedby
thequadruple
(I,
U,
m,1(,)
given
by
with,
conventionally,
U(o)
=0,
m(O)
=0,
1/0
= 0.These numeration
systems
provide
a sequence ofdigits according
to scheme(14)
and thus continued fractionsexpansions,
that aregenerally
infinite.When
applied
to a rational x, theseexpansions
are finite and coincidewith continued fraction
expansions
of Section 2. In this sense, continued fractionssystems
can be viewed as extensions of EuclideanAlgorithms,
andin both cases, the rational numbers are
exactly
the real numbers for whichthe continued fraction
expansion
is finite. A number x is rational if andonly
if there exists an element h of thesemi-group
H* for which x =h(o).
3.’l.Applications
ofErgodic
Theorem to continued fractionssys-tems. It is clear that both continued fraction
systems
are related to(even-tually)
strongly expanding
maps.Then,
theErgodic
Theoremapplies
toCF-expansions,
and classical results entail that the invariant measure it isof the form
dp(t) =
withThe first result was
conjectured by
Gauss,
then provenby
Levy
[26].
Thesecond result was established
by Rieger
[30].
The related distributionWe consider now some
asymptotic
mean values thatplay a
central role inthe
sequel.
Thefollowing
results are classical and can be found for instance in[5].
Digit-costs.
Consider someparticular
digit-cost
c :R+
such thatc o M is in If
c(m)
equals
for instance thebinary
length
ofdigit
a,i.e.,
the number ofbinary digits
in thebinary
expansion
ofdigit
c~, onehas,
with
general
formula(20),
In the case of centered continued
fractions,
whendigit-cost
equals
thesign
e, one obtains
-11 -11 ,
Then
Ergodic
Theorems provethat,
in both cases, and for almost all x in-T,
Entropy.
The variable x -> ~log
z
isquite important
too, since theasymp-totic mean value
Eco
[I
log
xl]
isclosely
related to theentropy
h(H)
of thedy-namical
system,
via Rohlin’s formula(21)
and the fact thatIU’(x)1
=
1/x2,
so that
explicit
values ofentropy
are obtained in both cases,Continuants. This mean value intervenes also when
studying
the averagebehaviour of the
parameter
log qn (x)
relative to(beginning)
continuantqn (x)
that is well-defined for ageneral
real number too. A real numberx whose continued fraction
begins
with h =hl
oh2
o ... ohn
satisfiesx =
h(y)
=hl
oh2
o ... o with some y EI;
We relate x to therational xo :=
h(O)
=hl
oh2
0 ... o and the transformso
h2
0 ... o to the transformsuj(xo)
=The classical relation between numerator
pj (x)
and denominatori.e.,
= proves that
Since U is
expanding
with contraction-ratio6,
one obtains anapproximate
expression
oflogqn(x)
that involves transformslogU2(x)
instead oftrans-forms
log
Ui(xo):
Since one hasthere exists some constant K for
which,
for any x, and anyinteger
n,Now,
theErgodic
Theorem(15)
applies
to the functionlog
implying,
via
(25)
and(26),
thatRelations between
entropy
and meanbinary length
ofdigits.
Theasymptotic
mean value relative to thebinary
length
and thequan-tity
h(-H)/(2
log
2)
arerelated,
since the second one is theintegral
of11092 tl
[
with
respect
toergodic
measure, while the first one is theintegral
of thefunction that
equals
llog2aJ
+ 1 on the interval We then obtainthe relation
3.8. Heuristic transfer from continuous model to discrete one.
With respect to
asymptotic properties
of continuedfractions,
rationalnum-bers are very
particular
since their continued fractionexpansion
is finite.However,
let usimagine
that continued fractions of rational numbers andcontinued fractions of real numbers behave in the same way and let us
suppose that the
Ergodic
Theorem may beapplied
to rational numbersbehaviours for our
parameters
of interest relative to rational numbers and defined inFigure
2However,
it ishighly probable
that this result may be trueonly
in averageon the set
QN
defined in(12)
when N tends to oo. On the otherhand,
the
depth
p(x)
of a rational x of denominator Nequals
the rank n forwhich
equals
N. If rational numbers oflarge
denominator behave likegeneric
realnumbers,
it is thusplausible,
from(27),
that(2/h)
log
N forlarge
N. This is a well-known result for which we shallgive
an alternativeproof
in thesequel.
Finally,
thefollowing
estimates areplausible:
and will be proven in the
sequel.
4.
Generating
functions,
dynamical
operators
and Tauberian TheoremsHere,
we describegeneral
tools foranalysing
the main costs of interest rel-ative toalgorithms
of the Euclideantype.
We first introduce the Dirichletgenerating
functions relative tocosts,
so that the average cost involves par-tial sums of coefficients of these Dirichlet series. Tauberian Theorems are a classical tool that transfers theanalytical
behaviour of a Dirichlet series near itssingularities
into anasymptotic
form for its coefficients.Then,
when
viewing
thealgorithm
as adynamical
system,
we relategenerating
functions of costs to the Ruelle
operator
associated to thealgorithm,
sothat we can
easily
describe thesingularities
ofgenerating
functions.Fi-nally,
we prove the estimates of the mean values that have beenpreviously
proposed
for the mainparameters
ofalgorithms.
4.1.
Generating
functions. We recall that we consider thefollowing
setsas
possible
inputs
of a Euclideanalgorithm.
Our purpose is to estimateand
QN-
Moreprecisely,
we aim to determineasymptotically
(as
N -oo)
these meanvalues,
denotedby
EN []
orEN (X ~ ,
thatsatisfy
The
following
Dirichletgenerating
functions ofcosts,
are of the form
where
an, an
are the number ofpairs
(u, v)
of Q or Q with fixed v =n, and xn,
xn
are the cumulative values of X onpairs
(u, v)
of Q or Q with fixedv =
n, so that the average costs in
(29)
to be studiedare
exactly
thequotient
ofpartial
sums of the coefficients of the Dirichletseries defined in
(30).
First,
remark that there is an easy relation betweenGx
andGX
when costX satisfies
X (u, v)
=X (au,
av)
forany
integer
a > 1. Thenwhere
((s)
is the Riemann Zeta-functionThis is the case when X = 1 or when X is one of the first five costs of
interest defined in
Figure
2. For the last two costs defined inFigure
2 that involveintegers
vi, relations(10)
entail that4.2. Tauberian Theorems. In the remainder of the paper, we aim to
apply
thefollowing
Tauberian Theorem to the Dirichlet seriesF, G x
definedin
(30)
in order to estimate their coefficients.Tauberian Theorem.
[Delange]
LetF(s)
be a Dirichlet series with nonnegative
coefficients such thatF(s)
converges forR(s)
> (1 > 0. Assume that(i)
F(s)
isanalytic
onR(s)
=Q, s ~
a, andF(s)
=A(s) (s -
~)-7-1
+C(s),
whereA,
Care
analytic
at a, withA(Q) ~
0.Then,
as N --> oo,We first examine the case of functions
F(s),
F(s)
that areclosely
linked tothe Riemann series
~(s)
via theequalities
Then,
classicalproperties
of (
function entail that the Tauberian Theoremapplies
toF(s)
andF(s),
with Q = 2and
= 0. Moreprecisely,
at s =2,
one has:
(s - 2)F(s) -
(6p)/7r~.
When X is one of the three costs defined in
Figure
2 relative to continuantsQ, V,
W,
itapplies
to with Q = 2and I
=3,
so that the mean valueEN [X]
will be of orderlog2
N. When X involves adigit-cost
c, we willexhibit some sufficient conditions on cost c under which the Tauberian
Theorem
applies.
In this case, the values Qand -y strongly depend
onproperties
of thedigit-cost
c. In the case when cequals
thebinary
digit-length
l,
the mean value]
will be of orderlogN,
while themean-value will be of order
log2
N. We can deal with variedcosts;
for
instance,
ifc(m)
=m log 2 m,
thenEN[S[c]]
is of orderlog4
N,
and ifc(m)
=T723~2~
thenEN[S[c]]
is of orderv’N.
It is not a
priori
clear how todirectly apply
Tauberian Theorems toGx (s).
In the
following,
we obtain alternativeexpressions
for fromwhich the location and the nature of their
singularities
will becomeappar-ent. Our
analysis
involves suitable Ruelleoperators
that can be viewed asextensions of
density
transformers of Section 3.4 when one introduces somecomplex
parameter s thatplays
the same role astemperature
in statisticalmechanic.
4.3.
Algebraic
properties
of Ruelleoperators.
The Ruelleoperators
that we use now can be viewed as extensions of the Perron-FrobeniusThe Ruelle
operator
Rs,h
relative to a LFT hdepends
on somecomplex
parameter s
and is defined aswhere
D[h]
denotes the denominator of the linear fractional transformation(LFT)
h,
defined forh(x) =
(ax + b) / (cx + d)
with a,b,
c, dcoprime integers
by
D~h](x) :
:= =Then,
for a LFT h ofdeterminant
1,
theoperator
Rs,h
is an extension of theoperator
Rh
definedin
(16),
via theequality
R2,h
=Rh.
Once a cost function c relative to the LFT h has been
fixed,
one can defineanother Ruelle
operator
relative toh,
Now, given
analgorithm
and a set 1t of LFT’s used in onestep
of thealgorithm,
the Ruelleoperators
relative to 7~C are definedby
As
previously,
if the set ?nC is formed of LFT’s with determinant1,
theoperator
Hs
is an extension of theoperator
H defined in(16),
via theequality
H2
= H.In all cases, the
multiplicative
property
of denominatorD, i.e.,
D (h) (g (x) ) D ~g~ (x)
is translated into amultiplicative
property
on Ruelleoperators:
Given twoLFT’S, h
and g, the Ruelleoperator
associatedto the
LFT h o g
isexactly
theoperator
oRs,h.
Moregenerally,
whengiven
two sets ofLFT’s,
,C and JC and their Ruelleoperators
Ks, Ls,
theset is formed of
all h o g
with h E Land g
EJC,
and the Ruelleoperator
relative to the set isexactly
theoperator
Ks oLs .
Inparticular,
the Ruelleoperator
relative to thesemi-group
?-~* := isexactly
(I -
Hs)-1.
It is thequasi-inverse
of the Ruelleoperator
H,
associated to the set ~-L.4.4. Ruelle
operators
and Dirichletgenerating
functions. We shownow how the Ruelle
operators
associated to thealgorithms
intervene in the evaluation of thegenerating
functions of costsGx (s),
GX (s).
We recall that it is sufhcient tostudy
GX
for one of the first five costs ofFigure
2.We consider here a Euclidean
Algorithm
and its set of LFT’s Htogether
with its final set J’ defined inFig.l.
The Ruelleoperators
Hs,
FS,
relative to ?~ or 7 and defined in(33,
34,
35)
willplay a
central role in theAn execution of the
algorithm
on theinput
(vi, vp)
of S2performing
psteps
of the form
decomposes
the rational as(vi /vo)
=hi
oh2
0 ... ohp (0),
where theh2’s
are elements of 1t(for
i p -1)
or elements of ,~’(for Z
=p) .
The choice of anindex i,1 i
p,splits
the LFT h =hl
oh2
0... o
hp
intothree different
parts:
thebeginning
part
bi (h)
:=hl
oh2
0 ... ohi-1,
theending
part
ei (h)
:= o 0 ... ohk,
andfinally
the i-thcomponent
hi.
From(8)
and(9)
thefollowing
equalities
hold:The derivative functional A
plays
animportant
role too. For someop-erator
Ls
thatdepends
onparameter
s, theoperator
AL,
is definedby
AL,
Whenapplied
to defined in(33),
this functional Ais well-suited to the
problem
since itproduces
at the numerator theloga-rithm
logD[h].
Whenapplied
to or to itproduces
at thenumerator, via
(36),
thebeginning
or theending
continuants.We now introduce our main
operators,
that are all builtaccording
to thesame
principles:
each of them isprecisely
related to one of thegeneric
costsX defined in
Figure 2,
and thegeneric
operator,
relative togeneric
costX,
is denoted
by
Xs,h .
If h is a LFT ofdepth
p, it isexpressed
as a sum ofp terms each of which may involve , Z ( ) and s,h2
however,
the
precise
form ofdepends
on cost X .Figure
3(top)
describes theoperators
relative to the studied costs.We claim
that,
whenapplied
to functionf
= 1 andpoint x
=0,
eachoperator
Xs,h
generates
the costvo)
of thealgorithm
oninput
(vi, vo)
of Q
Now,
when(vi,
vo)
is ageneral
element ofS2,
the LFT h definedby
(2)
is ageneral
element of set?~*,~,
so that we obtain alternativeexpressions
of our main Dirichlet seriesF, G x
defined in(30)
When index i varies in