Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a21e0ea0289d231f

Jump to content

Integer complexity

From Wikipedia, the free encyclopedia

In number theory, the complexity of an integer is the smallest number of ones that can be used to represent it using ones and any number of additions, multiplications, and parentheses. It is always within a constant factor of the logarithm of the given integer.

Example

[edit]

For instance, the number 11 may be represented using eight ones:

11 = (1 + 1 + 1) × (1 + 1 + 1) + 1 + 1.

However, it has no representation using seven or fewer ones. Therefore, its complexity is 8.

The complexities of the numbers 1, 2, 3, ... are

1, 2, 3, 4, 5, 5, 6, 6, 6, 7, 8, 7, 8, 8, 8, 8, 9, 8, ... (sequence A005245 in the OEIS)

The smallest numbers with complexity 1, 2, 3, ... are

1, 2, 3, 4, 5, 7, 10, 11, 17, 22, 23, 41, 47, ... (sequence A005520 in the OEIS)

Upper and lower bounds

[edit]

The question of expressing integers in this way was originally considered by Mahler & Popken (1953). They asked for the largest number with a given complexity k;[1] later, Selfridge showed that this number is

For example, when k = 10, x = 2 and the largest integer that can be expressed using ten ones is 2232 = 36. Its expression is

(1 + 1) × (1 + 1) × (1 + 1 + 1) × (1 + 1 + 1).

Thus, the complexity of an integer n is at least 3log3n. The complexity of n is at most 3log2n (approximately 4.755log3n): an expression of this length for n can be found by applying Horner's method to the binary representation of n.[2] Almost all integers have a representation whose length is bounded by a logarithm with a smaller constant factor, 3.529log3n.[3]

Algorithms and counterexamples

[edit]

The complexity of every integer n up to some threshold N can be calculated in total time . The complexity of a single integer can be computed in sublinear time, .[4]

Algorithms for computing the integer complexity have been used to disprove several conjectures about the complexity. In particular, it is not necessarily the case that the optimal expression for a number n is obtained either by subtracting one from n or by expressing n as the product of two smaller factors. The smallest example of a number whose optimal expression is not of this form is 353942783. It is a prime number, and therefore also disproves a conjecture of Richard K. Guy that the complexity of every prime number p is one plus the complexity of p − 1.[5] In fact, Moreover, Venecia Wang gave examples of other numbers whose integer complexity does not reflect the obvious formula for these numbers:[6]

References

[edit]
  1. Mahler, K.; Popken, J. (1953), "On a maximum problem in arithmetic", Nieuw Archief voor Wiskunde, 1: 1–15, MR 0053986.
  2. Guy, Richard K. (1986), "Some suspiciously simple sequences", Unsolved Problems, American Mathematical Monthly, 93 (3): 186–190, doi:10.2307/2323338, JSTOR 2323338, MR 1540817.
  3. Shriver, Christopher E. (2015), "Applications of Markov chain analysis to integer complexity", arXiv:1511.07842 [math.NT]{{cite arXiv}}: CS1 maint: overridden setting (link).
  4. He, Qizheng (2024), "Improved algorithms for integer complexity", in Parter, Merav; Pettie, Seth (eds.), 2024 Symposium on Simplicity in Algorithms, SOSA 2024, Alexandria, VA, USA, January 8-10, 2024, {SIAM}, pp. 107–114, arXiv:2308.10301, doi:10.1137/1.9781611977936.11
  5. Fuller, Martin N. (February 1, 2008), Program to calculate A005245, A005520, A005421, OEIS, retrieved 2015-12-13.
  6. Wang, Venecia (October 2012), "A counterexample to the prime conjecture of expressing numbers using just ones", Journal of Number Theory, 133 (2), JNT: 391–397, doi:10.1016/j.jnt.2012.08.003.
[edit]