Integer Complexity, Addition Chains, and Well-Ordering

Total Page:16

File Type:pdf, Size:1020Kb

Integer Complexity, Addition Chains, and Well-Ordering Integer Complexity, Addition Chains, and Well-Ordering by Harry J. Altman A dissertation submitted in partial fulfillment of the requirements for the degree of Doctor of Philosophy (Mathematics) in the University of Michigan 2014 Doctoral Committee: Professor Jeffrey C. Lagarias, Chair Professor Alexander Barvinok Professor Andreas R. Blass Associate Professor Kevin J. Compton Professor Martin J. Strauss For my grandparents ii Acknowledgments The author is grateful to Joshua Zelinsky, who originally suggested the subject of integer complexity, and together with whom much of the work in Chapter 2 was conducted. The author is grateful to Juan Arias de Reyna for much helpful discussion regard- ing integer complexity { improving notation, clarifying statements, and providing shorter proofs than the author's of the lower bound in Proposition 3.6.3 and the k = 1 case of Lemma 2.4.5. The author is grateful to his advisor Jeffrey C. Lagarias, for suggesting the ad- ditional topic of addition chains, for pointing out the relations to computational complexity issues, and for much helpful discussion. The author thanks in addition the following people: J. Iraids and K. Podnieks for providing much helpful numerical data; Andreas Blass, Paul Pollack, and Mike Bennett for suggesting references; E. H. Brooks for discussion regarding some of the proofs in Chapter 5; J. Heidi Soderstrom for help translating references into English; and A. Mishchenko for providing his LATEX files for his dissertation, from which the formatting of this dissertation has largely been copied. iii Preface A note to the reader: The bulk of this thesis, Chapters 2 through 5, were originally written as separate papers (the paper which became Chapter 2 was co-authored with J. Zelinsky). As such, each has its own individual abstract in addition to the over- all abstract, and the initial few sections of each chapter repeat much information from previous chapters. Appendix A was originally an appendix to Chapter 3, and Appendices B and C were originally appendices to Chapter 5. iv Contents Dedication ii Acknowledgments iii Preface iv List of Tables viii List of Figures ix List of Appendices x Abstract xi Chapter 1 Introduction 1 1.1 Notions of complexity for natural numbers . 1 1.2 Main results: Integer complexity . 8 1.3 Main results: Addition chains . 12 1.4 Other notions of complexity . 15 1.5 Plan of this thesis . 18 2 Numbers with Integer Complexity Close to the Lower Bound 19 2.1 Introduction . 19 2.2 Properties of the defect . 25 2.3 Good factorizations and solid numbers . 29 2.4 The Classification Method . 32 2.5 Determination of all elements of defect below a given bound r . 38 2.6 Applications . 49 3 Integer Complexity and Well-Ordering 54 3.1 Introduction . 54 3.2 Properties of the defect . 60 3.3 Stable defects and stable complexity . 63 3.4 Low-defect polynomials . 65 3.5 Facts from order theory and topology . 74 3.6 Well-ordering of defects . 78 v 3.7 Variants of the main theorem . 82 4 Addition Chains and Well-Ordering 87 4.1 Introduction . 87 4.2 Comparison of addition chain complexity and integer complexity . 95 4.3 The A-defect and A-stabilization . 97 4.4 Bit-counting in numbers of small defect . 101 4.5 Cutting and pasting well-ordered sets . 103 4.6 Well-ordering of defects . 105 4.7 Bounds on order type for small A-defect values . 109 4.8 Concluding Remarks . 112 5 Integer Complexity: Computational Methods and Results 113 5.1 Introduction . 113 5.2 The defect, stability, and low-defect polynomials . 123 5.3 Further notes on stabilization and stable complexity . 132 5.4 Low-defect expressions, the nesting ordering, and structure of low- defect polynomials . 133 5.5 The truncation operation . 149 5.6 Algorithms: Computing good coverings . 158 5.7 Algorithms: Computing stabilization length K(n) and stable com- plexity knkst .............................. 165 5.8 Results of computation . 174 6 Open problems and future research 177 6.1 Additional structure in the defect set . 177 6.2 Generalization to addition-multiplication chains . 180 6.3 Complexity based on a number other than 1 . 180 6.4 Further stabilization hypotheses . 181 6.5 Instability . 182 6.6 Counting problems . 184 6.7 Computability and complexity-theoretic problems . 185 6.8 Remaining computational problems . 186 Appendix A Conjectures of J. Arias de Reyna 187 B Good coverings of closed intervals 189 C Implementation notes 192 D Leaders with defect at most 1 195 vi References 196 vii List of Tables 5.1 Numbers that seem to have unusual drop patterns . 122 6.1 Numbers that seem to have unusual drop patterns . 183 D.1 Leaders of defect at most 1 . 195 viii List of Figures Figure 1.1 A tree for n = 11 using 8 ones and of height 3 . 18 Figure 3.1 Illustration of substitution into a low-defect polynomial . 57 Figure 3.2 Illustration of substitution of 30 into a low-defect polynomial . 69 Figure 5.1 Illustration of low-defect tree . 135 Figure 5.2 Two different trees yielding the polynomial 4x + 2 . 139 Figure 5.3 Illustration of bijection between variables and non-root vertices . 140 ix List of Appendices Appendix A: Conjectures of J. Arias de Reyna . 187 Appendix B: Good coverings of closed intervals . 189 Appendix C: Implementation notes . 192 Appendix D: Leaders with defect at most 1 . 195 x Abstract In this dissertation we consider two notions of the \complexity" of a natural num- ber, the first being addition chain length, and the second known simply as \integer complexity". The integer complexity of n, denoted knk, is the smallest number of 1's needed to write n using an arbitrary combination of addition and multiplication. It is known that knk ≥ 3 log3 n for all n. We consider the difference δ(n) := knk − 3 log3 n, which we call the defect of n. We consider the set of all defects { the set D := fδ(n): n 2 Ng: We show that, as a subset of the real numbers, D is well-ordered, with order type !!; we also show the same for several variants of this set. Moreover, we show that, for k ≥ 1 a natural number, D \ [0; k) has order type precisely !k. We also use the defect to prove stabilization results about knk. Specifically, for any n, there exists K = K(n) such that for k ≥ K, we have δ(3kn) = δ(3K n): We call K(n) the stabilization length of n. Finally, we provide a way of, given r > 0, computing all numbers n with δ(n) < r. We use this to show that the stabilization length K(n) is effectively computable. The algorithm is also, empirically, much faster than existing methods for computing k2kk, and we use it to prove that k2k3`k = 2k + 3` for 0 ≤ k ≤ 48 and ` ≥ 0, with k and ` not both 0. In parallel to our results for integer complexity, we also consider addition chain length. An addition chain for n is defined to be a sequence (a0; a1; : : : ; ar) such that a0 = 1, ar = n, and, for any k with 1 ≤ k ≤ r, there exist 0 ≤ i; j < k such that ak = ai + aj; the number r is called the length of the addition chain. The shortest xi length among addition chains for n, called the addition chain length of n, is denoted `(n). The number `(n) is always at least log2 n. ` We consider the difference δ (n) := `(n) − log2 n, which we call the addition-chain defect of n, and the set of all addition-chain defects ` ` D := fδ (n): n 2 Ng: We show that D ` is also a well-ordered set with order type !!. We also use the defect to prove stabilization results about `(n); specifically, for any n, there exists K0 = K0(n) such that for k ≥ K0, we have δ(2kn) = δ`(2K0 n): xii Chapter 1 Introduction 1.1 Notions of complexity for natural numbers In this dissertation we will consider the complexity of computing natural numbers under some simple computational models. When we speak of computing a natural number, we mean building it up in some finite number of steps from the number 1, which is the most basic of all natural numbers and generates all the others. There are various models of computation we could turn our attention to, but we will focus on two: One is known as \integer complexity" (Section 1.1.1), and the other is that of addition chains (Section 1.1.2). Some of the others will be briefly discussed in Section 1.4. In all these cases, we are discussing building up natural numbers from the number 1; what we vary is what tools are allowed. Of course, every natural number n can be written as the sum of n ones, and if we only allow the use of addition, it is impossible to do better, so this is not a very interesting model; something more is needed to allow shorter, less obvious ways of writing n. Thus we define the integer complexity of a natural number n to be the least number of 1's needed to write it using any combination of addition and multiplication, with the order of the operations specified using parentheses grouped in any legal nesting. For instance, 11 has complexity of 8, since it can be written using 8 ones as 11 = (1 + 1 + 1)(1 + 1 + 1) + 1 + 1; but not with any fewer. This notion was implicitly introduced in 1953 by Kurt Mahler and Jan Popken [38]; they actually considered an inverse function, the size of the largest number representable using k copies of the number 1.
Recommended publications
  • Optimal Addition Chains and the Scholz Conjecture Zara Siddique December 8, 2015
    Optimal Addition Chains and the Scholz Conjecture Zara Siddique December 8, 2015 1 Introduction An addition chain can be described as sequence of natural numbers (starting at 1), such that each element is the sum of two numbers previously in the sequence. This can be written mathematically as: v = (v0; :::; vs); with v0 = 1 and vs = n for each vi holds: vi = vj + vk where 0 ≤ j; k ≤ i − 1 [1] An optimal addition chain refers to the addition chain of shortest length for n, denoted l(n). For example, l(5) = 3 (since the shortest chain is 1 + 1 = 2, 2 + 2 = 4, 4 + 1 = 5). [2] A key application of this is addition-chain exponentiation, where the optimal addition chain can be used to calculate positive integer powers with a minimal number of multiplications. Figure 1: The first 10 addition chains: for both the highlighted addition chains, n = 4, however there exists an optimal chain [3]. 2 Finding the length of the optimal addition chain The difficulty in finding optimal addition chains is that there is no way to calculate one directly (yet). For example, consider the following addition chains for n = 15: l(15) = (1, 2, 4, 8, 12, 13, 15) = 6 l(15) = (1, 2, 3, 6, 12, 15) = 5 While it intuitively makes sense to calculate the largest number possible to get closer to n, this example shows that early on in the addition chain, small unpredictable changes can affect the final length. To get around this problem, the code below calculates every possible addition chain, and (if n is found,) compares the length of all addition chains containing n to find the one of shortest length.
    [Show full text]
  • Addition Chains
    Addition chains Pierre Castéran LaBRI, Univ. Bordeaux, CNRS UMR 5800, Bordeaux-INP September 5, 2020 DRAFT 2 Contents 1 Introduction 5 2 Smart Computation of xn 9 2.1 Introduction . 9 2.2 Some basic implementations . 9 2.2.1 A semi-naive algorithm . 10 2.2.2 A truly logarithmic exponentiation function . 11 2.2.3 Examples of computation . 12 2.2.4 Formal specification of an exponentiation function: a first attempt . 14 2.3 Representing Monoids in Coq . 15 2.3.1 A common notation for multiplication . 15 2.3.2 The Monoid Type Class . 17 2.3.3 Building Instances of Monoid ................ 17 2.3.4 Matrices on a semi-ring . 19 2.3.5 Monoids and Equivalence Relations . 20 2.4 Computing Powers in any EMonoid . 22 2.4.1 The naive (linear) Algorithm . 23 2.4.2 The Binary Exponentiation Algorithm . 24 2.4.3 Refinement and Correctness . 24 2.4.4 Proof of correctness of binary exponentiation w.r.t. the function power ........................ 25 2.4.5 Equivalence of the two exponentiation functions . 26 2.5 Comparing Exponentiation Algorithms with respect to Efficiency 27 2.5.1 Addition chains . 28 2.5.2 A type for addition chains . 29 2.5.3 Chains as a (small) programming language . 32 2.6 Proving a chain’s correctness . 33 2.6.1 Proof by rewriting . 34 2.6.2 Correctness Proofs by Reflection . 35 2.6.3 reflection tactic . 38 2.6.4 Chain correctness for —practically — free! . 39 2.7 Certified Chain Generators . 43 2.7.1 Definitions .
    [Show full text]
  • A Survey of Addition Chain Algorithms
    A Survey of Addition Chain Algorithms Thomas Schibler [email protected] Department of Computer Science University of California Santa Barbara June 13, 2018 Abstract Modular exponentiation appears as a necessary computational tool in many cryptographic systems. Specifically, given modulus n, base b and exponent e, exponentiation computes be mod n through repeated multiplications. To minimize the number of such multiplications, an addition chain of exponents is computed, such that each exponent in the chain can be expressed as the sum of two previous exponents. While the problem of finding a minimal addition chain for a given exponent e is widely thought to be intractable, many algorithms exist to find short chains. We survey a variety of addition chain algorithms, focusing on those which partition the bit representation of the target exponent into manageable sized blocks. 1 Introduction Addition Chains are an important tool in cryptographic settings, particularly for public key cryptography algorithms like RSA, in which fast modular exponentiation is a must. For background, modular exponentiation involves computing the value be mod n for some base b, exponent e, and modulus n. While in general the value of be can grow unbounded particularly as e becomes large, be mod n can never exceed the value of n. Naturally, we want to compute the modular result without having to deal with such large numbers. Indeed, in crypto settings the raw value be would often exceed any feasible memory limit. Fortunately, we have the identity, c mod n = (a mod n) · (b mod n) if a = b · c. Therefore for modular exponentiation, decomposing the exponent e, such that e = e1 + e2, yields be mod n = (be1 mod n) · (be2 mod n); allowing us to condense the result of intermediate multiplications to the size of the modulus n.
    [Show full text]
  • Calculating Optimal Addition Chains
    Computing (2011) 91:265–284 DOI 10.1007/s00607-010-0118-8 Calculating optimal addition chains Neill Michael Clift Received: 16 January 2010 / Accepted: 22 August 2010 / Published online: 11 September 2010 © The Author(s) 2010. This article is published with open access at Springerlink.com Abstract An addition chain is a finite sequence of positive integers 1 = a0 ≤ a1 ≤ ···≤ar = n with the property that for all i > 0 there exists a j, k with ai = a j + ak and r ≥ i > j ≥ k ≥ 0. An optimal addition chain is one of shortest possible length r denoted l(n). A new algorithm for calculating optimal addition chains is described. This algorithm is far faster than the best known methods when used to calculate ranges of optimal addition chains. When used for single values the algorithm is slower than the best known methods but does not require the use of tables of pre-computed values. Hence it is suitable for calculating optimal addition chains for point values above cur- rently calculated chain limits. The lengths of all optimal addition chains for n ≤ 232 were calculated and the conjecture that l(2n) ≥ l(n) was disproved. Exact equality in the Scholz–Brauer conjecture l(2n − 1) = l(n) + n − 1 was confirmed for many new values. Keywords Addition chains · Exponentiation · Scholz–Brauer · Sequences · Optimization Mathematics Subject Classification (2000) 11Y16 · 11Y55 · 05C20 1 Introduction An addition chain A is a finite sequence of positive integers called elements 1 = a0 ≤ a1 ≤ ··· ≤ ar = n with the property that for all i > 0 there exists a j, k Communicated by C.C.
    [Show full text]