English

Improved Algorithms for Integer Complexity

Data Structures and Algorithms 2023-09-14 v2 Number Theory

Abstract

The integer complexity f(n)f(n) of a positive integer nn is defined as the minimum number of 1's needed to represent nn, using additions, multiplications and parentheses. We present two simple and faster algorithms for computing the integer complexity: 1) A near-optimal O(NpolylogN)O(N\mathop{\mathrm{polylog}} N)-time algorithm for computing the integer complexity of all nNn\leq N, improving the previous O(N1.223)O(N^{1.223}) one [Cordwell et al., 2017]. 2) The first sublinear-time algorithm for computing the integer complexity of a single nn, with running time O(n0.6154)O(n^{0.6154}). The previous algorithms for computing a single f(n)f(n) require computing all f(1),,f(n)f(1),\dots,f(n).

Keywords

Cite

@article{arxiv.2308.10301,
  title  = {Improved Algorithms for Integer Complexity},
  author = {Qizheng He},
  journal= {arXiv preprint arXiv:2308.10301},
  year   = {2023}
}

Comments

include the code and add more experiments