Minimal Digit Sets for Parallel Addition in Non-Standard Numeration Systems

Christiane Frougny LIAFA, CNRS UMR 7089 Case 7014 75205 Paris Cedex 13 France

     christiane.frougny@liafa.univ-paris-diderot.fr

Edita Pelantová and Milena Svobodová

Doppler Institute for Mathematical Physics and Applied Mathematics, and

Department of Mathematics Czech Technical University in Prague Trojanova 13 120 00 Praha 2 Czech Republic

             edita.pelantova@fjfi.cvut.cz
               milenasvobodova@volny.cz

Dedicated to Jean-Paul Allouche for his Sixtieth Birthday

Abstract

We study parallel algorithms for addition of numbers having finite representation in a positional numeration system defined by a base β in ℂ and a finite digit set A of contiguous integers containing 0. For a fixed base β, we focus on the question of the size of the alphabet that permits addition in constant time, independently of the length of representation of the summands. We produce lower bounds on the size of such an alphabet A. For several types of well-studied bases (negative integer, complex numbers −1 + ı, 2ı, and ı\sqrt{2}, quadratic Pisot units, and non-integer rational bases), we give explicit parallel algorithms performing addition in constant time. Moreover we show that digit sets used by these algorithms are the smallest possible.

1 Introduction

Since the beginnings of computer science, the fact that addition of two numbers has a worst-case linear-time complexity has been considered as an important drawback (see, in particular, the seminal paper of Burks, Goldstine and von Neumann [5]). In 1961, Avizienis gave a parallel algorithm to add two numbers: numbers are represented in base 10 with digits from the set {−6, −5, …, 5, 6}, which allows avoiding carry propagation [3]. Note that as early as 1840, Cauchy considered the representation of numbers in base 10 with digit set {−5, …, 5}, and remarked that carries have little propagation, due to the fact that positive and negative digits are mutually cancelling in the addition process [6].

Since the Avizienis paper, parallel addition has received much attention, because it forms the core of some fast multiplication and division algorithms. See, for instance, [8]. General conditions on the digit set allowing parallel addition in a positive integer base can be found in [23] and [19].

A positional numeration system is given by a base and a set of digits. The base β is a real or complex number such that |β| > 1, and the digit set A is a finite alphabet of real or complex digits. Non-standard numeration systems — where the base β is not a positive integer — have been extensively studied. When β is a real number > 1, this results in the well-known theory of the so-called β-expansions, due to Rényi [26] and Parry [24]. Special attention has been paid to complex bases, which allow the representation of any complex number by a single sequence (finite or infinite) of natural digits, without separating the real and the imaginary part. For instance, in the Penney numeration system every complex number can be expressed with base −1 + ı and digit set {0, 1}, [25]. The Knuth numeration system [18] is defined by the base 2ı with digit set {0, …, 3}. Another complex numeration system with digit set \{0, 1\} is based on ı\sqrt{2}; see [22].

To design a parallel algorithm for addition, some redundancy is necessary. In the Avizienis or Cauchy numeration systems, numbers may have several representations. In order to have parallel addition on a given digit set, there must be enough redundancy; see [21] and [19]. Both the Avizienis and the Cauchy digit sets allow parallel addition, but the Avizienis digit set is not minimal for parallel addition, as the Cauchy digit set is.

When studying the question on which digit sets it is possible to do addition in parallel for a given base β, we restrict ourselves to the case that the digit set is an alphabet of contiguous integer digits containing 0. This assumption already implies that the base β is an algebraic number. In a previous paper [12], we have shown that it is possible to find an alphabet of integer digits on which addition can be performed in parallel when β is an algebraic number with no algebraic conjugates of modulus 1. This digit set is not minimal in general, but the algorithm is quite simple: it is a kind of generalization of the Avizienis algorithm.

In this work we focus on the problem of finding an alphabet of digits allowing parallel addition that is minimal in size. The paper is organized as follows:

First, we give lower bounds on the cardinality of the minimal alphabet allowing parallel addition. When β is a real positive algebraic number, the bound is ⌈β⌉. When β is an algebraic integer with minimal polynomial f(X), the lower bound is equal to |f(1)|. This bound can be refined to |f(1)| + 2 when β is a real positive algebraic integer.

Addition on an alphabet A can be seen as a digit set conversion between alphabets A+A and A. In Section 4, we show that the problem of parallel addition on A can be reduced to problems of parallel digit set conversion between alphabets of cardinality smaller than A + A, cf. Proposition 18. We also give a method allowing us to link parallel addition on several alphabets of the same cardinality; more precisely, to transform an algorithm for parallel addition over one alphabet into algorithms performing parallel addition over other alphabets.

We then examine some popular numeration systems, and show that our bounds are attained. When β is an integer ⩾ 2, our bound becomes β + 1, and it is known that parallel addition is feasible on any alphabet of this size, which is minimal; see [23] for instance.

In the case that the base is a negative integer, β = −b, b ⩾ 2, the lower bound we obtain is once more equal to b + 1. We show that parallel addition is possible not only over the alphabet {0, …, b}, but in fact on any alphabet (of contiguous integers containing 0) of cardinality b + 1.

We then consider the more general case where the base has the form β = \sqrt[k]{b}, b ∈ ℤ, |b| ⩾ 2, and k ∈ ℕ, k ⩾ 1. We show that parallel addition is possible on every alphabet (of contiguous integers containing 0) of cardinality |b| + 1. If b ⩾ 2, then this cardinality is minimal (assuming that the expression of β = \sqrt[k]{b} is written in the minimal form). We use this result on several examples. The complex base β = −1 + ı satisfies β^{4} = −4, and the minimal alphabet for parallel addition must have 5 digits; in fact it can be any alphabet (of contiguous integers containing 0) of cardinality 5. Using similar reasoning for the Knuth numeration system, with base β = 2ı, parallel addition is doable on any alphabet (of contiguous integers containing 0) of cardinality 5. Analogously, in base β = ı\sqrt{2} parallel addition is doable on any alphabet (of contiguous integers containing 0) of cardinality 3.

We then consider β-expansions, where β is a quadratic Pisot unit, i.e., the largest zero of a polynomial of the form X^{2} − aX + 1, with a ∈ ℕ, a ⩾ 3, or of a polynomial of the form X^{2} − aX − 1, with a ∈ ℕ, a ⩾ 1. Such numeration systems have been extensively studied, since they enjoy many nice properties. In particular, by a greedy algorithm, any positive integer has a finite β-expansion, and it is known that the set of finite β-expansions is closed under addition [4]. In the case where β^{2} = aβ − 1, any positive real number has a β-expansion over the alphabet {0, …, a − 1}. We show that every alphabet (of contiguous integers containing 0) of cardinality a is sufficient to achieve parallel addition, so the lower bound |f(1)| + 2 is reached. In the case β^{2} = aβ + 1, any positive real number has a βexpansion over the alphabet {0, …, a}. We show that parallel addition is possible on any alphabet (of contiguous integers containing 0) of cardinality a + 2, which also achieves our lower bound |f(1)| + 2. In both cases, we provide explicitly the parallel algorithms.

One case where the base is an algebraic number but not an algebraic integer, is the rational number ±a/b, with a > b ⩾ 2. When β = a/b our bound is equal to ⌈a/b⌉, which is not good enough, since we show that the minimal alphabet has cardinality a + b. We prove that parallel addition is doable on {0, …, a + b − 1}, over the negated alphabet {−a − b + 1, …, 0}, and over any alphabet of cardinality a + b containing {−b, …, 0, …, b}.

In the negative case, β = −a/b, our results do not provide a lower bound. We show that the minimal alphabet has cardinality a + b, and any alphabet of this cardinality permits parallel addition.

The question of determining the size of the minimal alphabet for parallel addition in other numeration systems remains open.

2 Preliminaries

2.1 Numeration systems

For a detailed presentation of these topics, the reader may consult [13].

A positional numeration system (β, A) within the complex field ℂ is defined by a base β, which is a complex number such that |β| > 1, and a digit set A usually called the alphabet, which is a subset of ℂ. In what follows, A is finite and contains 0. If a complex number x can be expressed in the form ∑_{−∞⩽j⩽n} x_{j}β^{j} with coefficients x_{j} in A, we call the sequence (x_{j})_{−∞⩽j⩽n} a (β, A)-representation of x.

The problem of representability in a complex base is far from being completely characterized, see the survey [13]. However, when the base is a real number, the domain has been extensively studied. The most well-understood case is the one of representations of real numbers in a non-integer base β > 1, the so-called greedy expansions, introduced by Rényi [26]. Let T denote a transformation T : [0, 1) → [0, 1) given by the prescription

T (x) = βx − D(x), where D(x) = ⌊βx⌋.

Then

x = \frac{D(x)}{β} + \frac{T (x)}{β} for any x ∈ [0, 1).

Since T (x) ∈ [0, 1) as well, we can repeat this process infinitely many times, and thereby obtain a representation of x ∈ [0, 1) in the form

x = \frac{D(x)}{β} + \frac{D(T (x))}{β^{2}} + \frac{D(T^{2}(x))}{β^{3}} + \frac{D(T^{3}(x))}{β^{4}} + ⋯  (1)

This representation is called the Rényi expansion or greedy expansion of x and denoted ⟨x⟩_{β}. Since the coefficients are D(x) = ⌊βx⌋ and x ∈ [0, 1), the alphabet of the Rényi expansion is C_{β} = {0, 1, …, ⌈β⌉ − 1}. We will refer to this alphabet as the canonical alphabet for β > 1. A sequence (x_{j})_{j⩾1} such that ⟨x⟩_{β} = 0 • x_{1}x_{2}x_{3} ⋯ for some x ∈ [0, 1) is called β-admissible. If this sequence has only finitely many non-zero entries, we say that x has a finite Rényi expansion in the base β. Let us stress that not all sequences over the alphabet C_{β} are β-admissible. For a characterization of β-admissible sequences, see [24]. If the base β is not an integer, then some numbers have more than one (β, C_{β})-representation. It is important to mention that the Rényi expansion ⟨x⟩_{β} is lexicographically greatest among all (β, C_{β})-representations (x)_{β}.

In order to find a representation of a number x ⩾ 1, we can use the Rényi transformation T as well: first, we find a minimal k ∈ ℕ such that y = xβ^{−k} ∈ [0, 1). Next, we determine ⟨y⟩_{β} = 0 • y_{1}y_{2}y_{3} ⋯ and finally we put ⟨x⟩_{β} = y_{1}y_{2} ⋯ y_{k} • y_{k+1}y_{k+2} · · ·. If the base β is an integer, say β = 10, then the Rényi expansion is the usual decimal expansion (or β-ary expansion). The Rényi expansion of a negative real number x is defined to be −⟨|x|⟩_{β}, which means that one additional bit for the sign ± is necessary. In the Rényi expansion of numbers (analogously to the decimal expansion), the algorithms for addition and subtraction differ.

Since the Rényi transformation T uses the alphabet C_{β}, we can represent any positive real number x as an infinite word x_{n}x_{n−1} ⋯ x_{0} •x_{−1}x_{−2} ⋯ over this alphabet. The numbers represented by finite prefixes of this word tend to the number x.

Now let us consider an integer m satisfying m < 0 < m + ⌈β⌉ − 1, and an alphabet A_{m} = {m, …, 0, …, m + ⌈β⌉ − 1} of cardinality ⌈β⌉. Let

J_{m} = [\frac{m}{β−1}, \frac{m}{β−1} + 1).

We describe a transformation T_{m} : J_{m} → J_{m} which enables us to assign to any real number x a (β, A_{m})-representation. Put

T_{m}(x) = βx − D_{m}(x), where D_{m}(x) = ⌊βx − \frac{m}{β−1}⌋.

Since T_{m}(x) − \frac{m}{β−1} = βx − \frac{m}{β−1} − ⌊βx − \frac{m}{β−1}⌋ ∈ [0, 1), we have T_{m}(x) ∈ [\frac{m}{β−1}, \frac{m}{β−1} + 1) for any x in J_{m}, and therefore T_{m} maps the interval J_{m} into J_{m}. Moreover, any x from the interval J_{m} satisfies

βx − \frac{m}{β−1} < β(\frac{m}{β−1} + 1) − \frac{m}{β−1} = m + β and βx − \frac{m}{β−1} ⩾ \frac{mβ}{β−1} − \frac{m}{β−1} = m,

and thus m ⩽ ⌊βx − \frac{m}{β−1}⌋ ⩽ m + ⌈β⌉ − 1, i.e., the digit D_{m}(x) belongs to A_{m}. Therefore, each x in J_{m} can be written as in (1). Since for any x in ℝ there exists a power n in ℕ such that \frac{x}{β^{n}} is in J_{m}, all real numbers have a (β, A_{m})-representation. This already implies that the set of numbers having finite (β, A_{m})-representation is dense in ℝ.

Let us mention that, if we consider an alphabet A such that A = −A, we can exploit instead of T_{m} a symmetrized version of the Rényi algorithm introduced by Akiyama and Scheicher in [2]. They use the transformation S : [−\frac{1}{2}, \frac{1}{2}) → [−\frac{1}{2}, \frac{1}{2}) given by the prescription

S(x) = βx − D(x), where D(x) = ⌊βx + \frac{1}{2}⌋.

This expansion has again the form (1), but the digit set is changed into

A = ℤ ∩ (−\frac{β+1}{2}, \frac{β+1}{2}).

Since the alphabet is symmetrical around 0, it has an odd number of elements. In general, it can be bigger than the canonical alphabet C_{β}, but not too much, because ⌈β⌉ + 1 ⩾ #A ⩾ ⌈β⌉ = #C_{β}. On the other hand, the Akiyama-Scheicher representation has an important advantage: the representation of −x can be obtained from the representation of x by replacing the digit a by the digit −a. Therefore, an algorithm for subtraction can exploit an algorithm for addition, and clearly, no additional bit for indicating the sign is needed.

A more general construction including our T_{m} is discussed in [17].

