UFDC Home  Search all Groups  UF Institutional Repository  UF Institutional Repository  UF Theses & Dissertations  Vendor Digitized Files   Help 
Material Information
Subjects
Notes
Record Information

Full Text 
AN ISOMORPHISM THEOREM BETWEEN THE EXTENDED GENERALIZED BALANCED TERNARY NUMBERS AND THE PADIC INTEGERS By WEI Z. KITTO A DISSERTATION PRESENTED TO THE GRADUATE SCHOOL OF THE UNIVERSITY OF FLORIDA IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF DOCTOR OF PHILOSOPHY UNIVERSITY OF FLORIDA 1991 ACKNOWLEDGEMENTS I would like to thank my advisors, Dr. David C. Wilson and Dr. Gerhard X. Ritter, for introducing me to the exciting research area of image processing and for their insights into the process of researching. I would like to especially thank Dr. Wilson for his constant patience and encouragement.Without him this dissertation would not have been possible. I would like to thank the other members on my graduate committee, especially Dr. Andrew Vince, for all their help. Most of all, I thank my parents and my husband for their support during the years of my graduate study.  ii  TABLE OF CONTENTS ACKNOWLEDGEMENTS ...................... ii ABSTRACT . . . v CHAPTERS 1. INTRODUCTION ...... ....... .. ... 1 2. THE 7 adic INTEGERS AND THE RING EGBT2 ...... 8 2.1. Introduction .. .. .. .. 8 2.2. Inverse Limits and padic Integers . .... 11 2.3. The 2Dimensional Extended Generalized Balanced Ternary Numbers 15 2.4. The 2dimensional Generalized Balanced Ternary Numbers 23 2.5. 15adic Integers and the Ring EGBT3 . .. 24 3. THE p adic INTEGERS AND THE RING EGBTn 28 3.1. Introduction . . 28 3.2. The Carry Tables of EGBTn ............... 28 3.3. The ring EGBTn and qadic integers . ... 35 3.4. Examples .. . ... .. 39 4. ANOTHER APPROACH TO EGBTn AND THE q adic INTEGERS 41 4.1. Introduction . . .. .. 41 4.2. The Structure of Ra .. . . 44 5. THE MATRIX Aa ...................... ... 449 5.1. The Algebraic Properties of the Matrix A. . 50 6. IMAGE ALGEBRA IN HEXAGONAL LATTICE ... 57 6.1. A Brief Review of the Image Algebra . .... .57 6.2. Hexagonal Images and Polynomial Rings . .. 62 6.3. GBT2 Circulant Templates . .. 64 6.4. Another Representation of GBT2 Circulant Templates 68 7. FINAL REMARKS ....... ................ 74 REFERENCES . . . 75 BIOGRAPHICAL SKETCH ......... .. .......... 78 Abstract of Dissertation Presented to the Graduate School of the University of Florida in Partial Fulfillment of the Requirements for the Degree of Doctor of Philosophy AN ISOMORPHISM THEOREM BETWEEN THE EXTENDED GENERALIZED BALANCED TERNARY NUMBERS AND THE pADIC INTEGERS By Wei Zhang Kitto December 1991 Chairman: Dr. David C. Wilson Cochairman: Dr. Gerhard X. Ritter Major Department: Mathematics The Generalized Balanced Ternary Numbers (GBT) were developed by L. Gib son and D. Lucas (1982), who describe them as a hierarchical addressing system for Euclidean space that has a useful algebraic structure derived from a hierarchy of cells. At each level the cells are constructed of cells from the previous level ac cording to a rule of aggregation. For each dimension the most basic cell is different. In dimension two it is a hexagon and in dimension three a truncated octahedron. The basic cell in dimension n is an n + 1permutohedron. A finite sequence of the GBT digits 0, 1,..., 2n+ 2 can be used to identify any cell in ndimensional Eu clidean space. Under the addition and multiplication which are defined in a manner analogous to decimal arithmetic, the set of GBT addresses forms a commutative ring GBTn. The Extended Generalized Balanced Ternary ring EGBTn consists V  of all such infinite sequences. The primary goal of this research is to prove that if 2n+1 1 and n + 1 are relatively prime, then EGBTn is isomorphic as a ring to the (2n+1 1) adic integers. Extensions of this result are also given. The sec ondary goal of this research is to discuss template decomposition and inversion over hexagonally sampled images.  vi  CHAPTER 1 INTRODUCTION The 2dimensional Generalized Balanced Ternary Numbers (GBT2) were de veloped by L. Gibson and D. Lucas as a method to address a hexagonal tiling of Euclidean 2space [6,7,8,17,18]. They describe the hexagonal tiling as a hierarchy of cells, where at each level in the hierarchy new cells are constructed according to a rule of aggregation. The most basic cell in this tiling is a hexagon. A hexagon and its six neighbors form a cell called a first level aggregate. (The first level aggregates obviously also tile 2space and also have the uniform adjacency property that the hexagonal tiling possesses.) A first level aggregate and its six neighbors form a sec ond level aggregate. The hierarchy continues in the obvious way. Figures 1, 2, and 3 illustrate a first, second and third level aggregate, respectively. The GBT2 addressing method of the tiling above is based on the following scheme. A first level aggregate L1 is chosen and labeled with the integers 0 through 6 as shown in Figure 4. The six first level aggregates neighboring L1 are labeled with two digits as shown in Figure 5 and form a second level aggregate L2; each digit is some integer from 0 to 6. Reading from right to left, the first digit corresponds to where the labeled hexagon is in its first level aggregate L1 and the second digit corresponds to where L1 is in the second level aggregate L2. Figure 6 shows the labeling of the third level aggregate centered at L1. Continuing in this manner, every hexagon in the tiling corresponds to a unique finite sequence, an address, with entries integers from 0 to 6. 2 Most gridded representations used in image processing use rectangular pixels corresponding to tiling the plane with squares. Reasons for interest in a hexagonal grid in image processing are that natural scenes in low resolution images look more "natural" when presented in a hexagonal rather than square grid, hexagons can be grouped into aggregates and each pixel in a hexagonal grid has six equal neighbors, thus avoiding the 4neighbor/8neighbor problem. B. H. McCormick [21] in 1963 proposed the hexagonal array as a possible gridded representation for planar images. M. J. E. Golay [9] in 1969 applied the hexagonal array in a parallel computer and developed the hexagonal pattern trans formation. K. Preston [22] in 1971 developed "a special purpose computer system which uses hexagonal pattern transformations to perform picture processing at high speed." D. Lucas and L. Gibson [6,7,8,17,18] in 1982 exploited the geometric ad vantages of the hexagonal representation in their applications to automatic target recognition. N. Ahuja [1] in 1983 investigated polygonal decomposition for such hier archical image representations as triangular, square, and hexagonal. D. K. Scholten and S. G. Wilson [24] in 1983 showed that the hexagonal lattice outperforms the usual square lattice as a basis for performing the chain code quantization of line drawings. J. Serra [25] in 1988 discussed the properties of the hexagonal grid. The ring GBT2 can be thought of as the set of all finite sequences with entries from the set {0, 1,2, 3,4,5, 6}. One uses EGBT2, the 2dimensional Extended Gen eralized Balanced Ternary, to denote the set of all infinite sequences with entries from the set {0, 1,2,3,4,5, 6}. Motivation for this dissertation originated in a ques tion posed by D. Lucas to my cochairman G. X. Ritter. Lucas wondered if EGBT2 is isomorphic as a ring to the 7adic integers. (It will be shown in Chapter 2 that EGBT2 can be made into a ring.) The answer is that EGBT2 is isomorphic as a ring to the 7adic integers and this is shown in Chapter 2. 3 Lucas and Gibson [6] have defined an ndimensional Generalized Balanced Ternary (GBTn) ring for each n > 1 as the set of all finite sequences with en tries from the set {0,1,..., q 1}, where q = 2n+l 1. As an addressing method, the GBTn addresses an (n + 1)permutohedron tiling or packing of nspace. (As mentioned by Lucas [6], the permutohedrons in 2space are hexagons; in 3space they are truncated octahedrons.) The ndimensional Extended Generalized Bal anced Ternary Numbers EGBTn are the set of all infinite sequences with entries from the set {0,1,...,q 1}, where q = 2n+l 1. It is natural to ask for what values of n, if any, other than 2 is the EGBTn isomorphic as a ring to the qadic integers. In fact Lucas wrote to the author posing this question [16]. In Chapter 3 it is shown that for certain values of n EGBTn is isomorphic as a ring to the qadic integers. In Chapter 4 another proof is given of the main result in Chapter 3. The proof is due to A. Vince and is algebraic in nature. In Chapter 5, the algebraic properties of a special linear transformation which takes the hexagonal lattice associated with GBT2 into itself are investigated. In Chapter 6, the inversion and decomposition of the templates over the hexag onally sampled images are discussed. 4 Figure 1 : The First Level Aggregate. Figure 2: The Second Level Aggregate. 5 Figure 3 : The Third Level Aggregate. 6 Figure 4: The GBT Address of First Level Aggregate. Figure 5 : The GBT Address of Second Level Aggregate. 7 Figure 6 : The GBT product of 255 and 25 over the Third Level Aggregate. CHAPTER 2 THE 7 adic INTEGERS AND THE RING EGBT2 In this Chapter we will prove that the 7adic and 15adic integers are isomorphic to EGBT2 and EGBT3, respectively. These particular case studies will lead to a more general result in Chapter 3. 2.1. Introduction As stated in Chapter 1, one of the goals of this chapter is to prove the existence of a ring isomorphism from the 7adic integers onto the EGBT2, a ring defined by an unusual remainders and carries tables. Recall that the padic integers, Zp, can be thought of as the set of all series al + a2p + a3p2 ... + ... + + ..., 0 < ak < p where addition and multiplication are performed with the usual "carries rules" for arithmetic modulo p. Since the integer p is primarily a place holder, the elements of Zp can be thought of as the set of all infinite sequences a = (ak) = (al,a2,..., ak,...), where 0 < ak < p. In this setting, if a = (ak) and b = (bk) are elements of Zp, then the sum a + b = (sk), where al + bl = c2p + sl and ak + bk + ck = ck+1p + sk. Similarly, the product ab is defined by ab = (tk), where alb1 = d2p+t1 and albk + a2bk1 + ... + akbl + dk = dk+lp + tk. Here the variables ck and dk are the carries, and the variables sk and tk are the remainders. (These familiar carry and remainder rules are presented in Table 1.) Note that the carries are uniquely determined by the fact that each sk and tk is between 0 and p. Recall that the basic rules of arithmetic imply that 8 9 these addition and multiplication operations satisfy the associative, commutative, and distributive laws. Moreover, the sequence (0,0,...) is the additive zero element and the sequence (1,0,0,...) is the multiplicative identity. If p is a prime, then an element has a multiplicative inverse if and only if the first coordinate is nonzero. We use Z7 to denote this description of the padic integers for the case when p = 7. (The above discussion of the padic integers is essentially the same as the one given on page 43 of Kaplansky [11].) Let H denote the addressed hexagonal tiling of the plane described in Chapter 1. Guided by algebraic rules associated with H, L. Gibson and D. Lucas [6,7] defined new rules for addition and multiplication of the elements in EGBT2, the set of all infinite sequences a = (ak) = (al, a2, a3, ...) with integer entries 0 < ak < 6, that makes EGBT2 into a ring. If a and b are elements in EGBT2, then define a +b = (sk) by ak +bk +ck = ck+17+ sk, where the rules for determining the carries ck are given in Table 2, and; define ab = (tk) by albk + ... + akbl +dk = dk+l17 + tk, where the carries dk are given in Table 2. The rules for the remainders remain the same as in Z7 for both addition and multiplication. It is straightforward to show that under these operations EGBT2 is made into a ring. It is worth noting here that an element (ak) has a multiplicative inverse if and only if a1 # 0. Thus, it will be shown that EGBT2 with its very odd carry rules has the same ring structure as Z7 with its very familiar carries rules. It is well known that Z7 is isomorphic to the inverse limit of the system {Z/(7k); k = 1,2,...}. The fundamental idea of the proof that EGBT2 is iso morphic to Z7 is to show that if Ik is the ideal in EGBT2 defined by Ik = {(0,...) k+1,Xk+2,...): xi E Z/(7)}, then EGBT2 is isomorphic to the inverse k limit of the system {EGBT2/Ik; k = 1,2,... }. This is done in Section 2.3. The 10 ring GBT2 is the subring of EGBT2 consisting of all the finite sequences (ak) of EGBT2; that is, (ak) is an element of GBT2 if and only if ak 5 0 for a finite number of integers k. If I' is the ideal of GBT2 consisting of all sequences whose first k entries are zero, then, as is shown in Section 2.4, the inverse limit of the system {GBT2/I4; k = 1,2,... } is also isomorphic to Z7. Remember that GBT2 is an addressing method. Gibson and Lucas had good geometric reasons to define their carry table for addition in GBT2 as they did. Consider Figure 5 and recall the standard rules for the addition of two planar vectors. If the hexagon with address 0 is centered at the origin of the plane, then 1 + 2 = 3, 3 + 6 = 2 and 5 + 6 = 4 are all "vectors" inside this first level aggregate. But 3 + 2, for example, should equal 25 because of the way vectors add. As can be quickly checked, Table 2 shows that 3 + 2 has a remainder of 5 and a carry of 2, as desired. Consider Figure 6, a third level aggregate, and add 416 to 346. One adds 6 to 6 to get 65, then carries the 6 to the next column and adds to get 1 + 4 + 6 = 4, then carries the 0 to the next column to get 3 + 4 + 0 = 0. Thus, 416 + 346 = 45, which is "vectorially" correct. The rules of multiplication in GBT2 are best explained with an example. Mul tiply 255 by 25. 255 x 25: 255 x 25 344 (= 5x255) 433 (= 2 x 255) 604 (= the GBT sum) Note that there is no carrying during the two modulo 7 multiplications; the only carrying is done in the addition. Figure 6 illustrates this product. Consider Figure 4, and let the origin of the complex plane C be at the center of the hexagon 11  with address 0. Let the positive real axis pass through the center of the hexagon with address 1, and let the positive imaginary axis pass over the boundary common to the hexagons with addresses 4 and 5. Let C be coordinatized so that the centers of hexagons with addresses 1,5,4,6,2,3 are at the 6th roots of unity 1,e2Ri/6, e4ri/6, e67ri/6, e87i/6, e10i/6, respectively. Then the remainder table for multiplication given in Table 2 is just complex multiplication of these roots of unity. There are no carries since a product of two complex numbers each of modulus one is itself a complex number of modulus one. 2.2. Inverse Limits and padic Integers In this section, a number of definitions and propositions stating the elementary facts concerning inverse limits are presented. These facts will be needed in our proof that Z7 is isomorphic to EGBT2. DEFINITION 2.2.1. If Ai(i E I) is a system of groups, indexed by a directed set I, and for each pair i,j E I with i < j there is given a homomorphism 4 : Aj  Ai(i < j) such that (1) 0 is the identity map of Ai, for each i E I, and (2) for all i j < k, we have 0 o = , then the system A = {Ai(i E I); ;} is called an inverse system. The inverse limit of this system, A* = lim(Ai; O), is defined to consist of all vectors a = (..., a, ...) in the direct product A = IEIJ Ai for which 'aj = ai(i < j) holds. It is a routine exercise to show that A* is a subgroup of A. A similar definition can be given for the inverse limit of rings, where it will be the case that A* is a subring of A. 12 If Z* is defined to be the inverse limit of the inverse system {Z/(pk)(k E I); p)}, where 1kal = ak is defined as ak = al mod(pk),at E Z/(pt),ak E Z/(pk), then the ring Z* is isomorphic to Zp. In particular, Z* is isomorphic to Z7. The next Proposition makes this last statement more precise. PROPOSITION 2.2.2. If Z = limZ/(pk), then for each a = (al,a2,...,an,...) E Z we can associate a with a uniquely determined padic integer Sl +s2p+...+snpn + ..., where for all positive integers n, 0 < Sn < p and a1 = sl,a2 = s8 + s2p,..., an = s1 + s2p + ... + SnPl,.. PROOF: Let (pk) be the principal ideal of multiples of pk for k = 1,2... and any p in Z. Consider the sequence of the rings Z/(p), Z/(p2),..., Z/(pn),.... Define the map 1: Z/(p1) + Z/(pk) by the congruence relation: lka1 = ak means ak = al mod pk. We have #i is the identity map and bJt = O if i < j 5 k. Therefore, we have the inverse system {Z/(pk)(k E I); 01} and we call its inverse limit the ring of padic integers. An element of Zp is a sequence of residue classes (or costs) (al + (p), a2 + (p2), a3 + (p3),...) where the ai's are integers and for I > k, ak = at mod pk. We can represent this element by the sequence of integers (al, a2,...), where ak = at mod pk for k < I. Two such sequences (al,a2,...) and (bl, b2,...) represent the same element if and only if ak = bk mod pk, k = 1, 2,.... Addition and multiplication of such sequences is componentwise. If a E Z, we can write a = s1 + s2p + ... + Snpn1 where 0 < si < p. We can replace the representative (al1,a2,...) in which ak = al mod pk if k < 1 by a representative of the form (Si, 81 +2p, sl +s2P+s3p2, ...) where 0 < si < p. In this way we can associate with any element of Zp a uniquely determined padic number sl + s2p + s3p2 +..., where 0 < si < p. Addition and multiplication of these series corresponding to these 13 compositions in Zp are obtained by applying these compositions on the si and "car rying". [10] E PROPOSITION 2.2.3. If Cn =< Cn > is the cyclic group of order pn generated by Cn, and n+1 : Cn+l = Cn acts as n+n+ = Cn, then {Cn(n = 1,2,...); nm} is an inverse system such that C* = lim Cn is isomorphic to Zp as an Abelian group. PROOF: If On denotes the canonical map C* + Cn, and if we define on : Zp F+ Cn by on(l) = Cn (1 E Zp), then there is a unique a : Zp F C* such that Ono = an. Since no none zero element of Zp belongs to every Keran, Kerr = 0. If c = (c,...,I n,...) E C* with cn = kncn (kn E Z), then by the choice of n+1 we have kn+i = kn mod pn, and there is a padic integer r such that r = kn mod pn for every n. Thus a(r) = cn, and a must be epic [4]. O COROLLARY 2.2.4. If Cn is a ring with multiplicative identity In, which has the property that Cn is generated(under addition) by In and has order pn (n=,2,...), and 0n+1 : Cn+l + Cn is defined by Ofn+1n+1 = In (i.e. generator goes to generator), then On+1 is a ring homomorphism and {Cn(n = 1,2,...); nm} is an inverse system of rings such that C* = limCn is isomorphic to Zp. The Corollary 2.2.4 follows immediately from Proposition 2.2.3 since the mul tiplicative structure is essentially additive. We can also think of Zp as the completion of Z with respect to the absolute value JI p [2,13,26]. Here, InIp = pordp(n) where ordp(n) is the highest exponent to which p divides n. The idea is that two integers are close if their difference is 0 modulo a high power of p. The completion contains the subring of Q known as the pintegral numbers (rational numbers whose denominators are not divisible by p). 14 If m is a positive integer, m has a finite base p expansion m = mi + m2p + m3p2 + m4p3 + ... + mrpr1 where the mix's are integers between 0 and p1. This expansion (the padic expansion for m) will be denoted by its digits, and we will write m = mlm2m3...mr. It's easy to see that ordp(n) is the smallest integer k such that mk > 0. It follows that two integers are close if their padic expansions agree for many places. In particular, the sequence 1,11,111,1111,11111,... is Cauchy, and its limit in Zp can be calculated from the usual formula for the limit of a convergent geometric series 1111111 ... = 1 + p2 +p3 +p4 + 1 pl (Notice that the common ratio in this series is p, and Iplp = 1.) Since every p adic integer is the limit of some Cauchy sequence of integers, and since the padic expansions for these integers agree for arbitrarily long initial strings, we can think of a padic integer as an infinite padic expansion, denoted by an infinite string of digits 8182s3s845 *. 81 + 82p + 83p2 + s4p3 + p4 + .... where each si is an integer between 0 and p 1. As with all completions, I [p extends to a valuation on Zp, and its value can be calculated by the same formula 15  that defines it on Z (ordp(a) is the smallest integer k such that ak > 0). So, just as in Z, two padic integers are close if their representations agree for many digits (that is, if their difference is 0 modulo a high power of p). An element of Zp is a nonnegative integer if and only if its digits are eventually 0; an element of Zp is in Q precisely when its digits eventually repeat. Given a padic integer a, a fundamental system of neighborhoods for a is the sequence {a +pnZp: n = 0,1,2,3,...}. Indeed, given an integer n, Zp splits up into p" disjoint disks of diameter ,p namely the costs in Zp/pnZp. Two padic integers x and y are within r of each other if and only if they belong to the same disk. The metric d defined by I p satisfies a stronger condition than the triangle inequality; if a, b and c are in Zp, then d(a, b) < max{d(a, c), d(b, c)} (equality holds if d(a, c) and d(b, c) are unequal). This nonarchimedean property of d implies that every triangle is isosceles and that every point interior to a circle is its center. 2.3. The 2Dimensional Extended Generalized Balanced Ternary Numbers PROPOSITION 2.3.1. The subring Ik = {(0,...,0, xk+1,k+2,...) : i E Z/(7) for k all i > k +1} is an ideal in EGBT2 for all k = 1,2,.... PROOF: If y = (Y1,y2,...,yn,...) E EGBT2 and x = (0,...0,k+l, xk+2,...) E Ik, k then by the rules of multiplication and the carries rules given in Table 2 xy = 16 (0 ,.,Oxk+lYl, Xk+2Y1 + k+lY2 +ck+2, ...). Therefore, xy E Ik, yx E Ik and Ik is k an ideal in EGBT2. M PROPOSITION 2.3.2. For each positive integer k the cardinality of EGBT2/Ik is 7k. PROOF: The set EGBT2/Ik = {(al,a2,..., ak, ,...) + Ik : ai E Z/(7) for all i = 1,2,...}. Since there are 7 choices for each ai in each of the first k components, there are 7k choices for (al, a2,..., ak, 0,...) + Ik. Therefore, the cardinality of EGBT2/Ik is 7k. D Note: In the following lemmas and propositions an arbitrary value will be denoted by the symbol *. It may be the case that will represent one value on one side of an equation or expression and another on the other side. LEMMA 2.3.3. In the ring EGBT2, the following relations hold. 1. (1,*) + ... + (1,) = 1 2. (2,*) + ... + (2,*) = l 3. (3,*) +. + (3,,) = 4. (4, ( 4. (4, *) + ... + (4, *) = 1 l (0, 5, ), (X1,*), (0, 3,), (X1,*), (0,1,*), (x1, *), (0, 6, *), (Xl,*), ifl=7 if I < 7, where xi is a nonzero element in Z/(7) if =7 if I < 7, where x1 is a nonzero element in Z/(7) if I =7 if I < 7, where xl is a nonzero element in Z/(7) if I =7 if I < 7, where xl is a nonzero element in Z/(7)  17 5. ,)+ ...+(5,= (0,4,), if I =7 S(xl,*), if I < 7, where xi is a nonzero element in Z/(7) f (0,2,*), ifl=7 6. (6,) +... + (6,) = S(X1,*), if I <7, where x1 is a nonzero element in Z/(7) PROOF: It is a routine (but lengthy) computation to verify these identities. We found a simple Fortran program to be a convenient tool to check that these calcu lations are correct. O LEMMA 2.3.4. In the ring EGBT2, if I = 7n, then S(0, 0, 5,*), n (0, ., 0,4, *), n (00, 6, ), n (0,..., 0, 2,*), n (0, 3, ), (01, 1, *), if n = 1 mod(6) if n = 2 mod(6) if n = 3 mod(6) if n = 4 mod(6) if n = 5 mod(6) if n =0 mod(6) PROOF: Case 1. If n = 1 and I = 7, then by Lemma 2.3.3.1 (1, + ... + (1,) = (0, 5, ) 7 (1,*)+...+(1,*)= l  18 Case 2. If n = 2 and 1 = 72, then by Case 1 and Lemma 2.3.3.5 (1, ) + ... + (1, ) = (1, ) + ... + (1, ) + (1, ) + ... + (1, ), +... + (1, ) + ... +(1, ) 72 7 7 7 = (0, 5,*) + (0, 5, *) + ... + (0, 5,*) = (0, 0, 4, ) 7 Case 3. If n = 3 and I = 73, then by Case 2 and Lemma 2.3.3.4 (1, *) + ... + (1, ) = (1 )+...(1, *) + (1, *) + ... + (1, *)+... + (1, *) + ... + (1, ) 73 72 72 72 = (0, 0,4, *)+ (0,0,4,*)+... + (0, 0,4,) = (0, 0, 0,6,*) 7 Case 4. If n = 4 and I = 74, then by Case 3 and Lemma 2.3.3.6 (1, *) + + (1,*) = (1,*)+...(1, *)+(1,*) + ... + (1, +*) +... +(1, *) + ... + (1, *) 74 73 73 73 = (0, 0, 0, 6, ) + (0,0, 0, 6, *)+ ... + (0,0, 0, 6,) = (0,0,0,0,2,) 7  19  Case 5. If n = 5 and I = 75, then by Case 4 and Lemma 2.3.3.2 (1,*) +...+ (1,*) = (1,*) + ...(1,) + (1,) +...+ (1,+...+(1, *)+.. .+(1,*) 75 74 74 74 = (0,0,0,0,2, ) + (0,0,0,0,2, *) + ... + (0, 0,0, 0, 2,) = (0, 0,0, 0, 0, 3,*) 7 Case 6. If n = 6 and I = 76, then by Case 5 and Lemma 2.3.3.3 (1, ) + ... + (1, ) = (1,*) + ...(1,) (1,) + ...(1,) ...+(1, ) + ... +(1,) 76 (1)75 (2)75 (7)75 = (0,0, 0, 0, 0, 3,) +(0, 0, 0, 0, 0, 3, *)+... +(0, 0, 0,0, 0, 3,) (1) (2) (7) = (0,0,0,0,0,0, 1,*) By inductively repeating the six steps in the process indicated above, we have the conclusion of the Lemma. O COROLLARY 2.3.5. If = 7n for some integer n, then (1, *) + ... + (1,*) = (0,.0,n+l, *), I n where Xn+1 is some nonzero element in Z/(7). PROOF: From the six patterns in Lemma 2.3.4, we know that if I = 7n, then (1, *) + ... + (1,*) = (0, ...,0,n+1, *), where Xn+1 is different from zero. 0 7" n LEMMA 2.3.6. In the ring EGBT2, if I = 7", then (1,*) +... + (1, *) = ( Xn+1,*) I n where x,+1 is different from zero, and if l < 7n, then (1, *) + ... + (1, *) = (x1i,.., Xn, *), where xi is different from zero for some integer i between 1 and n. PROOF: The proof will be by induction on the integer n. 20  If n = 1, then by Lemma 2.3.3.1 (1,*) + ... + (1, *) (0,5, *) for I = 7 and 1 (1, ) + ... + (1, *) = (xl,*) for I < 7, where xl is different from zero. Therefore, 1 the inductive step is true for n = 1. Assume that the inductive step is true for all integers less than or equal n (i.e. I < 7n). If I = 7n+1, then by Corollary 2.3.5 (1,*) + ... (1, *) = (0,1 .0n+2, *), where Xn+2 is different from zero. I n+1 If I < 7n+1 (i.e. l = h7n + 1' where h < 7 and 1' < 7n), then by Corollary 2.3.5 we have (1, ) + ...(1, ) = (1,*) + ... + (1,) + (1,*) + ... + (1, * I h7" I' = (1, *)+... + (1, *)+... + (1, *)+ ... (1, *)+(1, )+ ... (1, ) 7" 7" 1' = (0,...,(hn+l) mod 7,*) + (l,*)+... + (1,*). n I, By the induction assumption we have (1, *) + ... + (1, *) = (x1, x2,...n, *), where I' some xi is different from zero if and only if 1' is different from zero. Thus, if 1' 5 0, then by induction xi 0 0 for some i < n. If 1' = 0, then by induction Xn+1 7 0. Since h # 0, (hxn+l) mod 7 5 0. Therefore, the induction is true for the integer n+1. 0 PROPOSITION 2.3.7. The ring EGBT2/Ik is generated (under addition) by the element ik = (1,0,0,...)+ Ik E EGBT2/Ik.  21  PROOF: By Lemma 2.3.6, we have: k + + 1k = (1, 0, 0, ...) + I + ... + (1, 0, 0,...)+ Ik = (1, 0, 0,...)+... + (1, 0, 0, ...) +Ik f (0,.,1rk+,*)4 Ik, if = 7k k S(Xl,...,k,*)+ Ik, if I < 7k, where xi # 0 for some i E {1,...k} Thus, 1k +... + 1k = k if and only if I = 7k. Therefore, the order of Ik is 7k 1 By Proposition 2.3.2, 1k is a generator of the ring EGBT2/Ik under addition. O PROPOSITION 2.3.8. If k1 : EGBT2/1 * EGBT2/Ik is defined by 1 = ik, then {EGBT2/Ik(k = 1,2,...); q} is an inverse system. If EGBT2* = lim(EGBT2/Ik; 1), then EGBT2* is isomorphic to Z7 and EGBT2* = { ( (x1,0,...)+ I1, (x1,2, 0,...) + 2, ...); zk E Z/(7) for k =1,2,... }. PROOF: By Proposition 2.3.2 we know that EGBT2/Ik has order 7k for all positive integers k. By Proposition 2.3.7 we know that EGBT2/Ik is generated (under ad dition) by 1k for all positive integers k. Thus, by Corollary 2.2.4, {EGBT2/Ik(k = 1, 2,...); 1 } is an inverse system, and EGBT2* = lim(EGBT2/Ik; /I) is isomor phic to Z7. Let S denote the set { ( (x1,0,...)+ I, (x1,x2,0,...) +12, ... ); k E Z/(7) for k = 1,2,... }. It is easy to see that S C EGBT2*. Let t = (G1,~ 2..., k, ...) E EGBT2*, where 'k = (xai, 2, ...k, 0,...) + Ik E Z/(Ik) (k=1,2,...). By Proposition 3.7, 5k = mik where m E Z/(7k). Therefore, kzI = mik = m((1,0,...)+ Ik) = (x1, 2,...,xk,*) + Ik = (l,x2,..., xk, 0,...) + Ik. This last equation shows that Xk = (x1, 2,...,k, O,...)+ Ik, and t = ( (xi,0,...) + II, (xi,x2,0,...) + 12, .. , (X1, X2, ..., k, 0, ...) + Ik, ... ). Therefore, EGBT2* C S and EGBT2* = S. O 22  PROPOSITION 2.3.9. The ring EGBT2 is isomorphic to EGBT2*. PROOF: Define the function r7: EGBT2 + EGBT2* by l(xl, x2,...) = ((xi,0,...) + II, (xl, X2, 0, ...) 2, ...) for all (l,x2,...) E EGBT2. We will now show that 7 is an isomorphism. (1) It is straightforward to show that 7 is well defined and surjective. (2) The function 7r is injective. Let x = (xl, X2, ...) and y = (Yi Y2, ...) be elements in EGBT2. If rq(x) = rl(y), then ( (xl,0,...) + II, (xl, X2, 0, ...)+12, ... ) = ( (yl, O, ...)+Ii, (Yi, Y2, 0, ...)+12, ...). This equation implies that (xl,0,...) + II = (i, 0,...) + II, (xl,2,0,...) + 12 = (Y, Y2, ..) + 2, ... (xl, x2,...xn,0,...) + In = (Yl, Y2,...Yn,0,...) + In, ..., which implies that (xi y1,0,...) E II, (xl yl,x2 2,0, ...) E 12, (x., ( Yl yl,2  Y2, ..., n yn, 0, ...) E In, ... for all integers n. Thus, we have zx = y1, x2 = Y2, **., xn = yn, ... for all integers n. Therefore, x = y and I7 is injective. (3) The function r7 is a ring homomorphism. If x = (xl, 2,...) and y = (Yl, Y2,...) are elements in EGBT2, then x + y = (s, s2, .., sn, ...), where xl + yl = c27+si, ..., Xn + Yn + n = Cn+17 + n, ... for all integers n, and xy = (tl,t2, ...tn, ...), where xlyl = c27 + tl, ..., Xlyn + X2Ynl + ... + nyil + cn = cn+17 + tn for all integers n. Thus, 7(x + y) = ( (s1,0,...) + I, ..., (sl, s2, ..., Sn, ...) + In, ... ), and 77(xy) = ( (tl, O,...) + I, ..., (tl, t2, ..., tn, O,...) + In, ... ). Since iq(x) + Y(y) = ( (xi,0,...) + II, ..., (xl,X2,...xn,0,...) + In, ... ) + ( (yi,0,...) + II, ..., (yi,y2, ...n, O,...) + In, ... ) = ( (xli,0,... ) + (yl,0,...) + II, ..., (x1,X2,...,axn,0,...)+(yl, 2, ... n, 0,...) + In, ... ) = ( (a1,0,...) + II, ... (sl,s2,...sn,.....) + In, ... ), we have y(x) + q(y) = 7r(x + y). Since q(x)7(y) = ( (x,0, ..) + I, .., (x, .. n, 0,...) + In, ... )( (yl, 0,...) + II, (1, ( ., Yn, 0,...) + In, ... ) = ( (x l, 0, ..)(y1, 0,...)II, ..., ( l, ...,X n, 0,...) (yI, ..., Yn, 0,...) + In, ... ) = 23  ( (t,, ...) + Ii, ..., (t, ..., n, 0,...) + In, ... ), we have r (x))(y) = rq(xy). Therefore, 7 is a ring homomorphism. Thus by (1),(2) and (3), the map 17 is a ring isomorphism from EGBT2 to EGBT2*. Ol THEOREM 2.3.10. EGBT2 is isomorphic to Z7. PROOF: By Proposition 2.3.9, EGBT2 EGBT2*. By Proposition 2.3.8, EGBT2*  Z7. Therefore, EGBT2 Z7. O 2.4. The 2dimensional Generalized Balanced Ternary Numbers The 2dimensional Generalized Balanced Ternary Numbers, denoted by GBT2, are the subring of EGBT2 consisting of all the finite sequences of EGBT2. For convenience of notion we will use G to denote GBT2. Lucas proved that G/I' is isomorphic to Z/(7k), where I' is the ideal of G consisting of all those sequences whose first k digits are zero. We will now show that the inverse limit of G/I' is isomorphic to EGBT2. PROPOSITION 2.4.1. For each positive integer k the cardinality of G/II is 7k. PROOF: The proof is the same as the proof of Proposition 2.3.2. [ PROPOSITION 2.4.2. The ring G/II is generated (under addition) by the element ik = (1,0,0,...) + IEk G/I'. PROOF: Since the results of Lemmas 2.3.3, 2.3.4, 2.3.5 and 2.3.6 are true in the subring G, we can follow the same proof given for Proposition 2.3.7. O THEOREM 2.4.3. If 01: G/I  G/II is defined by 0II = 1k, then {G/I'(k = 1,2,...); 1} is an inverse system. If G* = lim(G/I,; k1), then G* is isomorphic to both Z7 and EGBT2. 24  PROOF: By Proposition 2.4.1, G/Ik has order 7k for any positive integer k. By Proposition 2.4.2, G/Ik is generated by 1k for any positive integer k. Thus, by Corol lary 2.2.4, {G/I,(k = 1,2,...); k} is an inverse system, and G* = lim(G/I, 4) is isomorphic to Z7. By Theorem 2.3.10, Z7 is isomorphic to EGBT2. Therefore, G* is isomorphic to EGBT2. O 2.5. 15adic Integers and the Ring EGBT3 Guided by algebraic rules motivated by a truncated octahedral tiling in 3 dimensional space, L. Gibson and D. Lucas [6] defined rules for addition and mul tiplication for the 3dimensional Generalized Balanced Ternary Numbers. (For a diagram of the truncated octahedron see Figure (4,6,6) in Toth [27].) The carry rules have been modified to those presented in Table 3 while the remainder rules remain the same as the rules known for the ring of 15adic integers. The extended 3dimensional Generalized Balanced Ternary Numbers are the set of all sequences {(al, a2, a3,...) : 0 < ak < 15} with the same addition and multiplication as defined for the 3dimensional Generalized Balanced Ternary Numbers. It can be shown that the resulting structure forms a commutative ring with unity. We use EGBT3 to denote this ring. The following lemmas and proposition can be proved in a way sim ilar to the proofs in section 2.3. Therefore, we conclude that EGBT3 is isomorphic to the ring of 15adic integers. LEMMA 2.5.1. In the ring EGBT3, the following relations hold. f (0,2,*), if 1=15 1. ) + < ... + (1, *) elementt in S(xl,*), if I < 15, where xi is a nonzero element in Z/(15)  25  (0, 4) 2. (2,) + ... + (2,) (0 ), I t (xl,*), i (Xl,*), 3. (4, *)+...+ (4,*)= (0,,*), (a1,*), if I = 15 if I < 15, where xl is a nonzero element in Z/(15) if = 15 if I < 15, where x1 is a nonzero element in Z/(15) { (0,1,*), ifl=15 4. (8, *) + ...+ (8,)= f 15 I (xl,*), if I < 15, where xz is a nonzero element in Z/(15) LEMMA 2.5.2. In the ring EGBT3, if I = 15n, then (01 0,,2,*), ifn=l mod(4) n (0,... ,4,), ifn=2 mod (4) (1,*) + ...+ (1,*)= n S(0,...,0,8,*), ifn=3 mod (4) n (0 ,,,1,*), ifn=0 mod (4) COROLLARY 2.5.3. If = 15n for some integer n, then (1, *) + ...+ (1, *) = (0, 1+, *), 1 n where Xn+1 is some nonzero element in Z/(15). LEMMA 2.5.4. In the ring EGBT3, if = 15n, then (1, *)+ ... + (1,*) = (0,0n+l,*), 1 n where Xn+1 is different from zero, and if I < 15n, then (1, *) + ... + (1, *) = (xl, ...,n, *), I where xi is different from zero for some integer i between 1 and n. PROPOSITION 2.5.5. The ring EGBT3/Ik is generated (under addition) by the element 1k = (1,0,0,...) + Ik E EGBT3/Ik. 26 Table 1. Digitwise Operations on Z7 Remainder + 1 2 3 4 5 6 1 2 3 4 5 6 0 2 3 4 5 6 0 1 3 4 5 6 0 1 2 4 5 6 0 1 2 3 5 6 0 1 2 3 4 6 0 1 2 3 4 5 Remainder x 1 2 3 4 5 6 1 1 2 3 4 5 6 2 2 4 6 1 3 5 3 3 6 2 5 1 4 4 4 1 5 2 6 3 5 5 3 1 6 4 2 6 6 5 4 3 2 1 Carry + 1 2 3 4 5 6 1 0 0 0 0 0 1 2 0 0 0 0 1 1 3 0 0 0 1 1 1 4 0 0 1 1 1 1 5 0 1 1 1 1 1 6 1 1 1 1 1 1 Carry x 1 2 3 4 5 6 1 0 0 0 0 0 0 2 0 0 0 1 1 1 3 0 0 1 1 2 2 4 0 0 1 2 2 3 5 0 1 2 2 3 4 6 0 1 2 3 4 5 Table 2. Digitwise Operations on EGBT2 Remainder Carry + 1 2 3 4 5 6 T 2 3 4 5 6 0 2 3 4 5 6 0 1 3 4 5 6 0 1 2 4 5 6 0 1 2 3 5 6 0 1 2 3 4 6 0 1 2 3 4 5 Remainder x 1 2 3 4 5 6 T 1 2 3 4 5 6 2 2 4 6 1 3 5 3 3 6 2 5 1 4 4 4 1 5 2 6 3 5 5 3 1 6 4 2 6 6 5 4 3 2 1 + 1 2 3 4 5 6 1 1 0 3 0 1 0 2 0 2 2 0 0 6 3 3 2 3 0 0 0 4 0 0 0 4 5 4 5 1 0 0 5 5 0 6 0 6 0 4 0 6 Carry x 1 2 3 4 5 6 i 0 0 0 0 0 0 2 0 0 0 0 0 0 3 0 0 0 0 0 0 4 0 0 0 0 0 0 5 0 0 0 0 0 0 6 0 0 0 0 0 0 27 Table 3. The carry tables for the 3dimensional GBT. Carry + 1 2 3 4 5 6 7 8 9 A B C D E 1 1 0 3 0 1 0 7 0 1 0 3 0 1 0 2 0 2 2 0 0 6 6 0 0 2 2 0 0 E 3 3 2 3 0 7 7 6 0 3 2 3 0 0 0 4 0 0 0 4 4 4 4 0 0 0 0 C D C 5 1 0 7 4 5 4 7 0 1 0 0 D 0 6 0 6 6 4 4 6 6 0 0 E 0 C 0 E 7 7 6 7 4 7 6 7 0 0 0 0 0 0 0 8 0 0 0 0 0 0 0 8 9 8 B 8 9 8 9 1 0 3 0 1 0 0 9 9 B B 9 9 0 A 0 2 2 0 0 E 0 8 B A B 8 0 E B 3 2 3 0 0 0 0 B B B B 0 0 0 C 0 0 0 C D C 0 8 9 8 0 C D C D 1 0 0 D D 0 0 9 9 0 0 D D 0 E 0 E 0 C 0 E 0 8 0 E 0 C 0 E Carry x 1 2 3 4 5 6 7 8 9 A B C D E 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 T o o0oDooo 0ooooooo0o 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 0 0 6 0 0 C 0 0 3 0 0 9 0 0 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 0 0 0 0 5 0 0 0 0 A 0 0 0 0 6 0 0 C 0 0 9 0 0 6 0 0 3 0 0 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9 0 0 3 0 0 6 0 0 9 0 0 C 0 0 A 0 0 0 0 A 0 0 0 0 5 0 0 0 0 B 0 0 0 0 0 0 0 0 0 0 0 0 0 0 C 0 0 9 0 0 3 0 0 C 0 0 6 0 0 D 0 0 0 0 0 0 0 0 0 0 0 0 0 0 E 0 0 0 0 0 0 0 0 0 0 0 0 0 0 CHAPTER 3 THE p adic INTEGERS AND THE RING EGBTn 3.1. Introduction Recall that for integer n > 2 the GBTn is the set of all finite sequences (al, a2,..., ak), k = 1,2,..., with entries from the set of integers {0, 1,... ,2n+1  2}. The EGBTn is the set of all infinite sequences (al, a2,...) with entries from {0, 1,...,2n+1 2}. Since the integer 2n+l 1 may not necessarily be a prime number, from now on we will denote 2n+1 1 by q and will refer to the qadic integers. Lucas has defined an addition and multiplication upon GBTn that makes it into a commutative ring with unity [15]. These definitions will be presented in Section 3.2 once enough notation has been developed to express these definitions in a simple manner. Extending these operations in a natural way makes EGBTn also into a commutative ring with unity [15]. As previously stated, the main result of this chapter is that EGBTn is isomor phic as a ring to the qadic integers for certain values of n. 3.2. The Carry Tables of EGBTn DEFINITION 3.2.1. Let Sn denote the set of all sequences of the form Sn...s such that si equals 0 or 1 for all i = 0, 1,...n. The sequence of all ones is identified with 28  29  the sequence of all zeros. Let Bq be the function from the set Z/(q) to the set Sn defined by the rule that if x = sn2n + ... + s12 + so, then Bq(x) = Sn...So. It is clear that Bq is a bijective map and that the inverse of Bq, denoted by By1, is the map from Sn to Z/(q) defined by By1(sn...so)=sn2n+...+s12+so. DEFINITION 3.2.2. Let T be the function from Sn to Sn defined by T(sn...so) = Sn1_... n, where Sn...so is any element in Sn. The composition of T with itself i times is denoted by T'. For any Sn...so E Sn, Ti(sn...so) = si...SOsn...si+1. The inverse of T is denoted by T1, and is defined by T1(sn...so) = SOSn...s1. The function T is a twist(or shift) to the left of the binary sequences and the function T1 is a twist to the right. DEFINITION 3.2.3. Let E be the function from Sn xSn to Sn defined by E(rn...ro, Sn...so) = tn...to, where ti = (ri + si) mod 2 for i = 0, 1, ..., n. Note that E is the well known exclusive or function. Since the associative law holds for the binary operation E in Sn, it is understood that E(rn...ro, n..so, tn...to) = E(E(rn...ro, sn...so),tn...to). In the ndimensional algebraic structure GBT, the addition of any two digits x and y E Z/(q) yields a remainder r defined as the residue of x + y modulo q. Note that this is analogous to the usual rules for base 10 arithmetic. The carry C(x, y) defined by D. Lucas [6,7] is the following. DEFINITION 3.2.4. Let C denote the function from Z/(q) x Z/(q) to the set Z/(q) defined by C(x,y) = Bl1(T1(E(Bq(x),Bq(y),Bq(r)))), where r is the remainder of x + y mod q. Heuristically, the carry C(x, y) is defined by first converting x, y and r to binary sequences, second, adding using the exclusive or, third twisting the resulting 30  sequence one unit to the right, and, finally, converting the resulting binary sequence back to an element in Z/(q). It is easy to see that the associative law holds for the carry function C. There fore, it is understood that C(x, y, z) = C(C(x, y), z). One is now in the position to define the operations of addition and multiplica tion that make GBTn into a ring. Let a = (al,..., ak) and b = (bl,..., bl) be elements of GBTn where, without loss of generality, k < I. Define the "carries" cj in the following recursive manner: cl = 0 and cj = C(aj_1,bj_1) + C((aj1 + bjl) mod q, cj_), for j = 2,...,1. The sum a + b is now defined to be the finite sequence r = (rl,...,rm), where ri = (al + b) mod q and rj = (aj + bj + cj) mod q for j > 2. (Note that the author is assuming that aj = 0 for j = k + 1,..., 1.) To define the multiplication requires a little more preparation. Let y and z be elements from the set {0,1,..., q 1} with Bq(z) = Zn ... zo. Then, Bq(y)Bq(z) = 2nBq(y)zn + + 2Bq(y)zl + Bq(y)zo = = zn(2nBq(y)) + + zl(2Bq(y)) + zo(Bq(y)) = = znTn(Bq(y)) + .. + zlTl(Bq(y)) + zoBq(y). Set w0 = Bl(Bq(y)) = y and wi = B1(Ti(Bq(y))) for i = 1,...,n. With this notation in place, the following definition is made. DEFINITION 3.2.5. Let D denote the function from Z/(q) x Z/(q) into Z/(q) defined by D(y, z) = C(znWn, ZnlWn) + C((znwn + znlWn1) mod q, zn2Wn2)+ + C((znwn + + zlWl) mod q, zowo). As above, let a = (al,...,ak) and b = (bl,...,bl),k < 1, be from GBTn. Define the "carries" dj in the following recursive manner: dl = 0 and dj = 31  D(ai,bj_) + D(a2,bj2)+ ** + D(ajl,bl) + C(albjl,a2bj2)+C((albjl + a2bj2) mod q, a3bj3)+ +C((albjl+. a+aj2b2) mod q, ajlb)+ C((albjl+ S.* +ajlbl) mod q, dj1), for j = 2,..., m. The product ab is now defined as the fi nite sequence s = (sl,..., sm), where sl = (albl) mod q and sj = (albj +a2bj1 + ajba +dj) mod q for j > 2. Here one assumes aj = 0 for j = k + 1,..., m, and, bj = 0 for j = I +1,..., m. See Section 3.4 for worked examples of an addition and a multiplication. With this addition and multiplication, the GBTn is made into a commutative ring with unity [15]. (The multiplicative identity is the sequence a = (1).) These operations can be extended in the most natural way to make the EGBTn into a ring. That is, if a = (al, a2,...) and b = (bl, b2,...) are from EGBTn, then the entries for the sum a + b = (rl, r2,...) and the product ab = (1s, s2,...) are given by the same rules as in the GBTn. The EGBTn is also a commutative ring with unity a = (1, 0,0,...) [15]. Let x and y be be any two elements in Z/(q) and denote Bq(x) by xn...x0 and Bq(y) by Yn...yo. Let C(x,y) be the carry of x + y and denote Bq(C(x,y)) by Cn(x, y)...Co(x, y). LEMMA 3.2.6. If there is a carry of 1 from the ith position of the binary sum of Xn...xo and Yn...YO, then Ci(x,y) = 1; if there is a carry of 0, then Ci(x,y) = 0. PROOF: If we add xn...x0 and yn...yo, then for (i + l)th position we have ri+ = (xi+l + Yi+1 + Ci) mod 2, where ci is the carry from the ith position.(Notice that since we use modulo p = 2n+l 1, the carry from the nth position will go to the 0th position.) Let rn...ro denote Bq(r) and let zn...zo denote E(Bq(x),Bq(y), Bq(r)). If ci = 0, we have the following four cases: 32  case 1 case 2 case 3 case 4 i+1 = 0 0 1 1 Yi+l 0 1 0 1 ri+ = 0 1 1 0 i+1 = 0 0 0 0. If ci = 1, we have the following four cases: case 1 case 2 case 3 case 4 xi+1 = 0 0 1 1 Yi+ = 0 1 0 1 ri+1 = 1 0 0 1 zi+ = 1 1 1 1. From all the possible cases we conclude that the exclusive or zn...zi+l...zo has a 1 in the (i + 1)th position. (i.e. zi+l = 1, if and only if ci = 1.) Since Cn(x,y)...Co(x,y) = T1(zn...zo), we have Cn(x,y) = zo, Cnl(x,y) = n, ..., Ci(x,y) = zi+1, ..., Co(x,y) = zl. Therefore, Ci(x,y) = 1 if and only if ci = 1.1 LEiMh. 3.2.7. Let x and y be any two elements in Z/(q). Let Un...uo denote Ti(Bq(x)) and vn...vo denote Ti(Bq(y)). Let u denote B1l(un...uo) and v denote Bq1(vn...vo). If Cn(x,y)...Co(x,y) denotes Bq(C(x,y)) and Cn(u,v)...Co(u,v) de notes Bq(C(u,v)), then Ci(x,y) = Cn(u,v). PROOF: Since the carry Cn(x, y)...Co(x,y) of Bq(x) + Bq(y) is circular, the carry Cn(u, v)...Co(u, v) of Bq(u)+ Bq(v) is T'(Cn(x, y)...Co(x, y)). Therefore, Cn(u, v) = Ci(x, y).D LEMMA 3.2.8. If x is a fixed element in Z/(q) and Bq(C(x,y)) is denoted by Cn(x, y)...Co(x,y) for each element y in Z/(q), then there are x 1 digits y e Z/(q) such that Cn(x,y) = 1. 33  PROOF: Let x be a fixed element in Z/(q). If y E Z/(q) and y > q x, then x + y > q. Thus, Bq(x) + Bq(y) has a carry of 1 from the nth position. By Lemma 3.2.6, Cn(x,y) = 1. Since y is less than or equal q 1, there are x 1 choices for y such that Cn(x, y) = 1.0 LEMMA 3.2.9. If x is an element in Z/(q) and Bq(C(x, y)) is denoted by Cn(x, y)...Co(x, y) for each y in Z/(q), then there are u 1 digits y E Z/(q) such that Ci(x,y) = 1, where u = B1(Ti(Bq())). PROOF: Let un...uO equal Ti(Bq(x)) and vn...v equal Ti(Bq(y)). Let u denote Bl(un...ug) and v denote Bl1 (vn...vo). Let Cn(x,y)...Co(x,y) denote Bq(C(x,y)) and Cn(u,v)...Co(u,v) denote Bq(C(u,v)). By Lemma 3.2.7, Ci(x,y) = Cn(u,v). By Lemma 3.2.8, there are u 1 digits v E Z/(q) such that Cn(u, v) = 1. Therefore, there are u 1 digits y E Z/(q) such that Ci(x,y) = 1.l PROPOSITION 3.2.10. If x E Z/(q), then C(x,O) + C(x, 1) + ... + C(x,q 1) = [(n + 1)x2n] mod q. PROOF: Let tX = x, x1 = Bql(T(Bq(x))), x2 = Bq(T2(Bq())), ..., tn = Bql(Tn(Bq(x))). Notice that t1 = 2x mod q, E2 = 22x mod q, ..., Xn = 2nx mod q. Consider the binary sequences Bq(C(x, 0)), Bq(C(x, 1)),..., Bq(C(x, q 1)). By Lemma 3.2.9, there are to 1 digits j E Z/(q) such that Cn(x,j) = 1. There are a1 1 digits j E Z/(q) such that Cnl(x,j) = 1, ..., and there are Xn 1 digits j E Z/(q) such that Co(x,j) = 1, where j = 0, ...,q 1. Therefore, the sum of the carries C(x, 0), C(x, 1), ..., C(x,q 1) denoted by [~Y= C(x, y)] mod q can be calculated by the following sequence of qualities.  34  q1 [ C(x,)] modq [( 1)2 mod=1)2] modq +... + [(n 1)] mod q} mod q y=l = [(xo 1)2n + (li 1)2n1 + ... + (Xn1 1)2 + (xn 1)] mod q = [(x 1)2n + (2x 1)2n1 + ... + (2nlx 1)2 + (2n 1)] mod q = [(x2 +... + x2n) (2n + 2n1 +... + 2 + 1)] mod q n+l = [(n + l)x2" (2n+l 1)] mod q = [(n + 1)x2n] mod q.0 COROLLARY 3.2.11. If x = 1, then [Ei1 C(x,y)] mod q = [(n + 1)2n] mod q. PROPOSITION 3.2.12. If x is an element in Z/(q) relatively prime to q, let x,..., ) q denote the carry of the result of adding the element x to itself p times, then the carry ...( ) equals [x(n + 1)2n] mod q. q PROOF: Since F(( )=C(x, x) + C(2x mod q, x) + ... + C((q 1)x mod q, z), q and (mx) mod q 5 (lx) mod q if m 5 1, where 0 < 1,m < q, .(, ...,x) = q [C(x, 1)+C(x,2)+...+C(x,q1)] mod q = [i C(x, y)] mod q. By Proposition 3.2.10, (, = [x(n + 1)2"] mod q.0 q COROLLARY 3.2.13. If we add the digit one p times, then the carry F(Q., 1 equals [(n )2] mod q. [(n + 1)2n] mod q. 35  3.3. The ring EGBTn and qadic integers The ring EGBTn is the set {(al, a2, a3, ...) : 0 < ak < q} with addition and multiplication as defined in Section 3.2 [15]. It can be shown that the subset Ik of EGBTn defined by Ik={(0,..., ,k+l, Xk+2,...) : xi EZ/(q)} is an ideal of EGBTn. k PROPOSITION 3.3.1. For each positive integer k the cardinality of EGBTn/Ik is k q. PROOF: Let q = 2n+1 1. The set EGBTn = {(al,a2,...,ak,0...) +Ik : ai E Z/(q) for all i = 1,2,...}. Since there are q choices for each ai in each of the first k components, there are qk choices for (al, a2, ..., k, 0, ...) + Ik. Therefore, the cardinality of EGBTn/Ik is qk.[ Note: In the following lemmas and propositions an arbitrary value will be denoted by the symbol *. It may be the case that will represent one value on one side of an equation or expression and another on the other side. LEMMA 3.3.2. Let x be an element in Z/(q) which is relatively prime to q. If n+1 and q are relatively prime, then the following relation holds in the ring EGBTn. (0, x2, *), if I = q, where x2 = [x(n + 1)2n] mod q (x, )+ ...+ (x,*) = and gcd(x2, q) = 1; (x1, *), if I < p, where x1 is a nonzero element in Z/(q). In particular, S(0, x2, *), if I = q,where X2 = [(n + 1)2n] mod q (1, 1 (1, ), if I
