Numeration Systems
Total Page:16
File Type:pdf, Size:1020Kb
CHAPTER Numeration systems Contents Numeration systems Intro duction Standard representation of numb ers Representation of integers Representation of real numb ers Betaexpansions Denitions The shift Classes of numb ers U representations Denitions The set of normal U representations Normalization in a canonical linear numeration system Representation of complex numb ers Gaussian integers Representability of the complex plane Problems Notes Bibliography Intro duction This chapter deals with p ositional numeration systems Numb ers are seen as nite or innite words over an alphab et of digits A numeration system is dened by a couple comp osed of a base or a sequence of numb ers and of an alphab et of digits In this chapter we study the representation of natural numb ers of real numb ers and of complex numb ers We will present several generalizations of the usual notion of numeration system which lead to interesting problems Prop erties of words representing numb ers are well studied in numb er theory the concepts of p erio d digit frequency normality give way to imp ortant results Version April Numeration systems Cantor sets can b e dened by digital expansions In computer arithmetic it is recognized that algorithmic p ossibilities dep end on the representation of numb ers For instance addition of two integers repre sented in the usual binary system with digits and takes a time prop ortional to the size of the data But if these numb ers are represented with signed digits and then addition can b e realized in parallel in a time indep endent of the size of the data Since numb ers are words nite state automata are relevant to ols to describ e sets of numb er representations and also to characterize the complexity of arith metic op erations For instance addition in the usual binary system is a function computable by a nite automaton but multiplication is not Usual numeration systems such that the binary and the decimal ones are describ ed in the rst section In fact these systems are a particular case of all the various generalizations that will b e presented in the next sections The second section is devoted to the study of the socalled b etaexpansions intro duced by Renyi see Notes It consists in taking for base a real numb er When is actually an integer we get the standard representation When is not an integer a numb er may have several dierent representations A particular representation playing an imp ortant role is obtained by a greedy algorithm and is called the expansion it is the greatest in the lexicographic order The set of expansions of numb ers of is shiftinvariant and its closure called the shift is a symb olic dynamical system We give several results on these topics We do not cover the whole eld which is very lively and still growing It has interesting connections with numb er theory and symb olic dynamics In the third section we consider the representation of integers with resp ect to a sequence of integers which can b e seen as a generalization of the notion of base The most p opular example is the one of Fib onacci numb ers Every p ositive integer can b e represented in such a system with digits and This eld is closely related to the theory of b etaexpansions The last section is devoted to complex numb ers Representing complex num b ers as strings of digits allows to handle them without separating real and imag inary part We show that every complex numb er has a representation in base 2 n i where n is an integer with digits in f n g This numeration system enjoys prop erties similar to those of the standard ary system For notations concerning automata and words the reader may want to con sult Chapter Standard representation of numb ers In this section we will study standard numeration systems where the base is a natural numb er We will represent rst the natural numb ers and then the nonnegative real numb ers The notation intro duced in this section will b e used in the other sections Version April Standard representation of numb ers Representation of integers Let b e an integer called the base The usual ary representation of an integer N is a nite word d d over the digit alphab et A f g k 0 and such that k X i d N i i=0 Such a representation is unique with the condition that d This represen k tation is called normal and is denoted by hN i d d k 0 most signicant digit rst The set of all the representations of the p ositive integers is equal to A Let us consider the addition of two integers represented in the ary system Let d d and c c b e two ary representations of resp ectively N and k 0 k 0 M It is not a restriction to supp ose that the two representations have the same length since the shortest one can b e padded to the left by enough zero es Let us form a new word a a with a d c for i k Obviously k 0 i i i P k i a N M but the a s b elong to the set f g So the i i i=0 word a a has to b e transformed into an equivalent one ie having the k 0 same numerical value b elonging to A More generally let C b e a nite alphab et of integers which can b e p ositive or negative The numerical value in base on C is the function C Z P n i c The normalization on which maps a word w c c of C onto i n 0 i=0 C is the partial function C A C that maps a word w c c of C such that N w is nonnegative onto n 0 its normal representation hN i Our aim is to prove that the normalization is computable by a nite transducer We rst prove a lemma Lemma Let C b e an alphab et containing A There exists a right sub sequential transducer that maps a word w of C such that N w onto a word v b elonging to A and such that v N Proof Let m maxfjc aj j c C a Ag and let m First observe that for s Zand c C by the Euclidean division there exist unique a A and s Z such that s c s a Furthermore if jsj then js j jsj jc aj m Consider the subsequential nite transducer A over C A where A Q E is dened as follows The set Q fs Zj jsj g is the set of p ossible carries the set of edges is ca E fs s j s c s ag Version April Numeration systems / / ~ } ? Figure Right subsequential transducer realizing the conversion in base from f g onto f g Observe that the edges are lettertoletter The terminal function is dened by s hsi for s Q such that s P n i c Setting s there is a Now let w c c C and N i 0 n 0 i=0 unique path c a c a c a c a c a 2 2 n n 1 1 n1 n1 0 0 s s s s s n+1 2 n 1 0 n n+1 By construction N a a a s hence the word v 0 1 n n+1 s a a has the same numerical value in base as w n+1 n 0 Remark that v is equal to the normal representation of N if and only if it do es not b egin with zero es Example Figure gives the right subsequential transducer realizing the conversion in base from the alphab et f g onto f g The signed digit is denoted by The two following results are a direct consequence of Lemma Proposition In base for every alphab et C of p ositive integers con taining A the normalization restricted to the domain C n C is a right sub sequential function Removing the zero es at the b eginning of a word can b e realized by a left sequential transducer so the following prop erty holds true for any alphab et Proposition In base for every alphab et C containing A the nor malization on C is computable by a nite transducer Corollary In base addition and subtraction with p ossibly zero es ahead are right subsequential functions Proof Take in Lemma C f g for addition and C f g for subtraction Version April Standard representation of numb ers One proves easily that multiplication by a xed integer is a right subsequen tial function and that division by a xed integer is a left subsequential function see the Problems Section On the other hand the following result shows that the p ower of functions computable by nite transducers is quite reduced Proposition In base multiplication is not computable by a nite transducer Proof It is enough to show that the squaring function A A which 2 maps hN i onto hN i is not computable by a nite transducer Take for n n n 2n n+1 instance and consider h i Then h i 2 2 n1 n n Thus the image by of the set f j n g which is recognizable by n1 n a nite automaton is the set f j n g which is not recognizable thus cannot b e computed by a nite transducer Representation of real numb ers Let b e an integer and set A f g A ary representation of N a nonnegative real numb er x is an innite sequence x of A such that i ik X i x x i ik This representation is unique and said to b e normal if it do es not end by and if x when x It is traditionally denoted by k hxi x x x x k 0 1 2 i If x then there exists some i such that x We then put x x The set of ary expansions of numb ers is equal to 1 i+1 N N A n A n A the one of numb ers of is A n A The N set A is the set of all ary representations not necessarily normal The word x x is the integer part of x and the innite word x x