J
OURNAL DE
T
HÉORIE DES
N
OMBRES DE
B
ORDEAUX
C
LEMENS
H
EUBERGER
Minimal redundant digit expansions in the gaussian integers
Journal de Théorie des Nombres de Bordeaux, tome
14, n
o2 (2002),
p. 517-528
<http://www.numdam.org/item?id=JTNB_2002__14_2_517_0>
© Université Bordeaux 1, 2002, 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
Minimal
redundant
digit expansions
in
the
Gaussian
integers
par CLEMENS HEUBERGER
RÉSUMÉ. Un résultat récent établit
qu’il
suffit de connaître lesdeux derniers chiffres
significatifs
dudéveloppement
enbase q
usuel d’un entier pour calculer le dernier chiffre
significatif
dansle
développement
enbase q
redondant minimal. Nous montrons que l’énoncéanalogue
pour les entiers de Gauss est faux.ABSTRACT. We consider minimal redundant
digit
expansions
incanonical number systems in the Gaussian
integers.
In contrast tothe case of rational
integers,
where theknowledge
of the two leastsignificant digits
in the "standard"expansion
suffices to calculate the leastsignificant digit
in a minimal redundantexpansion,
such a property does not hold in the Gaussian numbers: We provethat there exist
pairs
of numbers whose non-redundantexpansions
agree
arbitrarily
well but which have different leastsignificant
digits
in minimal redundantexpansions.
1. IntroductionLet n
and q >
2 bepositive
rationalintegers.
Redundant q-ary expan-sions n = witharbitrary
digits
E Z have been studiedby
severalauthors,
motivatedby applications
fromcryptography
andcoding
theory.
Forgeneral
positional
numbersystems,
we refer to Knuth[3,
Sec-tion4.1.].
An overview over results on redundant q-arydigit
expansions
iscontained in
[1].
The aim is to minimize the cost of anexpansion
which isgiven by
Recently,
weproved
[1]
that theknowledge
of the first twodigits
qo, r~l of the "standard"expansion n
=E" 0
?7j qj
with 0 q suffices to decidej=
-what
digit -o
should be taken in order to achieve a minimalexpansion
withrespect
to the costs(1).
By using
thisinformation,
we couldprovide
anefRcient
algorithm
tocompute
a minimalexpansion,
a formula tocompute
a
single digit
withouthaving
tocompute
theothers,
and we gave estimatesfor the average costs of such an
expansion.
A natural
question
is whether such a result is also true if wereplace
the q-ary
expansion
in the rationalintegers
by
anexpansion
in a canonicalnumber
system
in somealgebraic
number field. In this paper, wegive
anegative
answer for the case of the Gaussianintegers.
Let R be a
subring
of thering
ofintegers
in analgebraic
number field K.For
#
ER,
(,8, {0, ... ,
11)
is called a canonical numbersystem
if all a E R have a
unique
representation
We refer to Kovics and Peth6
[4]
for further discussions on canonicalnum-ber
systems.
Kitai and Szab6
[2]
characterized canonical numbersystems
in theGaussian
integers: #
E is a base of a canonical numbersystem
ifand
only
ifRe #
0 andIm,Ci
= f 1.Let
(3
be such a base and a EZ[i].
A redundantexpansion
of
a in base{3
is atuple
(ro, ... , ri)
with rj E Z for0 j
I such thatA Minimal redundant
expansions
of
a in base{3
is a redundantexpansion
with minimum costs
The main result of this note is the
following
theorem.Theorem 1.
Let,8
be a baseof
a canonical numbers ystem
in the Gaussianintegers.
For all L > 0 there is apair
of
numbers a,a’
with thefollowing
properties:
1. Let a = and a’ =
¿j=o
aj,8J
be theunique representations
according
to(2)
withl,
l’ > L. Then aj =aj
for 0 j
L.2. For all
pairs
(ro, ... ,
rs)
and(ro,
... ,of
minirrzal redundantexpan-sions
of
a anda’,
respectively,
we havero =1=
ro.
This
implies
that there are numbers where theknowledge
of the firstL + 1
digits
in the "standard"expansion
(2)
cannot be used to derive the firstdigit
of a minimalexpansion.
We call apair
a, a’ as described inAccording
to the result of Katai and Szab6 we have toconsider#
= -n+Ifor n >
1;
without loss ofgenerality
we may assume~3
= -n + i. We first discussgeneral
properties
of minimalexpansions
in Section 2. We show thatnot all
integers
can occur in a minimalexpansion.
Thisimplies
that there areusually
two choices for the leastsignificant digit
of theexpansion.
Wedemonstrate how to prove rules which can avoid
branching
in some cases.Some of these rules are based on the fact that some
digits
cannot occur,other rules have to be
proved by checking
minimalexpansions
of a certainset of numbers. Then we construct a critical
pair
for n > 3 in Section 3.The
special
cases n = 1 and n = 2 areinvestigated
in Sections 4 and5,
respectively.
The construction of criticalpairs
is done as follows.First,
wecollect
enough
rules in order to derive minimalexpansions
of some numbersrecursively.
In a secondstep,
we take allpossible
leastsignificant digits
for onecomponent
of thepretended
criticalpair,
use the knownexpansions
from the
previous
step
in order to calculate the minimum costs for all alternatives and see thatonly
one of thepossible
leastsignificant digits
leads to a minimal
expansion.
By
doing
the same for the othercomponent
of the critical
pair
we prove that the leastsignificant
digits
in minimalredundant
expansions
differ.For an A C Z we use the notation
A* :=
ak E A
and ak = 0 for almost allA:}.
We
identify
finite sequences(ao, ... ,
al )
with thecorresponding
infinitese-quences
(ao, ... , al,
0, ... ).
The indices of all sequences start with 0 unlessotherwise stated.
For
given ~3
and for a EZ[I]
and a E Z* we write a ’::::.,8 a if a =Similarly,
we writeWe define
opt,6 (a)
:={r
E Z* : r is a minimal redundantexpansion
of a in base{3}
and extend this notation to a E Z*
by
opt~(a)
:=The concatenation of finite sequences is denoted
by
’
This notation is extended to concatenations of a finite sequence a E
Z~
with a set of infinite sequences R C Z*: a & R :_
{a
& b : b ERI.
Finally,
the
repetition
of a sequence is definedby
(ao, ... ,
=(ao, ... , al ) &
(ao, ... , al )
& ... &(ao,
... , where the block(ao, ... , al )
isrepeated
k2.
Properties
of MinimalExpansions
Let us first state the
following
observation:Not all
integers
can occur asdigits
in a minimalexpansion,
as is shownin the
following
lemma.Then we have
Proof.
We consider first the case n > 3. Assume that(7b)
is not true.Then there is some r E
optp(a)
andsome j
such thatlrjl
>n2/2
+ n + 1. is also a- - -
-redundant
expansion
of a for Q =sign(rj ) .
We haveIf
lrj
>M,
we conclude thatotherwise,
weget
This is a contradiction to the
assumption
that r is a minimalexpansion.
Therefore,
(7b)
isproved
3. Becausen2/2
+ n + 1 M for n > 3,
thisyields
(7a)
also.The
proof
of(7b)
for n = 1 and n = 2 is similar: Werepeat
the aboveinstead of relation
(5).
Now,
we prove(7a)
for n = 1. Assume that fl D* =0
andlet r E
By
assumption,
there issome j
such that = 2. Leta
:= sign(r~).
If j
l-3,
we mayreplace r
by’=
(ro, ... ,
CT, r~+4, ... ,
ri),
since(-2, 0,1,1)
’:::t.,8 0 andc(r’) -
c(r)
0. Weemphasize
that r and r’ are of same
length.
Therefore werepeat
this processfinitely
many times in order to obtain an r :=
(ro,..., ri)
Eopt~(a)
such thatWe may
replace
(ri-2
7ri - 1,ri)
by
any element ofoptp(r,-2, r’-l, rl).
Itcan
easily
be checked that nD* ~
0
for all choicesFinally,
we note that for n =2,
(7a)
can beproved similarly using
relation(5).
aWe note that Lemma 2 and Lemma 3 can be used to calculate one
(or all)
minimal
expansion
inexponential
time. Assume that we want tocompute
opt~(a)
for some a = a+bi. Since a -(a + nb) (mod ~3),
the set ofpossible
least
significant
digits
is contained in R := n(-Un, Un~.
Thisyields
An
implementation
of these ideas in Mathematica can be obtained fromhttp://vwv.opt.math.tu-graz.ac.at/-cheub/publications/minimal
redundantgauss/.
The
following
lemma shows how to prove some rules of thefollowing
type:
If the standardexpansion
(2)
starts withdigits
(ao, ... ,
then there isan
optimal expansion
which starts with thedigit
ro. Lemma 4. Let n >1,
,(3
= -n+ i,
a EDl+l,
a’=={3 a and ro E Z with
Irol
M. Then thefollowing
conditions areequivalent:
1. For adl t E Z* we have &
t)
fl ro &Z* 7~
0.
2. For adl a’ that
satisfy a’ -
a(mod
andfor
which there is ans E with a’ ’:::::!.,8 s we have
Note that s in condition 2 and a are of same
length 1
+ 1.Proof.
Assume condition 1. Since a’ - a(mod
~3l+1 )
there is anexpansion
a’ a & t for some t E Z*. Therefore there exists some s E Z* such that
Conversely,
assume condition 2. Let t E Z* and definea"
’:::1.,8 a & t.Choose some s E D* n &
t)
=opt (a").
This intersection isnon-empty
by
(7a).
We
define a’
:= and note thata’ -
a" m a(mod ~3l+1).
By
assumption,
there is some l’ > I and some r =(rl, ... ,
rl’)
EZ"
(we
do notenforce
rl’ =1=
0)
such that(ro)
& r EBy
construction of r, weget
Since s E
opt,
(a"),
this proves that(ro)
& u Eopt,8( a")
= &t).
DThe
following
lemma shows that condition 2 of Lemma 4 can be checkedefficiently:
Lemma 5. Let
n >_
1,
,8
= -n +i,
a, a’ E
Dl+l,
a ’:::!.,8 a,a’
a’ suchthat 0:’ - a
(mod
,C~l+1 .
Then there is some E Zi
with- ~ I
-such
that a’
= a +Proof. Let y
EZ lil
such that a’ - a = We obtainI
3. Critical Pair for n > 3
The
following
lemma calculates the minimalexpansion
of somespecial
numbers which will occur in the construction of a critical
pair.
Lemma 6. Let n >
3,
~3
= -n+ i,
andProof.
For R EZ*,
Lemma 2 and(7b)
imply
By
Lemma 2 and(7b),
anoptimal expansion
of x may start with x orx - M.
Since Ix - At)
+ 1 >Ixl
for n >5,
weproved
(l0a)
in this case. For n E{3, 4},
relation(l0a)
can be checkeddirectly. Similarly,
we canverify
(lOd).
--The
proofs
of(lOc), (l0e),
and(lOt)
for k = 1 are similar.An inductive
argument
completes
theproof
of the lemma.We are now able to construct a critical
pair:
Then
Proof.
We first consider the case 1 = 2k with k > 2. As in(8),
relations(7b)
and(lla)
imply
2 -
M, ~ -
2n)
&(x) ~l~-l~ ~ .
We can now use theexpansions
calculated in
(lOb)
and(lOt)
to obtain thefollowing
candidates for minimalexpansions
of(x - 2)
&(x)~2~‘~.
Since
the first alternative has to be taken in order to minimize the costs. We
note that we
proved equality
in(lOb),
whichyields
(12)
for 1 = 2k > 4.The other cases can be
proved similarly.
D4. Critical Pair for n = 1
In Table
1,
we collect some choices(a,
ro)
EDl+l
x D for which the conditions of Lemma 4 are fulfilled.The
following
lemma will be needed for the construction of a criticalpair
for n = 1:
Lemma 8. Let
{3
- -1 +i,
R EZ*,
q >
0,
0 r5,
and s =5q
+ r.TABLE 1. Some valid choices for n =
1,
a, and ro in Lemma 4Proof.
First,
we prove that, , 1-1
From Table 1 we derive
Using
(13)
andnoting
that and thatApplying
thisrelation q
timescompletes
theproof.
0 We are now able to construct a criticalpair
(which
proves Theorem 1 forn = 1).
Proof.
From(7b)
we see thatoptg (a)
C(1)
& Z* U(-1)
& Z*. We notethat a can also be
represented by
((- 1, 0,
2,1, 0, 0)
&(1, 1,
O)(5q+l»).
We use Table 1 and Lemma 8 to calculateSimilarly,
we obtainSince
by
(15)
anoptimal
expansion
of((0, 1,
0,
0,
0)
&(1, 1,
0) (5q+ 1) )
hascost
3 + 6q
and anoptimal expansion
of~(0, 2,1, 0, 0)
&(1,1, O)~59+1)~
hascost 2 +
6q,
weget
(14)
for a.Analogously,
we note thatwhere the
optimal
cost is6q
+ 3. On the otherhand,
a’ can berepresented
by
( -1, 0, 2,1, 0, 0)
&( 1,1,
0)(5q+l)
&(1, 1, 1),
whichyields
with
optimal
cost6q
+ 4. Thiscompletes
theproof.
D In the case n =1,
Table 1 shows that in most cases it is sufficient to knowa few more
digits
in the "standard"expansion
to derive the correctdigit
in an
optimal
expansion.
Therefore,
analgorithm
tocompute
anoptimal
expansion
couldprecompute
some more entries for Table 1 and branchonly
in those cases where no information is known.We note that the relation
(-1 -f- i)4 = -4
strongly
relates the standardexpansion
in base -1 + i to theexpansion
in base -4 in Z.However,
this observation cannot be used for minimalexpansions
because this correspon-dence does notrespect
the costs(4).
5. Critical Pair for n = 2
We will
repeatedly
use the relation(5, -l, -3, -1)
0 and the rulesTABLE 2. Some valid choices for n =
2,
a, and ro in Lemma 4
Proof.
As in theproof
of Lemma8,
repeated application
of rules in Table 2yields
for R E Z*.
Iterating
this result andnoting
that( 1, 3,1 )
E3,1 )
proves the lemma. 0
The
proof
of thefollowing
proposition
completes
theproof
of Theorem 1 for n = 2:Proposition
11. Let n =2,
~3
= -2~- i, u >
0. ThenProof.
Let a( 3, 4, 4,1 )
&(1,3, 1)(u).
We write u : = 2s + r with r E~ 0,1 ~ .
According
to(7b),
we have to consider firstdigits - ?, - 2, 3, 8.
Allpossible
expansions
aregiven
in Table3,
which has beencomputed using
Table
2,
Lemma 10 and an inductiveargument
(for
expansions
starting
with -7).
0References
[1] C. HEUBERGER, H. PRODINGER, On minimal expansions in redundant number systems:
Al-gorithms and quantitative analysis. Computing 66 (2001), 377-393.
[2] I. KÁTAI, J. SZABÓ, Canonical number systems for complex integers. Acta Sci. Math. (Szeged) 37 (1975), 255-260.
[3] D. E. KNUTH, Seminumerical algorithms, third ed. The Art of Computer Programming,
vol. 2, Addison-Wesley, 1998.
[4] B. KOVÁCS, A. PETHÖ, Number systems in integral domains, especially in orders of algebraic number fields. Acta Sci. Math. (Szeged) 55 (1991), 287-299.
Clemens HEUBERGER Institut f3r Mathematik
Technische Universitat Graz
Steyrergasse 30 A-8010 Graz Austria
E-mail : demons. heubergerttugraz. at