In the case where the base β is a rational number of the form a/b, with a > b ⩾ 1, a and b co-prime, the greedy algorithm gives a representation over the alphabet {0, …, ⌈a/b⌉ − 1}, but another algorithm — a modification of the Euclidean division algorithm — gives any natural integer a unique and finite expansion over the alphabet {0, …, a − 1}; see [11] and [1]. For instance, if β = 3/2, the expansion of the number 4 is 21.

Furthermore, negative bases have also been investigated. As early as 1885, a negative integer base was considered by Grünwald [14]. When β is a real number, (−β)-expansions were introduced in [16]. Negative rational bases of the form β = −a/b, with a > b ⩾ 1, and a and b co-prime, were studied in [11]. Any integer can be given a unique and finite expansion over the alphabet {0, …, a − 1} by a modification of the Euclidean division algorithm, so this system is a canonical numeration system; see [13] for properties and results.

2.2 Parallel addition

We consider addition and subtraction on the set of real or complex numbers from an algorithmic point of view. In analogy with the classical algorithms for arithmetical operations, we work only on the set of numbers with finite representations, i.e., on the set

Fin_{A}(β) = { ∑_{j∈I} x_{j}β^{j} | I ⊂ ℤ, I finite, x_{j} ∈ A}.  (2)

Such a finite sequence (x_{j})_{j∈I} of elements of A is identified with a bi-infinite string (x_{j})_{j∈ℤ} in A^{ℤ}, where only a finite number of digits x_{j} have non-zero values. The index zero in bi-infinite strings is indicated by •. So if x belongs to Fin_{A}(β), we write

(x)_{β,A} = ^{ω}0x_{n}x_{n−1} ⋯ x_{1}x_{0} • x_{−1}x_{−2} ⋯ x_{−s}0^{ω}

with x = ∑_{j=−s}^{n} x_{j}β^{j}.

Let x, y ∈ Fin_{A}(β), with (y)_{β,A} = ^{ω}0y_{n}y_{n−1} ⋯ y_{1}y_{0} • y_{−1}y_{−2} ⋯ y_{−s}0^{ω}. Adding x and y means rewriting the (β, A + A)-representation

ω0(x_{n} + y_{n}) ⋯ (x_{1} + y_{1})(x_{0} + y_{0}) • (x_{−1} + y_{−1}) ⋯ (x_{−s} + y_{−s})0^{ω}

of the number x + y into a (β, A)-representation of x + y.

A necessary condition for existence of an algorithm rewriting finite (β, A+A)-representations into finite (β, A)-representations is that the set Fin_{A}(β) be closed under addition, i.e.,

Fin_{A}(β) + Fin_{A}(β) ⊂ Fin_{A}(β).  (3)

Let us point out that we are not specifically discussing here whether or not the inclusion (3) is satisfied by a numeration system (β, A); however, the inclusion is satisfied for the numeration systems studied in this paper.

As we have already mentioned, we are interested in parallel algorithms for addition. Let us mathematically formalize parallelism. First, we recall the notion of a local function, which comes from symbolic dynamics (see [20]) and is often called a sliding block code.

Definition 1. A function φ : A^{ℤ} → B^{ℤ} is said to be p-local if there exist two non-negative integers r and t satisfying p = r + t + 1, and a function Φ : A^{p} → B such that, for any u = (u_{j})_{j∈ℤ} ∈ A^{ℤ} and its image v = φ(u) = (v_{j})_{j∈ℤ} ∈ B^{ℤ}, we have v_{j} = Φ(u_{j+t} ⋯ u_{j−r}) ^{1} for every j in ℤ.

1Careful! Indices of ℤ are decreasing from left to right.

This means that the image of u by φ is obtained through a sliding window of length p. The parameter r is called the memory and the parameter t is called the anticipation of the function φ. We also write that φ is (t, r)-local. Such functions, restricted to finite sequences, are computable by a parallel algorithm in constant time.

Definition 2. Given a base β with |β| > 1 and two alphabets A and B containing 0, a digit set conversion in base β from A to B is a function φ : A^{ℤ} → B^{ℤ} such that

1. for any u = (u_{j})_{j∈ℤ} ∈ A^{ℤ} with a finite number of non-zero digits, v = (v_{j})_{j∈ℤ} = φ(u) ∈ B^{ℤ} has only a finite number of non-zero digits, and

2. ∑_{j∈ℤ} v_{j}β^{j} = ∑_{j∈ℤ} u_{j}β^{j}.

Such a conversion is said to be computable in parallel if it is a p-local function for some p ∈ ℕ.

Thus, addition in Fin_{A}(β) is computable in parallel if there exists a digit set conversion in base β from A+A to A which is computable in parallel. We are interested in the following question:

Given a base β ∈ ℂ, which alphabet A permits parallel addition in Fin_{A}(β) ?

If we restrict ourselves to integer alphabets A ⊂ ℤ, then the necessary condition (3) implies that β is an algebraic number, i.e., β is a zero of a non-zero polynomial with integer coefficients. In [12], we have studied a more basic question: For which algebraic number β does there exist at least one alphabet allowing parallel addition? We have proved the following statement.

Theorem 3. Let β be an algebraic number such that |β| > 1 and all its conjugates in modulus differ from 1. Then there exists an alphabet A ⊂ ℤ such that addition on Fin_{A}(β) can be performed in parallel.

The proof of this theorem is constructive. The alphabet obtained is a symmetric set of contiguous integers A = {−a, −a + 1, …, −1, 0, 1, …, a − 1, a} and, in general, a need not be minimal.

In this article, we address the question of minimality of the alphabet allowing parallel addition. In the whole text we assume

• the base β is an algebraic number such that |β| > 1;

• the alphabet A is a finite set of consecutive integers containing 0 and 1, i.e., A is of the form

A = {m, m + 1, …, 0, 1, … M − 1, M} , where m ⩽ 0 < M and m, M ∈ ℤ. (4)

Remark 4. Despite the usual requirement that a base β has modulus larger than one, we can define the set Fin_{A}(β) even in the case where |β| < 1 and ask whether addition in this set can be performed in parallel. Since for any β ∈ ℂ \ {0}, we have

Fin_{A}(β) = Fin_{A}(\frac{1}{β}),

a p-local function performing parallel addition can be found either for both the sets Fin_{A}(β) and Fin_{A}(\frac{1}{β}), or for neither of them. Remark 5. Let β and γ be two different algebraic numbers with the same minimal polynomial and σ : ℚ(β) ↦ ℚ(γ) be the isomorphism induced by σ(β) = γ. If A ⊂ ℤ, then

Fin_{A}(γ) = {σ(x) | x ∈ Fin_{A}(β)}

and, for any integers a_{j}, b_{j}, c_{j}, and for any finite coefficient sets I_{1}, I_{2} ⊂ ℤ,

∑_{j∈I_{1}}(a_{j} + b_{j})β^{j} = ∑_{j∈I_{2}} c_{j}β^{j} ⟺ ∑_{j∈I_{1}}(a_{j} + b_{j})γ^{j} = ∑_{j∈I_{2}} c_{j}γ^{j}.

Therefore, a p-local function performing parallel addition exists either simultaneously for both the sets Fin_{A}(γ) and Fin_{A}(β), or for neither of them.

3 Lower bounds on the cardinality of an alphabet allowing parallelism

In this section, we give two lower bounds on the cardinality of alphabet A allowing parallel addition in the set Fin_{A}(β).

Theorem 6. Let β be a positive real algebraic number, β > 1, and let A be a finite set of contiguous integers containing 0 and 1. If addition in Fin_{A}(β) can be performed in parallel, then #A ⩾ ⌈β⌉.

Proof. For any alphabet B, denote

Z_{B} = Z_{B}(β) := {∑_{j=0}^{n} s_{j}β^{j} | s_{j} ∈ B, n ∈ ℕ}.

At first we recall a result from [9]. For an integer q > 0, let Q_{q} = {0, 1, …, q}. Erdős and Komornik proved the following: If β ⩽ q + 1, then any closed interval [α, α + 1] with α > 0 contains at least one point from Z_{Q_{q}}, i.e., [α, α + 1] ∩ Z_{Q_{q}} ≠ ∅ for any α > 0.

We use the notation m = min A ⩽ 0 and M = max A ⩾ 1. Suppose, to get a contradiction, that #A = M − m + 1 < β. In particular, this assumption implies that, for any n ∈ ℕ

x_{n} := β^{n} + ∑_{j=0}^{n−1} mβ^{j} > 0 and y_{n} := ∑_{j=0}^{n} Mβ^{j} < β^{n+1}.  (5)

We can see that, for any n ∈ ℕ, y_{n} > x_{n}, and, additionally, since x_{n}−y_{n−1} = β^{n}−∑_{j=0}^{n−1}(M − m)β^{j} > \frac{β^{n}(β−M+m−1)}{β−1} > 0, we have

x_{1} < y_{1} < x_{2} < y_{2} < x_{3} < y_{3} < x_{4} < y_{4} < ⋯

Consider an element x from Z_{A} = Z_{A}(β). It can be written in the form x = ∑_{j=0}^{ℓ} a_{j}β^{j}, with a_{j} ∈ A, where a_{ℓ} ≠ 0. If the leading coefficient a_{ℓ} ⩽ −1, then x = ∑_{j=0}^{ℓ} a_{j}β^{j} ⩽ −β^{ℓ} + ∑_{j=0}^{ℓ−1} Mβ^{j}, and, according to (5), the number x is negative. It means that any positive element x ∈ Z_{A} can be written as x = ∑_{j=0}^{ℓ} a_{j}β^{j}, where a_{ℓ} ⩾ 1, and, clearly,

x_{ℓ} ⩽ x ⩽ y_{ℓ}.

Thus, the intersection of Z_{A} with the open interval (y_{n−1}, x_{n}) is empty for any n ∈ ℕ, or, equivalently, y_{n−1} and x_{n} are the closest neighbors in Z_{A}. The gap between them is x_{n}−y_{n−1}, and it tends to infinity with increasing n.

The existence of a p-local function performing addition in Fin_{A}(β) implies that, for any x, y ∈ Z_{A}, the sum x + y has a (β, A)-representation x + y = ∑_{j=−p}^{n+p} z_{j}β^{j} with z_{j} ∈ A, or, equivalently,

Z_{A} + Z_{A} ⊂ \frac{1}{β^{p}} Z_{A}.

As 1 ∈ A, for any positive integer q we obtain

Z_{Q_{q}} ⊂ \underbrace{Z_{A} + ⋯ + Z_{A}}_{q times} ⊂ \frac{1}{β^{qp}} Z_{A}.  (6)

Let us fix q = ⌊β⌋. Since q + 1 ⩾ β, then, according to the result of Erdős and Komornik, the gaps between two consecutive elements in the set Z_{Q_{q}} are at most 1. The set \frac{1}{β^{qp}} Z_{A} is just a scaled copy of Z_{A} and thus \frac{1}{β^{qp}} Z_{A} has arbitrary large gaps. This contradicts the inclusion (6).

Remark 7. The inequality #A ⩾ ⌈β⌉ guarantees that Fin_{A}(β) is dense in ℝ^{+} or in ℝ, depending on the fact whether the digits of A are non-negative. This property is very important, as it enables us to approximate each positive real number (resp., real number) by an element from Fin_{A}(β) with arbitrary accuracy.

Using Remarks 4 and 5 we can weaken the assumptions of Theorem 6.

Corollary 8. Let β be an algebraic number with at least one positive real conjugate (possibly β itself) and let A be an alphabet of contiguous integers containing 0 and 1. If addition in Fin_{A}(β) can be performed in parallel, then

#A ⩾ max{⌈γ⌉ | γ or γ^{−1} is a positive conjugate of β}.

When β is an algebraic integer, and not only an algebraic number, we can obtain another lower bound on the cardinality of alphabet for parallelism:

Theorem 9. Let β, with |β| > 1, be an algebraic integer of degree d with minimal polynomial f(X) = X^{d} − a_{d−1}X^{d−1} − a_{d−2}X^{d−2} − ⋯ − a_{1}X − a_{0}. Let A be an alphabet of contiguous integers containing 0 and 1. If addition in Fin_{A}(β) is computable in parallel, then #A ⩾ |f(1)|. If, moreover, β is a positive real number, β > 1, then #A ⩾ |f(1)| + 2.

First, we prove several auxiliary statements with fewer restrictive assumptions on the alphabet than required in Theorem 9.

In order to emphasize that the used alphabet is not necessarily in the form (4), we will denote it by D. We suppose that addition in Fin_{D}(β) is performable in parallel, which means that there exists a p-local function φ : (D + D)^{ℤ} → D^{ℤ} with memory r and anticipation t, and p = r + t + 1, defined by the function Φ : (D + D)^{p} → D, as introduced in Definitions 1 and 2. We work in the set ℤ[β] = {b_{0} + b_{1}β + b_{2}β^{2} + ⋯ + b_{d−1}β^{d−1} | b_{j} ∈ ℤ}. Since β is an algebraic integer, the set ℤ[β] is a ring.

Let us point out that in the following claim, we do not assume that the digits are integers:

Claim 10. Let β be an algebraic number, and let D be a finite set such that 0 ∈ D ⊂ ℤ[β]. Then, for any x ∈ D + D, the number Φ(x^{p}) − x belongs to the set (β − 1)ℤ[β].

Proof. Let us write y := Φ(x^{p}). For any n ∈ ℕ, we denote by S_{n} the number represented by the string

ω0 \underbrace{x ⋯ x}_{t times} \underbrace{xxx ⋯ xxx}_{n times} • \underbrace{x ⋯ x}_{r times} 0^{ω}.  (7)

After the conversion by the function Φ, we obtain the second representation of the number S_{n}:

ω0w_{p−1}w_{p−2} ⋯ w_{2}w_{1} \underbrace{yyy ⋯ yyy}_{n times} • w̃_{1}w̃_{2} ⋯ w̃_{p−1}0^{ω},  (8)

where

w_{j} = Φ(0^{j}x^{p−j}) ∈ D and w̃_{j} = Φ(x^{p−j}0^{j}) ∈ D for j = 1, 2, …, p − 1 . (9)

