Improved Algorithms for Integer Complexity
arXiv:2308.10301
Abstract
The integer complexity of a positive integer is defined as the minimum number of 1's needed to represent , using additions, multiplications and parentheses. We present two simple and faster algorithms for computing the integer complexity: 1) A near-optimal -time algorithm for computing the integer complexity of all , improving the previous one [Cordwell et al., 2017]. 2) The first sublinear-time algorithm for computing the integer complexity of a single , with running time . The previous algorithms for computing a single require computing all .
include the code and add more experiments