vix.ing · top · new · best · stats · spec

On algorithms to calculate integer complexity

2017/06/26 by Katherine Cordwell, Alyssa Epstein, Cordwell, Katherine +13
Computer Science · Mathematics · #11A67 #11B75 #11Y16 (primary) #11Y55 #68Q25 (secondary) #Algorithms and Data Compression #Benford’s Law and Fraud Detection #Coding theory and cryptography #FOS: Mathematics #Number Theory (math.NT) #math.NT #msc:11A67 #msc:11B75 #msc:11Y16 #msc:11Y55 #msc:68Q25

paper · pdf · doi:10.48550/arxiv.1706.08424

8 pages; more details were added for the complexity analysis and a link added to the code on GitHub; minor typos corrected

openalex publication_date 2017/06/26 · arxiv created 2018/12/18 · arxiv updated 2018/12/19 · openalex created_date 2025/10/10 · openalex updated_date 2026/07/28

Abstract

We consider a problem first proposed by Mahler and Popken in 1953 and later developed by Coppersmith, Erdős, Guy, Isbell, Selfridge, and others. Let f(n) be the complexity of n ∈ \mathbbZ+, where f(n) is defined as the least number of 1's needed to represent n in conjunction with an arbitrary number of +'s, *'s, and parentheses. Several algorithms have been developed to calculate the complexity of all integers up to n. Currently, the fastest known algorithm runs in time O(n1.230175) and was given by J. Arias de Reyna and J. van de Lune in 2014. This algorithm makes use of a recursive definition given by Guy and iterates through products, f(d) + f((n)/(d)), for d | n, and sums, f(a) + f(n - a), for a up to some function of n. The rate-limiting factor is iterating through the sums. We discuss potential improvements to this algorithm via a method that provides a strong uniform bound on the number of summands that must be calculated for almost all n. We also develop code to run J. Arias de Reyna and J. van de Lune's analysis in higher bases and thus reduce their runtime of O(n1.230175) to O(n1.222911236). All of our code can be found online at: https://github.com/kcordwel/Integer-Complexity.

Citations

Related