Put W := w_{p−1}β^{p−2} + ⋯ + w_{2}β + w_{1} and W̃ := w̃_{1}β^{p−2} + ⋯ + w̃_{p−2}β + w̃_{p−1}. Let us stress that neither W nor W̃ depend on n. Comparing the two representations (7) and (8) of the number S_{n}, we obtain

S_{n} = x ∑_{j=−r}^{n+t−1} β^{j} = W β^{n} + y ∑_{j=0}^{n−1} β^{j} + W̃β^{−p+1},

i.e.,

x\frac{β^{n+t} − 1}{β − 1} + x ∑_{j=−r}^{−1} β^{j} = W β^{n} + y \frac{β^{n} − 1}{β − 1} + W̃β^{−p+1} for any n ∈ ℕ.  (10)

Subtracting these equalities (10) for n = ℓ + 1 and n = ℓ, we get

xβ^{ℓ+t} = W β^{ℓ+1} − W β^{ℓ} + yβ^{ℓ} ⟹ x(β^{t} − 1) = W (β − 1) + y − x.  (11)

Since β^{t} − 1 = (β − 1)(β^{t−1} + ⋯ + β + 1), the number y − x can be expressed in the form (β − 1) ∑_{k=0}^{m} w′_{k}β^{k} with w′_{k} ∈ ℤ.

A technical detail concerning the value of W in the course of the previous proof (Equation (11)) will be important in the sequel as well. Let us point out this detail.

Corollary 11. Let β be an algebraic number, E ⊂ ℤ[β] and D ⊂ ℤ[β] be two alphabets containing 0. Suppose that there exists a p-local digit set conversion ξ : E^{ℤ} → D^{ℤ} defined by the function Ξ : E^{p} → D, p = r + t + 1. Then

∑_{j=1}^{p−1} Ξ(0^{j}x^{p−j})β^{j−1} = \frac{xβ^{t} − Ξ(x^{p})}{β − 1} for any x ∈ E .

Claim 12. Let β be an algebraic integer and let D be a finite set of (not necessarily contiguous) integers containing 0. Then

Φ(x^{p}) ≡ x mod |f(1)| for any x ∈ D + D.

Proof. According to Claim 10, the number β − 1 divides the integer Φ(x^{p}) − x = y − x in the ring ℤ[β], i.e.,

y − x = (β − 1)(c_{0} + c_{1}β + ⋯ + c_{d−1}β^{d−1}) for some c_{0}, c_{1}, …, c_{d−1} ∈ ℤ.

As β^{d} = a_{d−1}β^{d−1} + a_{d−2}β^{d−2} + ⋯ + a_{1}β + a_{0} and powers β^{0}, β^{1}, β^{2}, …, β^{d−1} are linearly independent over ℚ, we deduce the following:

y − x = −c_{0} + c_{d−1}a_{0}
0 = c_{0} − c_{1} + c_{d−1}a_{1}
0 = c_{1} − c_{2} + c_{d−1}a_{2}
⋮
0 = c_{d−3} − c_{d−2} + c_{d−1}a_{d−2}
0 = c_{d−2} − c_{d−1} + c_{d−1}a_{d−1}

Summing up all these equations, we obtain

y − x = −c_{d−1}(1 − a_{0} − a_{1} ⋯ − a_{d−1}) = −c_{d−1}f(1),

which implies Claim 12.

The following claim again permits a more general alphabet, but the base must be a positive real number.

Claim 13. Let β be a real algebraic number, β > 1, and let D be a finite set, such that 0 ∈ D ⊂ ℤ[β]. Write λ = min D and Λ = max D. Then Φ(Λ^{p}) ≠ λ and Φ(λ^{p}) ≠ Λ.

Proof. First, let us assume that Φ(Λ^{p}) = λ. Put x = Λ and y = λ into (10) and use (11) for determining W. We get

Λ\frac{β^{n+t} − 1}{β − 1} + Λ ∑_{j=−r}^{−1} β^{j} = (Λ\frac{β^{t}}{β − 1} − λ\frac{1}{β − 1}) β^{n} + λ\frac{β^{n} − 1}{β − 1} + W̃β^{−p+1}.

After cancellation of the same terms on both sides, we have to realize that \frac{1}{β−1} = ∑_{j=1}^{∞} \frac{1}{β^{j}}, all digits in W̃ are at least λ, and our base β > 1. Therefore, we obtain

−Λ ∑_{j=r+1}^{∞} \frac{1}{β^{j}} = −λ ∑_{j=1}^{∞} \frac{1}{β^{j}} + ∑_{j=1}^{p−1} \frac{w̃_{j}}{β^{j}} ⩾ −λ ∑_{j=p}^{∞} \frac{1}{β^{j}} ,

which yields a contradiction, as λ < Λ. The proof of Φ(λ^{p}) ≠ Λ is analogous.

Claim 14. Let β be a real algebraic number, β > 1, and let D be a finite set, such that 0 ∈ D ⊂ ℤ[β]. Write λ = min D and Λ = max D. Then Φ(Λ^{p}) ≠ Λ. If, moreover, λ ≠ 0 then Φ(λ^{p}) ≠ λ.

Proof. We prove the claim by contradiction. Let us assume Φ(Λ^{p}) = Λ. For any q ∈ ℕ, denote T_{q} the number represented by

ω0 \underbrace{Λ ⋯ Λ}_{t times} • \underbrace{Λ ⋯ Λ}_{r times} \underbrace{(2Λ)(2Λ) ⋯ (2Λ)(2Λ)}_{q times} 0^{ω}.  (12)

After conversion by the function Φ, we get

ω0w_{p−1}w_{p−2} ⋯ w_{2}w_{1} • z_{1}z_{2} ⋯ z_{r+t+q} 0^{ω},  (13)

where w_{j} = Φ(0^{j}Λ^{p−j}). According to Corollary 11 the value W = ∑_{j=1}^{p−1} w_{j}β^{j−1} is equal to W = \frac{Λβ^{t}−Φ(Λ^{p})}{β−1} = Λ\frac{β^{t}−1}{β−1} = Λ ∑_{j=0}^{t−1} β^{j}. Using the representations (12) and (13) for evaluation of the number T_{q}, and the fact that z_{j} ⩽ Λ for any j, we obtain

Λ ∑_{j=−r}^{t−1} β^{j} + (2Λ) ∑_{j=−r−q}^{−r−1} β^{j} = W + ∑_{j=1}^{r+t+q} z_{j}β^{−j} = Λ ∑_{j=0}^{t−1} β^{j} + ∑_{j=1}^{r+t+q} z_{j}β^{−j},

and thus

Λ ∑_{j=−r}^{−1} β^{j} + (2Λ) ∑_{j=−r−q}^{−r−1} β^{j} ⩽ Λ ∑_{j=1}^{∞} β^{−j} ⟹ ∑_{j=−r−q}^{−r−1} β^{j} ⩽ ∑_{j=q+r+1}^{∞} β^{−j}.

Summing up both sides of the last inequality, we get \frac{1}{β^{q+r}} \frac{β^{q}−1}{β−1} ⩽ \frac{1}{β^{q+r}} \frac{1}{β−1} for all q ∈ ℕ, thus a contradiction. The proof of Φ(λ^{p}) ≠ λ is analogous.

Now we can easily deduce the statement of Theorem 9:

Proof. Let A = {m, m + 1, …, M − 1, M} be a set of contiguous integers containing 0 and 1, i.e., m ⩽ 0 < M.

First, consider the base β as any algebraic integer of modulus greater than 1. If |f(1)| = 1, there is nothing to prove. Therefore, suppose now that |f(1)| ⩾ 2. Since M + 1 ∈ A + A, then, according to Claim 12, the digit Φ((M + 1)^{p}) ⩽ M is congruent to M + 1 modulo |f(1)|. Therefore, necessarily, M + 1 − |f(1)| ⩾ Φ((M + 1)^{p}) ⩾ m. This implies the claimed inequality #A = M − m + 1 ⩾ |f(1)|.

Now suppose that β > 1. According to Claims 13 and 14, the digits M, m, and Φ(M^{p}) are distinct, i.e., the alphabet A contains at least three elements. Therefore, for the proof of #A ⩾ |f(1)| + 2, we can restrict ourselves to the case |f(1)| ⩾ 2. As M > Φ(M^{p}) > m and Φ(M^{p}) ≡ M mod |f(1)|, we have M − |f(1)| ⩾ Φ(M^{p}) ⩾ m + 1. It implies the second part of the claim, namely that #A = M − m + 1 ⩾ |f(1)| + 2.

The assumptions of the previous Claims 12, 13, and 14 are much more relaxed than the assumptions of Theorem 9. Therefore, modified statements can be proved as well. For instance, the following result holds.

Proposition 15. Given β > 1 an algebraic integer with minimal polynomial f(X), let D be a finite set of (not necessarily contiguous) integers containing 0, such that gcd D = 1 and min D < 0 < max D. If addition in Fin_{D}(β) is computable in parallel, then #D ⩾ |f(1)| + 2.

Remark 16. Exploiting Remarks 4 and 5, we may also strengthen Theorem 9.

1. If a polynomial f(X) ∈ ℤ[X] of degree d is the minimal polynomial of β, then g(X) = X^{d}f(\frac{1}{X}) is the minimal polynomial of \frac{1}{β}, and, moreover, f(1) = g(1). Therefore, the assumption “β is an algebraic integer” in Theorem 9 can be replaced by “β or \frac{1}{β} is an algebraic integer”.

2. Even the second part of Theorem 9 can be applied to a broader class of bases. The lower bound #A ⩾ |f(1)| + 2 remains valid even if β is an algebraic integer and one of its conjugates is a positive real number greater than 1.

4 Addition versus subtraction and conversion

As we have already mentioned, addition in the set Fin_{A}(β) can be interpreted as a digit set conversion from alphabet A + A into alphabet A. Let us point out that, if addition of two numbers can be performed in parallel, then addition of three numbers can be done in parallel as well, and the same holds for any fixed number of summands. This implies that, if {−1, 0, 1} ⊂ A, then subtraction of two numbers from Fin_{A}(β) can be viewed as addition of fixed numbers of summands, and therefore, no special study of parallelism for subtraction of (β, A)-representations is needed.

On the other hand, if the elements of A are non-negative and the base β is a real number greater than 1, then the set Fin_{A}(β) ⊂ [0, +∞) is not closed under subtraction. We may investigate only the existence of a parallel algorithm for subtraction y − x for y ⩾ x. But even if Fin_{A}(β) is closed under subtraction of y − x for y ⩾ x, it is not possible to find any parallel algorithm for it. Let us explain why: Suppose that subtraction is a p-local function φ. Then φ must convert a string with a finite number of non-zero digits into a string with a finite number of non-zero digits. It forces the function Φ associated with φ (see Definition 1) to satisfy Φ(0^{p}) = 0. Therefore, the algorithm has no chance to exploit the fact that y ⩾ x, when the (β, A)-representation of y is^{ω}010^{n}•0^{ω} and the (β, A)-representation of x is^{ω}01•0^{ω}.

Therefore, we will focus only on addition of (β, A)-representations. We start with setting some terminology.

Definition 17. Let β with |β| > 1 be fixed, and consider c and K from ℤ, K ⩾ 2. The parameters c and K must be such that 0 is always an element of the considered alphabets (both before and after the conversion).

• Smallest digit elimination (SDE) in base β is a digit set conversion from {c, …, c+K} to {c + 1, …, c + K}.

• Greatest digit elimination (GDE) in base β is a digit set conversion from {c, …, c+K} to {c, …, c + K − 1}.

The following result enables us to replace the alphabet A + A entering into conversion during parallel addition by a smaller one. When looking for parallel algorithms for addition on minimal alphabets, we will discuss the case when an alphabet contains only non-negative digits separately.

Proposition 18. Let A = {m, m + 1, …, M − 1, M} be an alphabet of contiguous integers containing 0 and 1 and let β be the base of the respective numeration system.

1. If m = 0, then addition in Fin_{A}(β) can be performed in parallel if, and only if, the conversion from A ∪ {M + 1} into A (greatest digit elimination) can be performed in parallel.

2. Suppose that {−1, 0, 1} ⊂ A. Then addition in Fin_{A}(β) can be performed in parallel if, and only if, the conversion from A ∪ {M + 1} into A (greatest digit elimination) and the conversion from {m − 1} ∪ A into A (smallest digit elimination) can be performed in parallel.

Proof. The necessity is trivial. We prove only the sufficiency.

1. Consider x and y from Fin_{A}(β), and let z = x + y. The coefficients of z are in {0, …, 2M}, so z can be decomposed into the sum of z′ with coefficients in {0, …, M + 1} and z′′ with coefficients in {0, …, M − 1}. According to the assumption of Statement 1, z′ is transformable in parallel into w with coefficients in A. So w + z′′ has coefficients in {0, …, 2M − 1}. We iterate this process until the result is on A, so we need M iterations (i.e., a finite fixed number of iterations).

2. Analogous to the proof of Statement 1; and, again, the number of iterations is finite and fixed, this time equal to max{M, −m}.

In the sequel we will discuss only questions about parallel addition on Fin_{A}(β). Nevertheless, parallel addition is closely related to the question of parallel conversion between different alphabets.

Corollary 19. Let A and B be two alphabets of consecutive integers containing 0.

1. Suppose that {−1, 0, 1} ⊂ A and addition on Fin_{A}(β) can be performed in parallel. Then conversion from B into A can be performed in parallel for any alphabet B.

2. Suppose that conversion from B to A and conversion from A to B can be performed in parallel. Then parallel addition on Fin_{A}(β) can be performed in parallel if, and only if, parallel addition on Fin_{B}(β) can be performed in parallel.

Proof. 1. Possibility of parallel addition on Fin_{A}(β) implies that conversion

from \underbrace{A + A + ⋯ + A}_{k times} into A

can be made in parallel for any fixed positive integer k. Any finite alphabet B is a subset of \underbrace{A + A + ⋯ + A}_{k times} for some k. This proves Statement 1.

