{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/on-algorithms-to-calculate-integer-complexity","title":"On algorithms to calculate integer complexity","arxiv_id":"1706.08424","date":"2017-06-26","proceeding":null,"authors":["Katherine Cordwell","Alyssa Epstein","Anand Hemmady","Steven J. Miller","Eyvindur A. Palsson","Aaditya Sharma","Stefan Steinerberger","Yen Nhi Truong Vu"],"abstract":"We consider a problem first proposed by Mahler and Popken in 1953 and later developed by Coppersmith, Erd\\H{o}s, Guy, Isbell, Selfridge, and others. Let $f(n)$ be the complexity of $n \\in \\mathbb{Z^{+}}$, 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 $\\mathcal{O}(n^{1.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\\left(\\frac{n}{d}\\right)$, 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 $\\mathcal{O}(n^{1.230175})$ to $\\mathcal{O}(n^{1.222911236})$. All of our code can be found online at: https://github.com/kcordwel/Integer-Complexity.","url_abs":"http://arxiv.org/abs/1706.08424v4","url_pdf":"http://arxiv.org/pdf/1706.08424v4.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"links_only","authors_date_abstract":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license), from the Kaggle arXiv metadata snapshot of 2026-09-12"},"code_links":[{"paper_slug":"on-algorithms-to-calculate-integer-complexity","repo_url":"https://github.com/kcordwel/Integer-Complexity","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"none","reach":null}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":null,"mcp":null,"developers":"https://syntology.ai/developers"},"arxiv_metadata":null,"syntology_extracted_results":null}