2. Let us assume that parallel addition is possible on Fin_{A}(β). To add two numbers x and y represented on the alphabet B, we at first use parallel algorithm for conversion from B to A, then we add these numbers by parallel algorithm acting on Fin_{A}(β) and finally we use parallel algorithm for conversion back from A to B.

We now show how a parallel algorithm acting on one alphabet can be modified to work on another alphabet. First we mention a simple property.

Proposition 20. Given a base β ∈ ℂ, β an algebraic number, and two alphabets A and B containing 0 such that A ∪ B ⊂ ℤ[β]. Then conversion in base β from A to B is computable in parallel by a p-local function if, and only if, conversion in base β from (−A) to (−B) is computable in parallel by a p-local function.

Proof. Let φ : A^{ℤ} → B^{ℤ} be p-local, defined by Φ : A^{p} → B. Conversion from the alphabet (−A) = {−a | a ∈ A} to (−B) is computable in parallel by the p-local function φ̃ : (−A)^{ℤ} → (−B)^{ℤ} which uses the function Φ̃ : (−A)^{p} → (−B) defined for any x_{1}, x_{2}, …, x_{p} ∈ (−A) by the prescription

Φ̃(x_{1}x_{2} ⋯ x_{p}) = −Φ((−x_{1})(−x_{1}) ⋯ (−x_{p})) ,

which implies that Φ̃(0^{p}) = −Φ(0^{p}) = 0.

The next result allows passing from one alphabet allowing parallel digit-set conversion to another one. First, we set a definition.

Definition 21. Let A and B be two alphabets containing 0 such that A ∪ B ⊂ ℤ[β]. Let φ : A^{ℤ} → B^{ℤ} be a p-local function realized by the function Φ : A^{p} → B. The letter h in A is said to be fixed by φ if φ(^{ω}h • h^{ω}) = ^{ω}h • h^{ω}, or, equivalently, Φ(h^{p}) = h.

Theorem 22. Given a base β ∈ ℂ, β an algebraic number, and two alphabets A and B containing 0 such that A ∪ B ⊂ ℤ[β], suppose that conversion in base β from A to B is computable by a p-local function φ : A^{ℤ} → B^{ℤ}.

If some letter h in A is fixed by φ then conversion in base β from A′ = {a − h | a ∈ A} to B′ = {b − h | b ∈ B} is computable in parallel by a p-local function.

Proof. Let Φ : A^{p} → B be the function realizing conversion from A to B, with memory r and anticipation t satisfying p = r + t + 1. It means that for any u = (u_{j}) ∈ A^{ℤ} such that u has only a finite number of non-zero entries, we have after conversion the sequence v = φ(u) such that

• v = (v_{j}) ∈ B^{ℤ} has only a finite number of non-zero entries;

• v_{j} = Φ(u_{j+t} ⋯ u_{j+1}u_{j}u_{j−1} ⋯ u_{j−r}) for any j ∈ ℤ;

• ∑_{j∈ℤ} u_{j}β^{j} = ∑_{j∈ℤ} v_{j}β^{j}.

For any x_{1}, …, x_{p} ∈ A′ we define

Ψ(x_{1}x_{2} ⋯ x_{p}) = Φ((x_{1} + h)(x_{2} + h) ⋯ (x_{p} + h)) − h .  (14)

It is easy to check that Ψ : (A′)^{p} → B′. Let ψ : (A′)^{ℤ} → (B′)^{ℤ} denote the p-local function realized by the function Ψ. We will show that the function ψ performes conversion from A′ to B′.

As Φ(h^{p}) = h we have Ψ(0^{p}) = Φ(h^{p}) − h = 0. Consequently, v′ = ψ(u′) has only a finite numbers of non-zero digits of the form

v′_{j} = Ψ(u′_{j+t} ⋯ u′_{j} ⋯ u′_{j−r})

for any u′ ∈ (A′)^{ℤ} with a finite number of non-zero entries u′_{j}. It remains to show that

∑_{j∈ℤ} u′_{j}β^{j} = ∑_{j∈ℤ} v′_{j}β^{j} = ∑_{j∈ℤ} Ψ(u′_{j+t} ⋯ u′_{j} ⋯ u′_{j−r})β^{j} .  (15)

Before verifying the previous statement, we deduce an auxiliary equality. Put L := max{j ∈ ℤ | u′_{j} ≠ 0} and define u = (u_{j}) ∈ A^{ℤ} as

u_{j} := \begin{cases}u′_{j} + h, & if j ⩽ L; \\ h, & if L < j ⩽ L + p − 1; \\ 0, & if j ⩾ L + p. \end{cases}

As φ realizes conversion from A to B, we have

h ∑_{j⩽L+p−1} β^{j} + ∑_{j⩽L} u′_{j}β^{j} = ∑_{j∈ℤ} u_{j}β^{j} = ∑_{j∈ℤ} Φ(u_{j+t} ⋯ u_{j} ⋯ u_{j−r})β^{j} = ∑_{j∈ℤ} v_{j}β^{j} . (16)

Let us split the last sum into three pieces

P_{1} = ∑_{j⩾L+p+r} v_{j}β^{j}, P_{2} = ∑_{j=L+r+1}^{L+p+r−1} v_{j}β^{j} and P_{3} = ∑_{j⩽L+r} v_{j}β^{j} .

In the first sum, v_{j} = Φ(0^{p}) = 0, as for j ⩾ L + p + r, all arguments u_{j+t}, …, u_{j}, …, u_{j−r} of the function Φ are zeros, i.e., P_{1} = 0.

In the second sum P_{2}, the first coefficient is v_{L+r+1} = Φ(u_{L+p} ⋯ u_{L+1}) = Φ(0h^{p−1}), the second one is v_{L+r+2} = Φ(u_{L+p+1} ⋯ u_{L+2}) = Φ(0^{2}h^{p−2}), etc. Using Corollary 11, we obtain

P_{2} = β^{L+r+1} ∑_{j=1}^{p−1} Φ(0^{j}h^{p−j})β^{j−1} = β^{L+r+1}h\frac{β^{t} − 1}{β − 1}.

Since ∑_{j∈ℤ} v_{j}β^{j} = P_{1} + P_{2} + P_{3}, we may calculate the value of P_{3} using (16)

P_{3} = ∑_{j⩽L} u′_{j}β^{j} + h ∑_{j⩽L+p−1} β^{j} − β^{L+r+1}h\frac{β^{t} − 1}{β − 1} = ∑_{j⩽L} u′_{j}β^{j} + h ∑_{j⩽L+r} β^{j} .  (17)

All coefficients v′_{j}s in the sum P_{3} are of the form v_{j} = Φ((u′_{j+t} + h) ⋯ (u′_{j−r} + h)). We have thus shown that

∑_{j⩽L+r} Φ((u′_{j+t} + h) ⋯ (u′_{j−r} + h))β^{j} = ∑_{j⩽L} u′_{j}β^{j} + h ∑_{j⩽L+r} β^{j} .  (18)

Let us come back to the task to show (15). In the right sum of (15), all arguments u′_{j+t}, …, u′_{j}, …, u′_{j−r} of Ψ are zero for j > L + r, and therefore v′_{j} = Ψ(0^{p}) = Φ(h^{p}) − h = 0. In the left sum of (15), all coefficients u′_{j} are for j > L equal to zero as well. So we have to check whether

∑_{j⩽L} u′_{j}β^{j} = ∑_{j⩽L+r} Ψ(u′_{j+t} ⋯ u′_{j} ⋯ u′_{j−r})β^{j} .

Because of the definition of Ψ in (14), this relation is equivalent to Equation (18).

Remark 23. For deduction of (16), we have applied the mapping φ to the word u = ω0u_{L+p−1}u_{L+p−2} ⋯ u_{0} • u_{−1}u_{−2} ⋯ with infinitely many non-zero entries. Let us explain the correctness of this step. Let u^{(n)} denote the word^{ω}0u_{L+p−1}u_{L+p−2} ⋯ u_{0}•u_{−1} ⋯ u_{−n}0^{ω}. Since u^{(n)} has only a finite number of non-zero digits, we know that the value corresponding to φ(u^{(n)}) equals the value corresponding to v^{(n)} = φ(u^{(n)}). Clearly u_{n} → u and φ(u^{(n)}) → φ(u) as n → ∞ in the product topology. The same is true for the numerical values represented by these words.

In the following sections, we give parallel algorithms for addition in a given base on alphabets (of contiguous integers) containing 0, of the minimal cardinality K. While doing so, we favour the method of starting with an alphabet containing only non-negative digits, and writing a parallel algorithm for the greatest digit elimination, Algorithm GDE(β), converting representations on {0, 1 …, K − 1, K} into representations on {0, 1 …, K − 1}. By Proposition 18, parallel addition is thus possible on {0, 1 …, K − 1}. In order to show that parallel addition is possible also on other alphabets (of the same size), we use the following corollary.

Corollary 24. For K, d ∈ ℤ, where 0 ⩽ d ⩽ K − 1, denote

A_{−d} = {−d, …, 0, …, K − 1 − d} .

Let φ be a p-local function realizing conversion in base β from A_{0} ∪{K} to A_{0}. If both letters d and K − 1 − d are fixed by φ, then addition is performable in parallel on A_{−d} as well.

Proof. According to Theorem 22, conversions from {−d, …, 0, …, K − 1 − d, K − d} into {−d, …, 0, …, K − 1 − d} and also from {−K + 1 + d, …, 0, …, d + 1} into {−K + 1 + d, …, 0, …, d} are performable in parallel. According to Proposition 20, conversion from {−d − 1, …, 0, …, K − 1 − d} into {−d, …, 0, …, K − 1 − d} is performable in parallel, as well. Using Proposition 18 Point (2), addition on the alphabet A_{−d} can be made in parallel.

5 Integer base and related complex numeration systems

In this section, we consider some well studied numeration systems, where the base is an integer, or a root of an integer. Parallel algorithms for addition in these systems can be found in [10], but the question of minimality of the alphabet was not discussed there.

5.1 Positive integer base

If the base β is a positive integer b ⩾ 2, then the minimal polynomial is f(X) = X − b, and Theorem 9 gives #A ⩾ |f(1)|+2 = b+1. It is known that parallel addition is feasible on any alphabet of cardinality b + 1 containing 0, in particular on alphabets A = {0, 1, …, b} and A = {−1, 0, 1, …, b − 1}, see for instance Parhami [23]. In the case that b is even, b = 2a, parallel addition is realizable over the alphabet A = {−a, …, a} of cardinality b + 1 by the algorithm of Chow and Robertson [7].

5.2 Negative integer base

If the base β is a negative integer, β = −b, b ⩾ 2, then the minimal polynomial is f(X) = X + b, and Theorem 9 gives the bound #A ⩾ |f(1)| = b + 1. In this section we prove

Theorem 25. Let β = −b, b ∈ ℤ, b ⩾ 2. Any alphabet A of contiguous integers containing 0 with cardinality #A = b + 1 allows parallel addition in base β = −b and this alphabet cannot be further reduced.

Any alphabet of contiguous integers containing 0 which has cardinality b + 1 can be written in the form

A_{−d} = {−d, …, 0, …, b − d} for 0 ⩽ d ⩽ b .

For proving Theorem 25, we firstly consider the alphabet consisting only of non-negative digits, i.e., the alphabet A_{0}.

Algorithm GDE(−b): Base β = −b, b ∈ ℤ, b ⩾ 2, parallel conversion (greatest digit elimination) from {0, …, b + 1} to {0, …, b}.

Input: a finite sequence of digits (z_{j}) of {0, …, b + 1}, with z = ∑ z_{j}β^{j}. Output: a finite sequence of digits {0, …, b}, with z = ∑ z_{j}β^{j}.

for each j in parallel do

1. case \{ \begin{matrix}z_{j} = b + 1 \\ z_{j} = b and z_{j−1} = 0 \end{matrix} \} then q_{j} := 1

if  z_{j} = 0 and z_{j−1} ⩾ b  then q_{j} := −1

else q_{j} := 0

2. z_{j} := z_{j} − bq_{j} − q_{j−1}

Proof. Let w_{j} = z_{j} − bq_{j}, and z_{j}^{new} = w_{j} − q_{j−1} after Step 2 of the algorithm.

• If z_{j} = b + 1, then w_{j} = 1. Thus 0 ⩽ z_{j}^{new} ⩽ 2 ⩽ b.

• For z_{j} = b and z_{j−1} = 0, we get w_{j} = 0. Since q_{j−1} ⩽ 0, the resulting z_{j}^{new} ∈ {0, 1}.

• For z_{j} = b and z_{j−1} ≠ 0, we obtain w_{j} = b. Since q_{j−1} ≠ −1, the resulting z_{j}^{new} ∈ {b − 1, b}.

• When z_{j} = 0 and z_{j−1} ⩾ b, then w_{j} = b, and b − 1 ⩽ z_{j}^{new} ⩽ b, because q_{j−1} ⩾ 0.

• When z_{j} = 0 and z_{j−1} ⩽ b − 1, then w_{j} = 0. Since q_{j−1} ≠ 1, we obtain 0 ⩽ z_{j}^{new} ⩽ 1.

• If 1 ⩽ z_{j} ⩽ b − 1, then 0 ⩽ z_{j}^{new} ⩽ b, as q_{j} ∈ {−1, 0, 1}.

Note that we obtain q_{j} ≠ 0 only if z_{j} itself or its neighbor z_{j−1} are different from zero; it means that the algorithm is correct in the sense that it does not create a string of non-zeros from a string of zeros. The input value z equals the output value z thanks to the fact that the base β satisfies β^{j+1} + bβ^{j} = 0 for any j ∈ ℤ. This parallel conversion is 3-local, with memory 2 and anticipation 0, i.e., (0, 2)-local since z_{j}^{new} depends on (z_{j}, z_{j−1}, z_{j−2}).

Let us prove Theorem 25.

Proof. Proposition 18 and the previous Algorithm GDE(−b) imply that parallel addition is possible over the alphabet A_{0} = {0, 1, …, b}. Moreover, Algorithm GDE(−b) applied to the infinite sequence u = ^{ω}h • h^{ω} gives the infinite sequence φ(u) = ^{ω}h • h^{ω} for any h ∈ {0, 1, …, b}. Therefore, d and b − d are fixed by φ for any d ∈ {0, 1, 2, …, b}. Corollary 24 gives that parallel addition is possible on any alphabet A_{−d} = {−d, …, b − d} for d ∈ {0, 1, 2, …, b}. The minimality of the alphabet A_{−d} follows from Theorem 9.

5.3 Base \sqrt[k]{b}, b integer, |b| ⩾ 2

Here we will use that β is a zero of the polynomial X^{k} −b, but this not in general the minimal polynomial.

Proposition 26. Let β = \sqrt[k]{b}, b in ℤ, |b| ⩾ 2 and k ⩾ 1 integer. Any alphabet A of contiguous integers containing 0 with cardinality #A = b + 1 allows parallel addition.

The proof follows from the fact that γ = β^{k} = b and the results of Sections 5.1 and 5.2 applied to base γ.

For the sake of completeness we give below the algorithms for the greatest digit elimination in base β = \sqrt[k]{b}, b ⩾ 2 and in base β = \sqrt[k]{−b}, b ⩾ 2.

Algorithm GDE(\sqrt[k]{b}): Base β = \sqrt[k]{b}, b ∈ ℤ, b ⩾ 2, parallel conversion (greatest digit elimination) from {0, …, b + 1} to {0, …, b}.

Input: a finite sequence of digits (z_{j}) of {0, …, b + 1}, with z = ∑ z_{j}β^{j}. Output: a finite sequence of digits {0, …, b}, with z = ∑ z_{j}β^{j}.

for each j in parallel do

1. case \{ \begin{matrix}z_{j} = b + 1 \\ z_{j} = b and z_{j−k} ⩾ b \end{matrix} \} then q_{j} := 1

else q_{j} := 0

2. z_{j} := z_{j} − bq_{j} + q_{j−k}

Algorithm GDE(\sqrt[k]{−b}): Base β = \sqrt[k]{−b}, b ∈ ℤ, b ⩾ 2, parallel conversion (greatest digit elimination) from {0, …, b + 1} to {0, …, b}.

Input: a finite sequence of digits (z_{j}) of {0, …, b + 1}, with z = ∑ z_{j}β^{j}. Output: a finite sequence of digits (z_{j}) of {0, …, b}, with z = ∑ z_{j}β^{j}.

for each j in parallel do

1. case \{ \begin{matrix}z_{j} = b + 1 \\ z_{j} = b and z_{j−k} = 0 \end{matrix} \} then q_{j} := 1

if  z_{j} = 0 and z_{j−k} ⩾ b  then q_{j} := −1

else q_{j} := 0

2. z_{j} := z_{j} − bq_{j} − q_{j−k}

Note that in general, we cannot say that the minimal cardinality of an alphabet for parallel addition is equal to b + 1, since the polynomial X^{k} − b might be reducible. But we have the following result. We say that β = \sqrt[k]{b} is written in the minimal form if b ≠ c^{k′} where k′ ⩾ 2 divides k. Otherwise, β could be written as β = \sqrt[k′′]{c} with k = k′k′′.

Lemma 27. Let β = \sqrt[k]{b}, with b ∈ ℕ, b ⩾ 2 and k positive integer, be written in the minimal form. Then the polynomial X^{k} − b is minimal for β.

Proof. Let us suppose the opposite fact, i.e., that the polynomial

X^{k} − b = ∏_{ℓ=0}^{k−1}(X − e^{\frac{2πiℓ}{k}} \sqrt[k]{b})

is reducible. One can write X^{k}−b = f(X)g(X), where f(X) and g(X) are monic polynomials belonging to ℤ[X], the polynomial f(X) is irreducible and its degree m satisfies 1 ⩽ m < k.

Let f(X) = X^{m} + f_{m−1}X^{m−1} + ⋯ + f_{1}X + f_{0}. All m zeros of f are zeros of X^{k} − b as well, i.e., of the form \sqrt[k]{b} times a complex unit. The product of zeros of f(X) is equal to (−1)^{m}f_{0}, so we have

|f_{0}| = (\sqrt[k]{b})^{m} = b^{\frac{m}{k}} = b^{\frac{m′}{k′}}

where \frac{m}{k} = \frac{m′}{k′} and m′ and k′ are coprime. Let |f_{0}| = p_{1}^{α_{1}} ⋯ p_{r}^{α_{r}} be the decomposition into product of distinct primes p_{1}, …, p_{r}. Then

b^{m′} = p_{1}^{k′α_{1}} ⋯ p_{r}^{k′α_{r}}

and thus m′ divides k′α_{j} for all j = 1, 2, …, r. Since k′ and m′ are coprime, m′ divides α_{j} and therefore α_{j} = m′α′_{j}. We can write

b = (p_{1}^{α′_{1}} ⋯ p_{r}^{α′_{r}})^{k′} =: c^{k′}.

As 1 > \frac{m}{k} = \frac{m′}{k′} the number k′ ⩾ 2 and k′ divides k – a contradiction with the minimal form of β.

Corollary 28. Let β = \sqrt[k]{b}, b in ℕ, b ⩾ 2 and k ⩾ 1 integer, written in the minimal form. Parallel addition is possible on any alphabet (of contiguous integers) of cardinality b + 1 containing 0, and this cardinality is the smallest possible.

Proof. Since f(X) = X^{k} − b is the minimal polynomial of β, the lower bound of Theorem 9 is equal to |f(1)| + 2 = b + 1.

We now present several cases of complex bases of the form β = \sqrt[k]{−b}, b in ℕ, b ⩾ 2. The complex base β = −1 + ı satisfies β^{4} = −4. Its minimal polynomial is f(X) =

X^{2} + 2X + 2, and the lower bound on the cardinality of the alphabet allowing parallel addition (from Theorem 9) is |f(1)| = 5. It has been proved in [10] by indirect methods that parallel addition on alphabet A = {−2, …, 2} is possible; and, due to Theorem 9, this alphabet is minimal.

Corollary 29. In base β = −1+ı, parallel addition is possible on any alphabet of cardinality 5 containing 0, and this cardinality is the smallest possible.

Remark 30. With a more general concept of parallelism (k-block p-local function, see [19]), there is a result by Herreros [15] saying that addition in this base is realizable on {−1, 0, 1} by a 4-block p-local function.

The complex base β = 2ı has X^{2} + 4 for minimal polynomial, so the lower bound given by Theorem 9, equal to 5, is attained.

Corollary 31. In base β = 2ı, parallel addition is possible on any alphabet of cardinality 5 containing 0, and this cardinality is the smallest possible.

Similarly the complex base β = ı\sqrt{2} has X^{2} + 2 for minimal polynomial, so the lower bound given by Theorem 9, equal to 3, is attained.

Corollary 32. In base β = ı\sqrt{2}, parallel addition is possible on any alphabet of minimal cardinality 3 containing 0.

6 Quadratic Pisot units bases

6.1 Base β root of X^{2} = aX − 1

Among the quadratic Pisot units, we firstly take as base β the greater zero of the polynomial f(X) = X^{2} − aX + 1 with a in ℕ, a ⩾ 3. Here, the canonical alphabet of the numeration system related to this base by means of the Rényi expansion (greedy algorithm) is the set C = {0, …, a − 1} of cardinality #C = a.

The numeration system given by this base β, alphabet C, and the Rényi expansions is restricted only to representations x = ∑_{j} x_{j}β^{j}, where not only the digits must be from the alphabet C, but also the representations must avoid any string of the form (a−1)(a−2)^{n}(a−1) for any n ∈ ℕ. With this admissibility condition, the numeration system has no redundancy. In order to enable parallel addition, we always have to introduce some level of redundancy into the numeration system. In this case, we prove that it is sufficient to stay in the same alphabet A := C = {0, …, a − 1}, we only need to cancel the restricting condition given by the Rényi expansion, so that all the strings on C are allowed.

The lower bound on the cardinality of the alphabet for parallel addition given by Theorem 9 for this base is equal to |f(1)| + 2 = a, which is just equal to the cardinality of C. We show below that the canonical alphabet C = {0, …, a − 1} already allows parallel addition. At the same time, the cardinality of this alphabet C is equal to ⌈β⌉ = a, and thus this example demonstrates that also the lower bound given by Theorem 6 cannot be further improved in general.

According to Proposition 18, we know that, for parallel addition over the alphabet A = {0, …, a − 1}, it is enough to show that parallel conversion (greatest digit elimination) from {0, …, a} to A is possible. To perform conversion from A+A to A, we then use several times greatest digit elimination (GDE). However, the repetition of GDE may increase the width p of the sliding window in the resulting p-local function. To illustrate this phenomenon, we provide below the complete algorithm for parallel addition, which uses GDE just once and then in Remark 34 we compare the value of the width p for both approaches.

Algorithm A: Base β satisfying β^{2} = aβ − 1, with a in ℕ, a ⩾ 3, parallel conversion from {0, …, 2a − 2} to {0, …, a}.

Input: a finite sequence of digits (z_{j}) of {0, …, 2a − 2}, with z = ∑ z_{j}β^{j}. Output: a finite sequence of digits (z_{j}) of {0, …, a}, with z = ∑ z_{j}β^{j}.

for each j in parallel do

1. case \{ \begin{matrix}z_{j} ⩾ a \\ z_{j} = a − 1 and z_{j+1} ⩾ a and z_{j−1} ⩾ a \end{matrix} \} then q_{j} := 1

else q_{j} := 0

2. z_{j} := z_{j} − aq_{j} + q_{j+1} + q_{j−1}

Proof. For correctness of Algorithm A, we have to show that the value z_{j}^{new} = z_{j} − aq_{j} + q_{j+1} + q_{j−1} belongs to the alphabet {0, 1, …, a} for each j. Let us denote w_{j} := z_{j} − aq_{j}, i.e., z_{j}^{new} = w_{j} + q_{j+1} + q_{j−1}.

• If z_{j} ∈ {0, …, a − 2} ∪ {a, …, 2a − 2}, then w_{j} ∈ {0, … a − 2}, and therefore z_{j}^{new} = w_{j} + q_{j+1} + q_{j−1} ∈ {0, … a}.

• When z_{j} = a − 1 and both its neighbors z_{j±1} ⩾ a, then w_{j} = −1 and q_{j+1} = q_{j−1} = 1. Thus z_{j}^{new} = 1.

• If z_{j} = a − 1, and z_{j−1} < a or z_{j+1} < a, then w_{j} = a − 1 and q_{j+1} or q_{j−1} = 0. Now z_{j}^{new} ∈ {a − 1, a}.

The output value z equals the input value z thanks to the fact that β^{j+2} −aβ^{j+1} +β^{j} = 0 for any j ∈ ℤ. Besides, it is to be noted that z_{j} = 0 implies q_{j} = 0, and therefore, the algorithm cannot assign a string of non-zeros to a string of zeros.

We then realize the greatest digit elimination in parallel. Let us denote by β^{−} the root larger than 1 of the equation X^{2} = aX − 1, a ⩾ 3.

Algorithm GDE(β^{−}): Base β = β^{−} satisfying β^{2} = aβ − 1, with a in ℕ, a ⩾ 3, parallel conversion (greatest digit elimination) from {0, …, a} to {0, …, a − 1} = A.

Input: a finite sequence of digits (z_{j}) of {0, …, a}, with z = ∑ z_{j}β^{j}. Output: a finite sequence of digits (z_{j}) of {0, …, a − 1}, with z = ∑ z_{j}β^{j}.

for each j in parallel do

1. case \{ \begin{matrix}z_{j} = a \\ z_{j} = a − 1 and (z_{j+1} ⩾ a − 1 or z_{j−1} ⩾ a − 1) \\ z_{j} = a − 2 and z_{j+1} = a and z_{j−1} = a \\ z_{j} = a − 2 and z_{j+1} = a and z_{j−1} = a − 1 and z_{j−2} ⩾ a − 1 \\ z_{j} = a − 2 and z_{j−1} = a and z_{j+1} = a − 1 and z_{j+2} ⩾ a − 1 \\ z_{j} = a − 2 and z_{j±1} = a − 1 and z_{j±2} ⩾ a − 1 \end{matrix} \}

then q_{j} := 1 else q_{j} := 0

2. z_{j} := z_{j} − aq_{j} + q_{j+1} + q_{j−1}

Proof. Let us denote again w_{j} := z_{j} − aq_{j}, i.e., z_{j}^{new} = w_{j} + q_{j+1} + q_{j−1}.

• If z_{j} ∈ {0, …, a − 3} ∪ {a}, then w_{j} ∈ {0, … a − 3}, and therefore z_{j}^{new} = w_{j} + q_{j+1} + q_{j−1} ∈ {0, … a − 1} = A.

• When z_{j} = a−1, and z_{j−1} ⩾ a−1 or z_{j+1} ⩾ a−1, then w_{j} = −1 and q_{j+1}+q_{j−1} ∈ {1, 2}. Thus z_{j}^{new} ∈ {0, 1} ⊂ A.

• When z_{j} = a − 1 and both its neighbors z_{j±1} < a − 1, then w_{j} = a − 1 and q_{j+1} = q_{j−1} = 0. Now z_{j}^{new} = a − 1 ∈ A.

• If z_{j} = a−2 and q_{j} = 1, then necessarily q_{j±1} = 1. Since w_{j} = −2, we get z_{j}^{new} = 0 ∈ A.

• If z_{j} = a−2 and q_{j} = 0, then necessarily q_{j−1} or q_{j+1} equal 0, and therefore q_{j+1}+q_{j−1} ∈ {0, 1}. As w_{j} = a − 2, the resulting z_{j}^{new} ∈ {a − 2, a − 1} ⊂ A.

Again, the equation β^{j+2} − aβ^{j+1} + β^{j} = 0 for any j ∈ ℤ ensures that the output value z equals the input value z. For z_{j} = 0 we always have q_{j} = 0, so the algorithm cannot assign a string of non-zeros to a string of zeros.

Now we can proceed by summarizing the algorithm for parallel addition:

Algorithm I: Base β satisfying β^{2} = aβ − 1, with a in ℕ, a ⩾ 3, parallel addition on alphabet A = {0, …, a − 1}.

Input: two finite sequences of digits (x_{j}) and (y_{j}) of {0, …, a − 1}, with x = ∑ x_{j}β^{j} and y = ∑ y_{j}β^{j}. Output: a finite sequence of digits (z_{j}) of {0, …, a − 1} such that z = x + y = ∑ z_{j}β^{j}.

for each j in parallel do

0. v_{j} := x_{j} + y_{j}

1. use Algorithm A with input (v_{j}) and denote its output (w_{j})

2. use Algorithm GDE(β^{−}) with input (w_{j}) and denote its output (z_{j})

Theorem 33. Let β > 1 be a root of X^{2} = aX − 1, with a ⩾ 3, a ∈ ℕ, and let A be the canonical alphabet A = {0, …, a − 1} associated with this base β. Addition in Fin_{A}(β) is a p-local function with p = 11. The alphabet A is the smallest one for parallel addition.

Proof. In Algorithm A, the output digit z_{j}^{new} depends on input digits (z_{j+2}, …, z_{j−2}), so it is a (2, 2)-local function. In Algorithm GDE(β^{−}) the output digit z_{j}^{new} depends on input digits (z_{j+3}, …, z_{j−3}), and thus it is a (3, 3)-local function. Algorithm I is a composition of Algorithms A and GDE(β^{−}), so the resulting function is a composition of the two local functions, (2, 2)-local and (3, 3)-local. Overall, the addition in base β, fulfilling β^{2} = aβ − 1 for a ⩾ 3, as performed by Algorithm I, is a (5, 5)-local function, i.e., 11-local.

Remark 34. According to Proposition 18, we need only Algorithm GDE(β^{−}) for performing parallel addition on A = {0, …, a − 1} in the base β^{2} = aβ − 1, with a ⩾ 3. In order to obtain the sum x + y, we would apply Algorithm GDE(β^{−}) repeatedly (a − 1)-times. The function performing parallel addition in this way would then be (3a − 3, 3a − 3)-local. On the other hand, Algorithm I, exploiting firstly Algorithm A and then only once the Algorithm GDE(β^{−}), reduces the size of the sliding window, i.e., the parameters of the local function are only (5, 5).

Now we will show that parallel addition for base β^{2} = aβ − 1, with a ⩾ 3, a ∈ ℕ, is feasible also on any alphabet of contiguous integers of cardinality a containing {−1, 0, 1}, of the form A_{−d} = {−d, …, 0, …, a − 1 − d}, for 1 ⩽ d ⩽ a − 2.

Let us observe that Algorithm GDE(β^{−}) applied to the bi-infinite sequence u = ^{ω}h • h^{ω} gives the bi-infinite sequence φ(u) = ^{ω}h • h^{ω} = u for any h ∈ {0, …, a − 2}, and thus for any d ∈ {1, …, a − 2}, both letters d and a − 1 − d are fixed by φ. Corollary 24 therefore implies that the alphabet A_{−d} = {−d, …, a − 1 − d} allows parallelization of addition for any such d ∈ {1, …, a − 2}. This fact, together with Theorem 9, Proposition 20, and Theorem 33 enable us to conclude this section with the following theorem.

Theorem 35. Let β satisfy β^{2} = aβ − 1, with a ∈ ℕ, a ⩾ 3. Parallel addition is possible on any alphabet of contiguous integers containing 0 of cardinality a, and this cardinality is minimal.

6.2 Base β root of X^{2} = aX + 1

Let us now study the numeration systems with base a quadratic Pisot unit with minimal polynomial f(X) = X^{2} − aX − 1, with a in ℕ, a ⩾ 1. The canonical alphabet of the numeration system related with this base by means of the Rényi expansion (greedy algorithm) is C = {0, …, a}, of cardinality #C = a + 1. The numeration system given by this type of quadratic base β, alphabet C, and the Rényi expansions is restricted only to such representations x = ∑_{j} x_{j}β^{j}, where the digits are from the alphabet C, but the representations must avoid any string of the form a1. This admissibility condition makes the numeration system non-redundant.

It is known, for bases β satisfying β^{2} = aβ + 1 with a ⩾ 1, that the set of real numbers with finite greedy expansion ⟨x⟩_{β} is closed under addition and subtraction [4]. Therefore,

{x ⩾ 0 | ⟨x⟩_{β} is finite } = F in_{A}(β) for any A ⊂ ℕ, A ⊃ C

and

{x ∈ ℝ | ⟨|x|⟩_{β} is finite } = F in_{A}(β) for any A ⊂ ℤ, A ⊃ C ∪ {−1}.

In order to obtain an algorithm for parallel addition, we must have some redundancy in the numeration system. As shown in Section 6.1, for the cases of base β satisfying β^{2} = aβ−1, it was sufficient to drop the one admissibility condition (given by the Rényi expansion), and parallelization was already possible (without adding any more elements into the alphabet C). The situation is not that simple for the bases satisfying β^{2} = aβ + 1. Nevertheless, addition in these two families of quadratic units is connected.

Proposition 36. Let β > 1 be a zero of the polynomial X^{2} −aX −1 with a in ℕ, a ⩾ 1, and let γ > 1 be a zero of the polynomial X^{2} − (a^{2} + 2)X + 1. If there exists an alphabet A and a p-local function performing in Fin_{A}(γ) addition in parallel, then there exists a (2p − 1)-local function performing in Fin_{A}(β) addition in parallel.

Proof. It is enough to realize that γ = β^{2}, and to apply Theorem 1 from [10].

Remark 37. According to the previous Section 6.1, we know that addition in base γ, the zero of the polynomial X^{2} −(a^{2} +2)X +1, can be performed in parallel on alphabet {−d, …, a^{2} + 1 − d} for any d ∈ {0, …, a^{2}}. Therefore, we immediately obtain an upper bound a^{2} + 2 on the cardinality of the alphabet allowing parallel addition in base β, the zero of the polynomial X^{2} − aX − 1.

In general, the upper bound given in Remark 37 is too rough. But for a = 1, i.e., for the base the golden ratio, it gives the precise value of cardinality of the minimal alphabet for parallel addition in this base, namely the cardinality #A = 3.

Corollary 38. Let β = \frac{1+\sqrt{5}}{2} be the golden ratio, zero of X^{2} −X −1. Addition in this base β can be performed in parallel on alphabet A = {0, 1, 2}, and also on alphabet A = {−1, 0, 1}. Both these alphabets are minimal.

Let us mention that this result for the alphabet {−1, 0, 1} was previously stated in [12]. Non-sufficiency of the alphabet {0, 1} for parallel addition was stated in [10].

In the sequel, we will consider only parameters a ⩾ 2. The lower bound on the cardinality of the alphabet of contiguous integers allowing parallel addition, given by Theorem 9 for bases β being zeros of polynomials X^{2} − aX − 1, is equal to |f(1)| + 2 = a + 2. We show that, in these cases, parallel addition is doable on any alphabet of contiguous integers containing 0 of cardinality a + 2.

For short, the positive zero of X^{2} − aX − 1 is denoted by β^{+}.

Algorithm GDE(β^{+}): Base β = β^{+} satisfying β^{2} = aβ + 1, a ⩾ 2, a ∈ ℕ, parallel conversion (greatest digit elimination) from {0, …, a + 2} to A = {0, …, a + 1}.

Input: a finite sequence of digits (z_{j}) of {0, …, a + 2}, with z = ∑ z_{j}β^{j}. Output: a finite sequence of digits (z_{j}) of {0, …, a + 1}, with z = ∑ z_{j}β^{j}.

for each j in parallel do

1. case \{ \begin{matrix}z_{j} = a + 2 \\ z_{j} = a + 1 and (z_{j+1} = 0 or z_{j−1} ⩾ a + 1) \\ z_{j} = a and z_{j+1} = 0 and z_{j−1} ⩾ a + 1 \end{matrix} \} then q_{j} := 1

if  z_{j} = 0 and z_{j+1} ⩾ a + 1 and z_{j−1} ⩽ a  then q_{j} := −1

else q_{j} := 0

2. z_{j} := z_{j} − aq_{j} − q_{j+1} + q_{j−1}

Proof. Let us denote again w_{j} = z_{j} − aq_{j}, and z_{j}^{new} = w_{j} − q_{j+1} + q_{j−1}.

• If z_{j} = a + 2, then w_{j} = 2. Since q_{j+1} ⩾ 0, we have −q_{j+1} + q_{j−1} ∈ {−2, …, 1}, and consequently, z_{j}^{new} ∈ {0, …, 3} ⊂ {0, …, a + 1} = A, using the fact that a ⩾ 2.

• For z_{j} = a + 1 and z_{j+1} = 0, we get w_{j} = 1. As q_{j+1} = 0, then z_{j}^{new} ∈ {0, 1, 2} ⊂ A.

• For z_{j} = a + 1 and z_{j−1} ⩾ a + 1, we obtain again w_{j} = 1. Since q_{j−1} ⩾ 0, then −q_{j+1} + q_{j−1} ∈ {−1, …, 2}, and consequently, z_{j}^{new} ∈ {0, …, 3} ⊂ {0, …, a + 1} = A, as a ⩾ 2.

• If z_{j} = a + 1 and z_{j+1} ⩾ 1 and z_{j−1} ⩽ a, then w_{j} = a + 1, q_{j−1} ⩽ 0 and q_{j+1} ⩾ 0. Therefore, z_{j}^{new} ∈ {a − 1, a, a + 1} ⊂ A.

• In the case of z_{j} = a and z_{j+1} = 0 and z_{j−1} ⩾ a + 1, we obtain w_{j} = 0. Since q_{j+1} ⩽ 0 and q_{j−1} ⩾ 0, the resulting z_{j}^{new} ∈ {0, 1, 2} ⊂ A.

• When z_{j} = a and z_{j+1} ⩾ 1, then w_{j} = a. Since q_{j+1} ⩾ 0 and q_{j−1} ⩾ 0, we obtain z_{j}^{new} ∈ {a − 1, a, a + 1} ⊂ A.

• When z_{j} = a and z_{j−1} ⩽ a, then again w_{j} = a. This time, q_{j−1} = 0, so consequently, z_{j}^{new} ∈ {a − 1, a, a + 1} ⊂ A.

• If z_{j} = 0 and z_{j+1} ⩾ a + 1 and z_{j−1} ⩽ a, then w_{j} = a. Since q_{j+1} ⩾ 0 and q_{j−1} ⩾ 0, we obtain z_{j}^{new} ∈ {a − 1, a, a + 1} ⊂ A.

• For z_{j} = 0 and z_{j+1} ⩽ a, we get w_{j} = 0, q_{j+1} ⩽ 0, and q_{j−1} ⩾ 0. Therefore, the resulting z_{j}^{new} ∈ {0, 1, 2} ⊂ A.

• If z_{j} = 0 and z_{j−1} ⩾ a + 1, then w_{j} = 0 and q_{j−1} = 1. Consequently, z_{j}^{new} ∈ {0, 1, 2} ⊂ A.

• For the cases when z_{j} ∈ {1, …, a − 1}, we have q_{j} = 0 and q_{j−1} ⩾ 0, so consequently, z_{j}^{new} ∈ {0, …, a + 1} = A.

Note that, for z_{j} = 0, we can only obtain q_{j} ≠ 0 when its neighbor z_{j+1} is greater than zero. Therefore, it is ensured that the algorithm cannot assign a string of non-zeros to a string of zeros. The output value z is equal to the input value z thanks to the fact that the base β satisfies the equation β^{j+2} = aβ^{j+1} + β^{j} for any j ∈ ℤ. The output digit z_{j}^{new} depends on input digits (z_{j+2}, …, z_{j−2}), so this conversion from {0, …, a + 2} to A = {0, …, a + 1} is a (2, 2)-local function.

Using Proposition 18 we can conclude that addition in Fin_{A}(β) can be performed in parallel over the alphabet {0, 1, …, a + 1}.

Let us now consider alphabet containing positive and negative digits. For any d ∈ {1, …, a}, denote

A_{−d} = {−d, …, 0, …, a − d + 1} .

The previous Algorithm GDE(β^{+}) applied to the infinite sequence u = ^{ω}h • h^{ω} gives the infinite sequence φ(u) = ^{ω}h • h^{ω} = u for any h ∈ {0, …, a}. Thus, for any d ∈ {1, 2, …, a}, both letters d and a + 1 − d are fixed by φ. According to Corollary 24, the alphabet A_{−d} allows parallelism of addition. Summarizing this reasoning, together with Algorithm GDE(β^{+}), Corollary 38, and Proposition 20, we obtain the following result.

Theorem 39. Let β satisfy β^{2} = aβ + 1, with a ⩾ 1, a ∈ ℕ. Parallel addition is possible on any alphabet of contiguous integers containing 0, such that its cardinality is a + 2. The cardinality a + 2 is minimal.

7 Rational bases

Let us now consider the base β = ±a/b, with a, b being co-prime positive integers fulfilling a > b ⩾ 1. When b = 1, we obtain the case of positive integer base β = a ∈ ℕ, a ⩾ 2, or the case of negative integer base β = −a ∈ ℕ, a ⩾ 2 with the minimal cardinality of the alphabet for parallel addition being equal to a+1, see Sections 5.1 and 5.2. For b ⩾ 2, the base β is an algebraic number which is not an algebraic integer, so Theorem 9 cannot be applied here to establish a lower bound on the cardinality of the alphabet for parallel addition. Theorem 6 can be used for β = a/b, however it is not very useful here either; the lower bound given there is equal to ⌈a/b⌉, which is too small for parallel addition, as is shown below.

In general, an alphabet A allows parallel addition only if the numbers with finite representation are closed under addition, in particular, any non-negative integer must have a finite representation. This requirement already forces the alphabet to be big enough. By a modification of the Euclidean division algorithm, any non-negative integer can be given a unique finite expansion in base β = a/b, and any integer has a unique finite expansion in base β = −a/b, over the alphabet C = {0, …, a − 1}, see [11] and [1].

As we shall see, even this alphabet is too small. For both positive base β = a/b and negative base β = −a/b, the cardinality of the alphabet actually needed for parallel addition is at least a + b. On the alphabet A = {0, 1, …, a + b − 1}, we can perform parallel addition in the base β = a/b and β = −a/b as well.

But surprisingly, these two types of bases differ substantially if we consider alphabets containing {−1, 0, 1}.

7.1 Positive rational base

Proposition 40. Parallel addition in base β = a/b, with a and b co-prime positive integers such that a > b ⩾ 1, is possible on A = {0, …, a + b − 1}.

Proof. We give a parallel algorithm Algorithm GDE(a/b): {0, …, a+b} → {0, …, a+b−1} for greatest digit elimination.

Algorithm GDE(a/b): Base β = a/b, with a > b ⩾ 1, a and b co-prime positive integers, parallel conversion (greatest digit elimination) from {0, …, a + b} to {0, …, a + b − 1}.

Input: a finite sequence of digits (z_{j}) of {0, …, a + b}, with z = ∑ z_{j}β^{j}. Output: a finite sequence of digits (z_{j}) of {0, …, a + b − 1}, with z = ∑ z_{j}β^{j}.

for each j in parallel do

1. if a ⩽ z_{j} ⩽ a + b then q_{j} := 1

else q_{j} := 0

2. z_{j} := z_{j} − aq_{j} + bq_{j−1}

Denoting w_{j} := z_{j} − aq_{j}, we clearly obtain 0 ⩽ w_{j} ⩽ a − 1. Thus, after Step 2 of the algorithm, z_{j}^{new} = w_{j} + bq_{j−1} belongs to {0, …, a + b − 1}. This algorithm assigns q_{j} ≠ 0 only in the cases of z_{j} ≠ 0, so it cannot produce a string of non-zeros from a string of zeros. The output value z equals the input value z thanks to the fact that bβ^{j+1} − aβ^{j} = 0 for any j ∈ ℤ. So the algorithm is correct.

Thus the result follows from Algorithm GDE(a/b) and Proposition 18.

Proposition 41. In base β = a/b, with a and b co-prime positive integers such that a > b ⩾ 1, parallel addition is possible on any alphabet of cardinality a + b A_{−d} = {−d, …, 0, …, a + b − d − 1} with b ⩽ d ⩽ a − 1.

Proof. Algorithm GDE(a/b) applied to the bi-infinite sequence u = ^{ω}h • h^{ω} gives the biinfinite sequence φ(u) = ^{ω}h • h^{ω} for any h ∈ {0, …, a − 1}. Thus for any d ∈ {b, b + 1, …, a − 1}, both letters d and a + b − 1 − d are fixed by φ. According to Corollary 24, the alphabet A_{−d} allows parallelism of addition.

So the question is now: what happens for alphabets A_{−d} when d ⩾ a or d ⩽ b − 1? First recall a well known fact.

Fact 1. Let ^{ω}0c_{k} ⋯ c_{0} • c_{−1} ⋯ c_{−ℓ}0^{ω} and ^{ω}0d_{k} ⋯ d_{0} • d_{−1} ⋯ d_{−ℓ}0^{ω}, k, ℓ ⩾ 0, be two representations in base β = a/b of the same number in ℤ[β]. Then the polynomial (c_{k} − d_{k})X^{k} + ⋯ + (c_{0} − d_{0}) + ⋯ + (c_{−ℓ} − d_{−ℓ})X^{−ℓ} is a multiple of bX − a in ℤ[X, X^{−1}]. Thus there exist s_{k−1}, s_{k−2}, …, s_{0}, s_{−1}, …, s_{−ℓ} ∈ ℤ such that

c_{k} − d_{k} = bs_{k−1} ,  (19)

c_{j} − d_{j} = −as_{j} + bs_{j−1} for any k − 1 ⩾ j ⩾ −ℓ + 1 ,  (20)
c_{−ℓ} − d_{−ℓ} = −as_{−ℓ} .  (21)

Lemma 42. Let D = {m, …, 0, …, M} with m ⩽ −1 and M ⩾ 1, be an alphabet. If M < b then the greatest digit elimination from D ∪ {M + 1} to D is not a local function; if m > −b, then the smallest digit elimination from {m − 1} ∪ D to D is not a local function either.

Proof. Suppose that M < b and that the greatest digit elimination from D ∪{M +1} to D is a p-local function φ. Consider the digit M + 1, and suppose that M + 1 has a representation on D, of the form ^{ω}0d_{k} ⋯ d_{0} •d_{−1} ⋯ d_{−ℓ}0^{ω}, with 0 < k, 0 < ℓ (the values d_{k} = 0 and d_{−ℓ} = 0 are not excluded). By Fact 1, there exist integers s_{j} such that

• d_{0} = M + 1 + as_{0} − bs_{−1}

• for 1 ⩽ j ⩽ k − 1, d_{j} = as_{j} − bs_{j−1}

• d_{k} = −bs_{k−1}

• for 1 ⩽ j ⩽ ℓ − 1, d_{−j} = as_{−j} − bs_{−j−1}

• d_{−ℓ} = as_{−ℓ}.

Since d_{k} = −bs_{k−1} ∈ D and M < b, s_{k−1} ⩾ 0. Then d_{k−1} = as_{k−1} − bs_{k−2} ⩾ −bs_{k−2} ∈ D implies that s_{k−2} ⩾ 0. Similarly, s_{k−3} ⩾ 0, …, s_{0} ⩾ 0. Since M ⩾ d_{0} = M + 1 + as_{0} − bs_{−1} ⩾ M + 1 − bs_{−1}, we must have 1 − bs_{−1} ⩽ 0, hence s_{−1} ⩾ 1. On the other hand, b > d_{−ℓ} = as_{−ℓ} ∈ D implies that s_{−ℓ} ⩽ 0. Then b > d_{−ℓ+1} = as_{−ℓ+1} − bs_{−ℓ} ⩾ as_{−ℓ+1} implies s_{−ℓ+1} ⩽ 0. Similarly, s_{−ℓ+2} ⩽ 0, …, s_{−1} ⩽ 0, a contradiction. The case m < −b is analogous.

Corollary 43. In base β = a/b, with a and b co-prime positive integers such that a > b ⩾ 1, parallel addition is not possible on alphabets of positive and negative digits not containing {−b, …, 0, …, b}.

Note that in [12] we have given an alphabet of the form {−d, …, 0, …, d} on which parallel addition in base a/b is possible, with d = ⌈\frac{a−1}{2}⌉ + b.

Proposition 44. Let a and b be co-prime positive integers such that a > b ⩾ 1. The minimal alphabet of contiguous non-negative integers containing 0 allowing parallel addition in base β = a/b is A = {0, …, a + b − 1}.

Proof. Let us suppose that this statement is not valid, it means that there exists a p-local function φ : A^{ℤ} → B^{ℤ} which performs conversion in base β from A to B, where B = {0, …, a + b − 2}.

Let us fix n ∈ ℕ and q ∈ ℕ such that n > p and (\frac{a}{b})^{q} ⩾ \frac{a+b}{a−b}. Then the image of ω0(a − 1)^{n} • 0^{ω} by φ can be written in the form

φ(^{ω}0(a − 1)^{n} • 0^{ω}) = ^{ω}0w_{h}w_{h−1}w_{0} • w_{−1}w_{−2} … w_{−ℓ}0^{ω} ,  (22)

where w_{h} > 0, w_{−ℓ} ⩾ 0 and ℓ ⩾ 1.

Consider now the string ^{ω}0(a−1)^{n} •(a+b−1)(a+b−2)^{q}0^{ω}. Since φ is a p-local function and n > p, the image of this string coincides on the positions j ⩾ p with the image of the string ^{ω}0(a − 1)^{n} • 0^{ω}. Therefore we can write

φ(^{ω}0(a − 1)^{n} • (a + b − 1)(a + b − 2)^{q}0^{ω}) = ^{ω}0v_{h}v_{h−1}v_{0} • v_{−1}v_{−2} … v_{−m}0^{ω} , (23)

where w_{h} = v_{h} > 0, v_{−m} ⩾ 0 and m > q + 1.

We will discuss the value of the index h in the above equalities.

Case h ⩾ n At first we focus on the equality (22) and apply Fact 1 to the string^{ω}0(a−1)^{n}• 0^{ω} in the role of^{ω}0c_{k} ⋯ c_{0}•c_{−1} ⋯ c_{−ℓ}0^{ω} and to the string^{ω}0w_{h}w_{h−1}w_{0}•w_{−1}w_{−2} ⋯ w_{−ℓ}0^{ω} in the role of ^{ω}0d_{k} ⋯ d_{0} • d_{−1} ⋯ d_{−ℓ}0^{ω} with k = h. As both strings belong to B^{ℤ}, we obtain 0 > −w_{h} = bs_{h−1} which gives s_{h−1} ⩽ −1. By the same reason, we have for all j such that −ℓ + 1 ⩽ j ⩽ h − 1 the inequality

a − 1 ⩾ c_{j} − d_{j} = −as_{j} + bs_{j−1}

which gives the following implication

s_{j} ⩽ −1 ⟹ s_{j−1} ⩽ −1 , for − ℓ + 1 ⩽ j ⩽ h − 1 .

In particular, s_{−ℓ} ⩽ −1. Together with (21), we have

0 ⩾ −d_{−ℓ} = −as_{−ℓ} ⩾ a - a contradiction.

Case h ⩽ n − 1 Now we focus on the equality (23) and apply Fact 1 to the string ^{ω}0(a − 1)^{n} • (a + b − 1)(a + b − 2)^{q}0^{ω} in the role of ^{ω}0c_{k} ⋯ c_{0} • c_{−1} ⋯ c_{−ℓ}0^{ω} and to the string ω0v_{h}v_{h−1}v_{0} •v_{−1}v_{−2} ⋯ v_{−m}0^{ω} in the role of ^{ω}0d_{k} ⋯ d_{0} •d_{−1} ⋯ d_{−ℓ}0^{ω} with k = n−1 and ℓ = m > q + 1. For the index j = n − 1, Equality (19) implies −b + 1 ⩽ a − 1 − d_{n−1} = bs_{n−2} and thus s_{n−2} ⩾ 0. For indices j, where n − 2 ⩾ j ⩾ 0, Equality (20) gives

−b + 1 ⩽ a − 1 − d_{j} = −as_{j} + bs_{j−1} ⩽ a − 1 .

From the above inequality, we can derive the implication

s_{j} ⩾ 0 ⟹ s_{j−1} ⩾ 0 , for 0 ⩽ j ⩽ n − 2 .

In particular, s_{−1} ⩾ 0. For the index j = −1, Equality (20) gives

1 ⩽ a + b − 1 − d_{−1} = −as_{−1} + bs_{−2} and thus s_{−2} ⩾ 1 .

For indices −2 ⩾ j ⩾ −q − 1, we obtain

0 ⩽ a + b − 2 − d_{j} = −as_{j} + bs_{j−1} ⟹ s_{j−1} ⩾ \frac{a}{b}s_{j} .

In particular,

s_{−q−2} ⩾ (\frac{a}{b})^{q} s_{−2} ⩾ (\frac{a}{b})^{q} .  (24)

On the other hand, for the index −ℓ < −q − 1, Equality (21) sounds −as_{−ℓ} = −d_{−ℓ} ⩾ −a − b + 2, and thus s_{−ℓ} ⩽ 1. For indices j with −ℓ + 1 ⩽ j ⩽ −q − 2, one can deduce

−a − b < −d_{j} = −as_{j} + bs_{j−1} ⩽ 0  ⟹  s_{j} < 1 + \frac{b}{a} + \frac{b}{a}s_{j−1} .

The last inequality enables us to show by induction that

s_{j} < \frac{a+b}{a−b} for all j satisfying − ℓ ⩽ j ⩽ −q − 2 .  (25)

Indeed, s_{−ℓ} ⩽ 1 < \frac{a+b}{a−b} and for all j = −ℓ + 1, −ℓ + 2, …, −q − 2, we have

s_{j} < 1 + \frac{b}{a} + \frac{b}{a}s_{j−1} < 1 + \frac{b}{a} + \frac{b}{a} \frac{a+b}{a−b} = \frac{a+b}{a−b} .

Combining (25) for j = −q − 2 and (24), we get

\frac{a+b}{a−b} > s_{−q−2} ⩾ (\frac{a}{b})^{q} , a contradiction with the choice of q.

Both cases lead to a contradiction, and therefore a p-local function φ converting in base β from the alphabet A to B cannot exist.

Proposition 45. In base β = a/b, with a and b co-prime positive integers such that a > b ⩾ 1, parallel addition is not possible on any alphabet {−d, …, 0, …, a + b − d − 2} for 1 ⩽ d ⩽ a + b − 3, of cardinality a + b − 1.

Proof. If parallel addition were possible on {−d, …, 0, …, a + b − 2 − d}, then, by Proposition 18, the conversion φ from {−d−1, …, 0, …, a+b−1−d} to {−d, …, 0, …, a+b−2−d} would be a p-local function for some p. The proof is then analogous to that of Proposition 44, by considering the words^{ω}0(a−1−d)^{n}•(a+b−1−d)(a+b−2−d)^{q}0^{ω} and^{ω}0(a−1−d)^{n}•0^{ω}.

Summarizing the results for both the cases of alphabets, either with non-negative digits only, or with positive as well as negative digits, we have proved the following result:

Theorem 46. Let β = a/b be the base, with a and b co-prime positive integers such that a > b ⩾ 1, and let A be an alphabet (of contiguous integers containing 0) of the minimal cardinality allowing parallel addition in base β. Then, A has cardinality a + b, and A has the form

• A = {0, …, a + b − 1}, or A = {−a − b + 1, …, 0}, or

• A = {−d, …, 0, …, a + b − 1 − d} containing a subset {−b, …, 0, …, b}.

When b = 1, we recover the classical case of a positive integer base; see Section 5.1.

7.2 Negative rational base

Proposition 47. Parallel addition in base β = −a/b, with a and b co-prime positive integers such that a > b ⩾ 1, is possible on any alphabet (of contiguous integers) of the form A_{−d} = {−d, …, 0, …, a + b − 1 − d} with cardinality #A_{−d} = a + b, where d ∈ {0, …, a + b − 1}.

Proof. First, we show that parallel addition is possible on the alphabet A_{0} = {0, …, a+b−1}, by providing an algorithm for the greatest digit elimination GDE(−a/b): {0, …, a + b} → {0, …, a + b − 1}:

Algorithm GDE(−a/b): Base β = −a/b, with a > b ⩾ 1, a and b co-prime positive integers, parallel conversion (greatest digit elimination) from {0, …, a + b} to {0, …, a + b − 1}.

Input: a finite sequence of digits (z_{j}) of {0, …, a + b}, with z = ∑ z_{j}β^{j}. Output: a finite sequence of digits (z_{j}) of {0, …, a + b − 1}, with z = ∑ z_{j}β^{j}.

for each j in parallel do

1. case \{ \begin{matrix}z_{j} = a + b \\ a ⩽ z_{j} ⩽ a + b − 1 and 0 ⩽ z_{j−1} ⩽ b − 1 \end{matrix} \} then q_{j} := 1

if  0 ⩽ z_{j} ⩽ b − 1 and a ⩽ z_{j−1} ⩽ a + b  then q_{j} := −1

else q_{j} := 0

2. z_{j} := z_{j} − aq_{j} − bq_{j−1}

Using our familiar notion of w_{j} = z_{j} −aq_{j}, and z_{j}^{new} = w_{j} −bq_{j−1}, we describe the various cases that can occur during the course of this algorithm:

• If z_{j} = a + b, we obtain w_{j} = b, and then z_{j}^{new} ∈ b − b · {−1, 0, 1} = {0, b, 2b} ⊂ {0, …, a + b − 1} = A_{0}.

• For z_{j} ∈ {a, …, a + b − 1} and z_{j−1} ∈ {0, …, b − 1}, we have q_{j} = 1, and consequently w_{j} ∈ {0, …, b−1}. As q_{j−1} ∈ {−1, 0}, we finally get z_{j}^{new} ∈ {0, …, b−1}−b·{−1, 0} = {0, …, 2b − 1} ⊂ {0, …, a + b − 2} ⊂ A_{0}.

• For z_{j} ∈ {a, …, a + b − 1} and z_{j−1} ∈ {b, …, a + b}, we have q_{j} = 0, so we keep w_{j} ∈ {a, …, a+b−1}. Now q_{j−1} ∈ {0, 1}, and thus z_{j}^{new} ∈ {a, …, a+b−1}−b·{0, 1} = {a − b, …, a + b − 1} ⊂ {1, …, a + b − 1} ⊂ A_{0}.

• In the case of z_{j} ∈ {b, …, a − 1}, simply q_{j} = 0, w_{j} ∈ {b, …, a − 1}, and the resulting z_{j}^{new} ∈ {b, …, a − 1} − b · {−1, 0, 1} ⊂ {0, …, a + b − 1} = A_{0}.

• When z_{j} ∈ {0, …, b − 1} and z_{j−1} ∈ {0, …, a − 1}, we have q_{j} = 0, so we keep w_{j} ∈ {0, …, b − 1}, and q_{j−1} ∈ {−1, 0}. Therefore, we obtain z_{j}^{new} ∈ {0, …, b − 1} − b · {−1, 0} = {0, …, 2b − 1} ⊂ {0, …, a + b − 2} ⊂ A_{0}.

• Lastly, when z_{j} ∈ {0, …, b − 1} and z_{j−1} ∈ {a, …, a + b}, by means of q_{j} = −1 we get w_{j} ∈ {a, …, a + b − 1}. As q_{j−1} ∈ {0, 1}, then z_{j}^{new} ∈ {a, …, a + b − 1} − b · {0, 1} = {a − b, …, a + b − 1} ⊂ A_{0}.

Again, we must not forget to mention that the digit z_{j} = 0 is transformed by this algorithm onto another digit (by means of q_{j} ≠ 0) only if its neighbour z_{j−1} is non-zero, namely from the set {a, …, a + b}; thereby, it is ensured that the algorithm cannot assign a string of non-zeros to a string of zeros. The output value z is equal to the input value z, since the base β fulfils the equality bβ^{j+1} + aβ^{j} = 0 for any j ∈ ℤ. Thus, we see that this algorithm is correct for the greatest digit elimination from the alphabet A_{0} ∪ {a + b} into A_{0} = {0, …, a + b − 1}.

Now let us point out that all the elements d ∈ {0, …, a + b − 1} are fixed by the plocal function φ given by this algorithm, in the sense that φ(^{ω}d • d^{ω}) = (^{ω}d • d^{ω}). This fact, together with Corollary 24, implies that parallel addition in the negative rational base β = −a/b is possible on any alphabet of the form A_{−d} = {−d, …, 0, …, a + b − 1 − d}, with cardinality #A_{−d} = a + b.

Also in the negative case β = −a/b, for b = 1 we recover the classical case of a (negative) integer base; see Section 5.2.

Since we do not have any lower bound for this base, we must find one directly.

Proposition 48. Let A = {m, …, 0, …, M} with m ⩽ 0 ⩽ M be an alphabet of contiguous integers which enables parallel addition in base β = −a/b, with a and b co-prime positive integers, a > b ⩾ 1. Then #A ⩾ a + b.

Proof. Without loss of generality, we may assume that 1 ⩽ M. Let φ be a p-local function realizing parallel conversion from A∪{M +1} into A using the mapping Φ : (A∪{M +1})^{p} → A. Put x = M + 1 and y = Φ(x^{p}). According to Claim 10, we have

y − x = (−\frac{a}{b} − 1) ∑_{k=0}^{n} c_{k}(−\frac{a}{b})^{k} for some n ∈ ℕ and c_{k} ∈ ℤ.  (26)

Multiplying the previous equation by −b^{n+1}, one gets

(x − y)b^{n+1} = (a + b) ∑_{k=0}^{n} c_{k}(−a)^{k}b^{n−k},

and consequently, the number a + b divides (x − y)b^{n+1}. As a and b are co-prime, necessarily a + b divides x − y. Since x − y > 0, there exists k ∈ ℕ such that x − y = k(a + b) ⩾ a + b. But simultaneously, x − y ⩽ M + 1 − m = #A. Putting these two inequalities together, we obtain a + b ⩽ #A.

We can summarize this section in the following theorem.

Theorem 49. In base β = −a/b, with a and b co-prime positive integers, a > b ⩾ 1, parallel addition can be performed in any alphabet A of contiguous integers containing 0 with cardinality #A = a + b. This cardinality cannot be reduced.

8 Conclusions and comments

Here is a summary of the numeration systems studied in this paper. We have considered only alphabets of contiguous integers containing 0.

Base Canonical alphabet Minimal alphabet for parallel ad-

dition

b ⩾ 2 integer {0, …, b − 1} All alphabets of size b + 1 −b, b ⩾ 2 integer {0, …, b − 1} All alphabets of size b + 1 \sqrt[k]{b}, b ⩾ 2 integer All alphabets of size b + 1

−1 + ı  {0, 1}  All alphabets of size 5
2ı  {0, …, 3}  All alphabets of size 5
ı\sqrt{2}  \{0, 1\}  All alphabets of size 3
β^{2} = aβ − 1  {0, …, a − 1}  All alphabets of size a
β^{2} = aβ + 1  {0, …, a}  All alphabets of size a + 2
a/b  {0, …, a − 1}  {0, …, a + b − 1}, {−a − b +

1, …, 0}, and all alphabets of size a+b containing {−b, …, 0, …, b}

−a/b  {0, …, a − 1}  All alphabets of size a + b

Generalization of these results to other bases remains an open problem. The cases of the Tribonacci numeration system with basis satisfying the equation X^{3} = X^{2} + X + 1, or quadratic bases satisfying the equation X^{2} = aX ± b, b ⩾ 2, are not so straightforward. The reason is that we have only two tools so far, namely Theorems 9 and 6, which provide us with lower bounds on the cardinality of the alphabet. For the bases listed in the summary table, the bounds given in these theorems were attained, with the only exception being the rational bases β = ±a/b, for which we had to refine our methods specifically in order to prove minimality of the alphabets. These examples show that, for attacking the question of minimality of alphabet for other bases, we need to find stronger versions of Theorems 9 and 6.

The positive rational base β = a/b is exceptional among our results for another property as well. Contrary to the other bases, not all alphabets of contiguous integers (containing 0) with sufficiently large cardinality allow parallel addition.

As mentioned in Remark 30, for alphabets which are too small to allow parallel addition in a given base, one can consider a more general concept of the so-called k-block p-local functions. It means that, instead of a base β and an alphabet A, we consider addition in base β^{k} and over the alphabet A_{k} = {∑_{j=0}^{k−1} a_{j}β^{j} | a_{j} ∈ A}. Our interest in addition in base β can be extended to the question: what is the minimal size of an alphabet A and the minimal size k of the blocks such that addition can be performed by a k-block p-local function? This question was not tackled here at all. In [19], the precise definition of k-block p-local function and a relation between A and k can be found.

9 Acknowledgements

This work was supported by the Czech Science Foundation grants GAČR 201/09/0584 and 13-03538S.

References

[1] S. Akiyama, Ch. Frougny, and J. Sakarovitch, Powers of rationals modulo 1 and rational base number systems, Israel J. Math. 168 (2008), 53–91.

[2] S. Akiyama and K. Scheicher, Symmetric shift radix systems and finite expansions, Math. Pannonica 18 (2007), 101–124.

[3] A. Avizienis, Signed-digit number representations for fast parallel arithmetic, IRE Trans. Electron. Comput. 10 (1961), 389–400.

[4] Č. Burdík, Ch. Frougny, J. P. Gazeau, and R. Krejcar, Beta-integers as natural counting systems for quasicrystals, J. Physics A: Math. Gen. 31 (1998), 6449–6472.

[5] A. Burks, H. H. Goldstine, and J. von Neumann, Preliminary discussion of the logic design of an electronic computing instrument, Institute for Advanced Study, Princeton, NJ, 1946.

[6] A. Cauchy, Sur les moyens d’éviter les erreurs dans les calculs numériques, C. R. Acad. Sci. Paris (Série I) 11 (1840), 789–798.

[7] C. Y. Chow and J. E. Robertson, Logical design of a redundant binary adder, in Proc. 4th IEEE Symposium on Computer Arithmetic, 1978, pp. 109–115.

[8] M. D. Ercegovac and T. Lang, Digital Arithmetic, Morgan Kaufmann, 2004.

[9] P. Erdős and V. Komornik, Developments in non-integer bases, Acta Math. Hungar. 79 (1998), 57–83.

[10] Ch. Frougny, On-line finite automata for addition in some numeration systems, RAIRO-Theor. Inf. Appl. 33 (1999), 79–101.

[11] Ch. Frougny and K. Klouda, Rational base number systems for p-adic numbers, RAIRO-Theor. Inf. Appl. 46 (2012), 87–106.

[12] Ch. Frougny, E. Pelantová, and M. Svobodová, Parallel addition in non-standard numeration systems, Theor. Comput. Sci. 412 (2011), 5714–5727.

[13] Ch. Frougny and J. Sakarovitch, Number representation and finite automata, in V. Berthé, M. Rigo, eds., Combinatorics, Automata and Number Theory, Encyclopedia of Mathematics and its Applications, Vol. 135, Cambridge University Press, 2010, Chapter 2, pp. 34–107.

[14] V. Grünwald, Intorno all’aritmetica dei sistemi numerici a base negativa con particolare riguardo al sistema numerico a base negativo-decimale per lo studio delle sue analogie coll’aritmetica ordinaria (decimale), Giornale di Matematiche di Battaglini 367 (1885), 203–221.

[15] Y. Herreros, Contribution à l’arithmétique des ordinateurs, Ph. D. dissertation, Institut National Polytechnique de Grenoble, 1991.

[16] S. Ito and T. Sadahiro, (−β)-expansions of real numbers, INTEGERS 9 (2009), 239– 259.

[17] Ch. Kalle and W. Steiner, Beta-expansions, natural extensions and multiple tilings associated with Pisot units, Trans. Amer. Math. Soc. 364 (2012), 2281–2318.

[18] D. E. Knuth, An imaginary number system, Commun. ACM 3 (1960), 245–247.

[19] P. Kornerup, Necessary and sufficient conditions for parallel, constant time conversion and addition, in Proc. 14th IEEE Symposium on Computer Arithmetic, 1999, pp. 152– 155.

[20] D. Lind and B. Marcus, An Introduction to Symbolic Dynamics and Coding, Cambridge University Press, 1995.

[21] Ch. Mazenc, On the redundancy of real number representation systems, Research Report 93-16, LIP, École Normale Supérieure de Lyon, 1993.

[22] A. M. Nielsen and J.-M. Muller, Borrow-save adders for real and complex number systems, in Proc. Real Numbers and Computers, Marseilles, 1996, pp. 121–137.

[23] B. Parhami, On the implementation of arithmetic support functions for generalized signed-digit number systems, IEEE Trans. Computers 42 (1993), 379–384.

[24] W. Parry, On the β-expansions of real numbers, Acta Math. Acad. Sci. Hungar. 11 (1960), 401–416.

[25] W. Penney, A “binary” system for complex numbers, J. ACM 12 (1965), 247–248.

[26] A. Rényi, Representations for real numbers and their ergodic properties, Acta Math. Acad. Sci. Hungar. 8 (1957), 477–493.

2010 Mathematics Subject Classification: Primary 68W10; Secondary 68R15. Keywords: numeration system, addition, parallel algorithm, algebraic number, digit set.

Received August 4 2012; revised version received February 10 2013. Published in Journal of Integer Sequences, March 2 2013.

Return to Journal of Integer Sequences home page.