integer complexity: experimental and analytical results iishallit/dc2015/iraids2.pdf · integer...
TRANSCRIPT
![Page 1: Integer Complexity: Experimental and Analytical Results IIshallit/DC2015/iraids2.pdf · Integer Complexity: Experimental and Analytical Results II Juris Cernenoks˘ 1 J anis Iraids1](https://reader034.vdocuments.us/reader034/viewer/2022052003/6015ebf2aff63c57635d2f16/html5/thumbnails/1.jpg)
Integer Complexity:Experimental and Analytical Results II
Juris Cernenoks1 Janis Iraids1 Martins Opmanis2
Rihards Opmanis2 Karlis Podnieks1
1University of Latvia
2Institute of Mathematics and Computer Science, University of Latvia
DCFS 2015, University of Waterloo, Friday 26th June, 2015
![Page 2: Integer Complexity: Experimental and Analytical Results IIshallit/DC2015/iraids2.pdf · Integer Complexity: Experimental and Analytical Results II Juris Cernenoks˘ 1 J anis Iraids1](https://reader034.vdocuments.us/reader034/viewer/2022052003/6015ebf2aff63c57635d2f16/html5/thumbnails/2.jpg)
Introduction Main Results Conclusion
Integer Complexity
Definition of Integer Complexity
Integer complexity
Integer complexity of a positive integer n, denoted by ‖n‖, is theleast amount of 1’s in an arithmetic expression for n consisting of1’s, +, · and brackets.
For example,
‖1‖ = 1
‖2‖ = 2; 2 = 1 + 1
‖3‖ = 3; 3 = 1 + 1 + 1
‖6‖ = 5; 6 = (1 + 1) · (1 + 1 + 1)
‖8‖ = 6; 8 = (1 + 1) · (1 + 1) · (1 + 1)
‖11‖ = 8; 11 = (1 + 1 + 1) · (1 + 1 + 1) + 1 + 1
http://oeis.org/A005245
![Page 3: Integer Complexity: Experimental and Analytical Results IIshallit/DC2015/iraids2.pdf · Integer Complexity: Experimental and Analytical Results II Juris Cernenoks˘ 1 J anis Iraids1](https://reader034.vdocuments.us/reader034/viewer/2022052003/6015ebf2aff63c57635d2f16/html5/thumbnails/3.jpg)
Introduction Main Results Conclusion
Integer Complexity
Lower and Upper Bounds
Theorem
‖n‖ ∈ Θ(log n)
Sketch of proof.
1 ‖n‖ ≤ 3 log2 n – Horner’s ruleExpand n in binary: n = akak−1 · · · a1a0.Express as
a0 + (1 + 1) · (a1 + (1 + 1) · . . . (ak−1 + (1 + 1) · ak) . . .).
2 ‖n‖ ≥ 3 log3 nIdea: denote by E (k) the largest number having complexity k .
![Page 4: Integer Complexity: Experimental and Analytical Results IIshallit/DC2015/iraids2.pdf · Integer Complexity: Experimental and Analytical Results II Juris Cernenoks˘ 1 J anis Iraids1](https://reader034.vdocuments.us/reader034/viewer/2022052003/6015ebf2aff63c57635d2f16/html5/thumbnails/4.jpg)
Introduction Main Results Conclusion
Integer Complexity
Lower and Upper Bounds
Theorem
‖n‖ ∈ Θ(log n)
Sketch of proof.
We will show that
E (3k + 2) = 2 · 3k ;
E (3k + 3) = 3 · 3k ;
E (3k + 4) = 4 · 3k .
![Page 5: Integer Complexity: Experimental and Analytical Results IIshallit/DC2015/iraids2.pdf · Integer Complexity: Experimental and Analytical Results II Juris Cernenoks˘ 1 J anis Iraids1](https://reader034.vdocuments.us/reader034/viewer/2022052003/6015ebf2aff63c57635d2f16/html5/thumbnails/5.jpg)
Introduction Main Results Conclusion
Integer Complexity
Largest Number of Complexity k
Theorem
For all k ≥ 0:
E (3k + 2) = 2 · 3k ;E (3k + 3) = 3 · 3k ;E (3k + 4) = 4 · 3k .
Proof (by H. Altman).
The value of an expression does not decrease if we:
Replace all x · 1 by x + 1;
Replace all x · y + 1 by x · (y + 1);
Replace all x · y + u · v by x · y · u · v ;
If x = 1 + 1 + . . .+ 1 > 3, split it into product of (1 + 1)’sand (1 + 1 + 1)’s;
Replace all (1 + 1) · (1 + 1) · (1 + 1) by (1 + 1 + 1) · (1 + 1 + 1).
![Page 6: Integer Complexity: Experimental and Analytical Results IIshallit/DC2015/iraids2.pdf · Integer Complexity: Experimental and Analytical Results II Juris Cernenoks˘ 1 J anis Iraids1](https://reader034.vdocuments.us/reader034/viewer/2022052003/6015ebf2aff63c57635d2f16/html5/thumbnails/6.jpg)
Introduction Main Results Conclusion
Integer Complexity
Complexity of Powers
From E (3k) = 3k we arrive at∥∥∥3k∥∥∥ = 3k .
What about powers of other numbers∥∥nk∥∥?
There exist n with∥∥nk∥∥ < k · ‖n‖:
‖5‖ = 5∥∥52∥∥ = 10
. . .∥∥55∥∥ = 25∥∥56∥∥ = 29; 56 = (33 · 23 + 1) · 32 · 23 + 1
![Page 7: Integer Complexity: Experimental and Analytical Results IIshallit/DC2015/iraids2.pdf · Integer Complexity: Experimental and Analytical Results II Juris Cernenoks˘ 1 J anis Iraids1](https://reader034.vdocuments.us/reader034/viewer/2022052003/6015ebf2aff63c57635d2f16/html5/thumbnails/7.jpg)
Introduction Main Results Conclusion
Integer Complexity
Complexity of 2a
Richard K. Guy, “Unsolved Problems in Number Theory”, problemF26
Is∥∥2a3b
∥∥ = 2a + 3b for all (a, b) 6= (0, 0)?In particular, is ‖2a‖ = 2a for all a? [Attributed to Selfridge,Hypothesis H1]
Having computed ‖n‖ for n up to 1012 hypothesis H1 holdsfor all a ≤ 39 [2010].
Recently Harry Altman showed H1 holds for all (a, b) witha ≤ 48 (See the PhD thesis of Altman “Integer Complexity,Addition Chains, and Well-Ordering” for excellentintroduction to integer complexity.)
![Page 8: Integer Complexity: Experimental and Analytical Results IIshallit/DC2015/iraids2.pdf · Integer Complexity: Experimental and Analytical Results II Juris Cernenoks˘ 1 J anis Iraids1](https://reader034.vdocuments.us/reader034/viewer/2022052003/6015ebf2aff63c57635d2f16/html5/thumbnails/8.jpg)
Introduction Main Results Conclusion
Logarithmic Complexity
Logarithmic Complexity
Let the logarithmic complexity of n be denoted by‖n‖log = ‖n‖
log3 n.
3 ≤ ‖n‖log ≤ 3 log2 3 ≈ 4.755
Richard K. Guy, “Unsolved Problems in Number Theory”, problemF26
As n→∞ does ‖n‖log → 3? [Hypothesis H2]
For all n up to 1012:
‖n‖log ≤ ‖1439‖log ≈ 3.928.
In 2014 Arias de Reyna and van de Lune showed that for mostn:
‖n‖log < 3.635.
![Page 9: Integer Complexity: Experimental and Analytical Results IIshallit/DC2015/iraids2.pdf · Integer Complexity: Experimental and Analytical Results II Juris Cernenoks˘ 1 J anis Iraids1](https://reader034.vdocuments.us/reader034/viewer/2022052003/6015ebf2aff63c57635d2f16/html5/thumbnails/9.jpg)
Introduction Main Results Conclusion
Logarithmic Complexity
Distribution of Logarithmic Complexity [1]
3 3.2 3.4 3.6 3.8 40
10
20
30
Figure : Distribution of logarithmic complexity of numbers with ‖n‖ = 30
![Page 10: Integer Complexity: Experimental and Analytical Results IIshallit/DC2015/iraids2.pdf · Integer Complexity: Experimental and Analytical Results II Juris Cernenoks˘ 1 J anis Iraids1](https://reader034.vdocuments.us/reader034/viewer/2022052003/6015ebf2aff63c57635d2f16/html5/thumbnails/10.jpg)
Introduction Main Results Conclusion
Logarithmic Complexity
Distribution of Logarithmic Complexity [2]
3 3.2 3.4 3.6 3.8 40
200
400
600
800
Figure : Distribution of logarithmic complexity of numbers with ‖n‖ = 40
![Page 11: Integer Complexity: Experimental and Analytical Results IIshallit/DC2015/iraids2.pdf · Integer Complexity: Experimental and Analytical Results II Juris Cernenoks˘ 1 J anis Iraids1](https://reader034.vdocuments.us/reader034/viewer/2022052003/6015ebf2aff63c57635d2f16/html5/thumbnails/11.jpg)
Introduction Main Results Conclusion
Logarithmic Complexity
Distribution of Logarithmic Complexity [3]
3 3.2 3.4 3.6 3.8 40
1 · 107
2 · 107
3 · 107
Figure : Distribution of logarithmic complexity of numbers with ‖n‖ = 70
![Page 12: Integer Complexity: Experimental and Analytical Results IIshallit/DC2015/iraids2.pdf · Integer Complexity: Experimental and Analytical Results II Juris Cernenoks˘ 1 J anis Iraids1](https://reader034.vdocuments.us/reader034/viewer/2022052003/6015ebf2aff63c57635d2f16/html5/thumbnails/12.jpg)
Introduction Main Results Conclusion
Open Problems
Relation of the Open Problems
Richard K. Guy, “Unsolved Problems in Number Theory”, problemF26
Is ‖2a‖ = 2a for all a? [Hypothesis H1]
As n→∞ does ‖n‖log → 3? [Hypothesis H2]
H1 =⇒ ¬H2, because
‖2a‖log =2a
log3 2a≈ 3.170;
hence H2 should be easier to settle.
We have not succeeded to prove or disprove either of them.
![Page 13: Integer Complexity: Experimental and Analytical Results IIshallit/DC2015/iraids2.pdf · Integer Complexity: Experimental and Analytical Results II Juris Cernenoks˘ 1 J anis Iraids1](https://reader034.vdocuments.us/reader034/viewer/2022052003/6015ebf2aff63c57635d2f16/html5/thumbnails/13.jpg)
Introduction Main Results Conclusion
Sum of Digits
Base-3 Representations of 2n
Observation
‖8‖ = 6; 8 = (1 + 1)(1 + 1)(1 + 1)
‖9‖ = 6; 9 = (1 + 1 + 1)(1 + 1 + 1)
Base-3 representation of powers of 2:
(2)3 = 2
(22)3 = 11
(23)3 = 22
(210)3 = 1101221
(230)3 = 2202211102201212201
(250)3 = 12110122110222110100112122112211
The digits seem “random, uniformly distributed”.
![Page 14: Integer Complexity: Experimental and Analytical Results IIshallit/DC2015/iraids2.pdf · Integer Complexity: Experimental and Analytical Results II Juris Cernenoks˘ 1 J anis Iraids1](https://reader034.vdocuments.us/reader034/viewer/2022052003/6015ebf2aff63c57635d2f16/html5/thumbnails/14.jpg)
Introduction Main Results Conclusion
Sum of Digits
Pseudorandomness of Powers
Let Sq(pn) denote the sum of digits of pn in base q. If the digitswere to be independent, uniformly distributed random variablesthen the pseudo expectation would be:
En ≈ n logq p ·q − 1
2
and pseudo variance
Vn ≈ n logq p ·q2 − 1
12;
and the corresponding normed and centered variable sq(pn) shouldbehave as the standard normal distribution.We can try to verify this experimentally...
![Page 15: Integer Complexity: Experimental and Analytical Results IIshallit/DC2015/iraids2.pdf · Integer Complexity: Experimental and Analytical Results II Juris Cernenoks˘ 1 J anis Iraids1](https://reader034.vdocuments.us/reader034/viewer/2022052003/6015ebf2aff63c57635d2f16/html5/thumbnails/15.jpg)
Introduction Main Results Conclusion
Sum of Digits
Distribution of Normalized Digit Sums
The results for n up to 105:
−4 −3 −2 −1 0 1 2 3 4
0
0.2
0.4
Figure : Histogram of the centered and normed variable s3(2n)
![Page 16: Integer Complexity: Experimental and Analytical Results IIshallit/DC2015/iraids2.pdf · Integer Complexity: Experimental and Analytical Results II Juris Cernenoks˘ 1 J anis Iraids1](https://reader034.vdocuments.us/reader034/viewer/2022052003/6015ebf2aff63c57635d2f16/html5/thumbnails/16.jpg)
Introduction Main Results Conclusion
Sum of Digits
Related Theoretical Results
Conjecture by Paul Erdos
For n > 8, the base-3 representation of 2n contains digit “2”.
Corollary of a theorem by C. L. Stewart
There exists a constant Cp,q > 0 such that:
Sq(pn) >log n
log log n + Cp,q− 1.
Our result
If H1 holds, i.e., if indeed ‖2n‖ = 2n, then
S3(2n) > 0.107n.
Does this mean proving H1 is very difficult?
![Page 17: Integer Complexity: Experimental and Analytical Results IIshallit/DC2015/iraids2.pdf · Integer Complexity: Experimental and Analytical Results II Juris Cernenoks˘ 1 J anis Iraids1](https://reader034.vdocuments.us/reader034/viewer/2022052003/6015ebf2aff63c57635d2f16/html5/thumbnails/17.jpg)
Introduction Main Results Conclusion
Sum of Digits
H1 Implies Linear Sum of Digits
Theorem (Cernenoks et al.)
If, for a prime p, ∃ε > 0∀n > 0 : ‖pn‖log ≥ 3 + ε, then
S3(pn) ≥ εn log3 p.
Proof.
Write pn in base q: amam−1 · · · a0.Using Horner’s rule we obtain an arithmetic expression for pn:
‖pn‖ ≤ qm + Sq(pn).
Since m ≤ logq pn,
‖pn‖ ≤ q logq pn + Sq(pn).
![Page 18: Integer Complexity: Experimental and Analytical Results IIshallit/DC2015/iraids2.pdf · Integer Complexity: Experimental and Analytical Results II Juris Cernenoks˘ 1 J anis Iraids1](https://reader034.vdocuments.us/reader034/viewer/2022052003/6015ebf2aff63c57635d2f16/html5/thumbnails/18.jpg)
Introduction Main Results Conclusion
Sum of Digits
H1 Implies Linear Sum of Digits
Theorem (Cernenoks et al.)
If, for a prime p, ∃ε > 0∀n > 0 : ‖pn‖log ≥ 3 + ε, then
S3(pn) ≥ εn log3 p.
Proof.
‖pn‖ ≤ q logq pn + Sq(pn).
When q = 3:
S3(pn) ≥ ‖pn‖log log3 pn − 3 log3 p
n ≥≥ (3 + ε)n log3 p − 3n log3 p =
= εn log3 p.
![Page 19: Integer Complexity: Experimental and Analytical Results IIshallit/DC2015/iraids2.pdf · Integer Complexity: Experimental and Analytical Results II Juris Cernenoks˘ 1 J anis Iraids1](https://reader034.vdocuments.us/reader034/viewer/2022052003/6015ebf2aff63c57635d2f16/html5/thumbnails/19.jpg)
Introduction Main Results Conclusion
Integer Complexity in Basis {1,+, ·,−}
Definition
Integer complexity in basis {1,+, ·,−}Integer complexity (in basis {1,+, ·,−}) of a positive integer n,denoted by ‖n‖−, is the least amount of 1’s in an arithmeticexpression for n consisting of 1’s, +, ·, − and brackets.The corresponding logarithmic complexity is denoted by ‖n‖− log.
Having computed ‖n‖− for n up to 2 · 1011 we present ourobservations.
![Page 20: Integer Complexity: Experimental and Analytical Results IIshallit/DC2015/iraids2.pdf · Integer Complexity: Experimental and Analytical Results II Juris Cernenoks˘ 1 J anis Iraids1](https://reader034.vdocuments.us/reader034/viewer/2022052003/6015ebf2aff63c57635d2f16/html5/thumbnails/20.jpg)
Introduction Main Results Conclusion
Integer Complexity in Basis {1,+, ·,−}
Experimental Results in Basis {1,+, ·,−} [1]
Smallest number with ‖n‖− < ‖n‖:
‖23‖− = 10; ‖23‖ = 11;
23 = 23 · 3− 1 = 22 · 5 + 2.
There are numbers for which subtraction of 6 is necessary:
‖n‖− = 75; n = 55 659 409 816 = (24 · 33 − 1)(317 − 1)− 2 · 3;
‖n‖− = 77; n = 111 534 056 696 = (25 · 34 − 1)(316 + 1)− 2 · 3;
‖n‖− = 78; n = 167 494 790 108 = (24 · 34 + 1)(317 − 1)− 2 · 3.
![Page 21: Integer Complexity: Experimental and Analytical Results IIshallit/DC2015/iraids2.pdf · Integer Complexity: Experimental and Analytical Results II Juris Cernenoks˘ 1 J anis Iraids1](https://reader034.vdocuments.us/reader034/viewer/2022052003/6015ebf2aff63c57635d2f16/html5/thumbnails/21.jpg)
Introduction Main Results Conclusion
Integer Complexity in Basis {1,+, ·,−}
Experimental Results in Basis {1,+, ·,−} [2]
“Worst” numbers
Let
e(n) denote min {k | ‖k‖ = n} and
e−(n) denote min {k | ‖k‖− = n}.
0 10 20 30 40 50 60 70 80 90
3
3.2
3.4
3.6
3.8
4
n
‖e(n)‖log‖e−(n)‖− log
Figure : Logarithmic complexities of the numbers e(n) and e−(n)
![Page 22: Integer Complexity: Experimental and Analytical Results IIshallit/DC2015/iraids2.pdf · Integer Complexity: Experimental and Analytical Results II Juris Cernenoks˘ 1 J anis Iraids1](https://reader034.vdocuments.us/reader034/viewer/2022052003/6015ebf2aff63c57635d2f16/html5/thumbnails/22.jpg)
Introduction Main Results Conclusion
Integer Complexity in Basis {1,+, ·,−}
Upper Bound
Theorem (Cernenoks et al.)
‖n‖− log ≤ 3.679 +5.890
log3 n
Sketch of proof.
n = 6k; write n as 3 · 2 · k ;
n = 6k + 1; write n as 3 · 2 · k + 1;
n = 6k + 2; write n as 2 · (3 · k + 1);
n = 6k + 3; write n as 3 · (2 · k + 1);
n = 6k + 4; write n as 2 · (3 · (k + 1)− 1);
n = 6k + 5; write n as 3 · 2 · (k + 1)− 1;
![Page 23: Integer Complexity: Experimental and Analytical Results IIshallit/DC2015/iraids2.pdf · Integer Complexity: Experimental and Analytical Results II Juris Cernenoks˘ 1 J anis Iraids1](https://reader034.vdocuments.us/reader034/viewer/2022052003/6015ebf2aff63c57635d2f16/html5/thumbnails/23.jpg)
Introduction Main Results Conclusion
Integer Complexity in Basis {1,+, ·,−}
Upper Bound
Theorem (Cernenoks et al.)
‖n‖− log ≤ 3.679 +5.890
log3 n
Sketch of proof.
Apply the rules iteratively
Each iteration uses at most 6 ones
Each iteration reduces the problem from n to some k ≤ n6 + 1
3
After m applications we arrive at a number
k <n
6m+
2
5
![Page 24: Integer Complexity: Experimental and Analytical Results IIshallit/DC2015/iraids2.pdf · Integer Complexity: Experimental and Analytical Results II Juris Cernenoks˘ 1 J anis Iraids1](https://reader034.vdocuments.us/reader034/viewer/2022052003/6015ebf2aff63c57635d2f16/html5/thumbnails/24.jpg)
Introduction Main Results Conclusion
Our Results
Our Results
Digit sum problem
Hypothesis ‖2n‖ = 2n implies a linear lower bound on the sum ofdigits:
S3(2n) > 0.107n.
Upper bound in base {1,+, ·,−}
lim supn→∞
‖n‖− log ≤ 3.679
![Page 25: Integer Complexity: Experimental and Analytical Results IIshallit/DC2015/iraids2.pdf · Integer Complexity: Experimental and Analytical Results II Juris Cernenoks˘ 1 J anis Iraids1](https://reader034.vdocuments.us/reader034/viewer/2022052003/6015ebf2aff63c57635d2f16/html5/thumbnails/25.jpg)
Introduction Main Results Conclusion
Open Problems
Open Problems
H1
Is ‖2n‖ = 2n?
Spectrum of ‖n‖log1 Is lim supn→∞ ‖n‖log = 3? (H2)
2 Can we at least show
lim supn→∞
‖n‖log < 3 log2 3?
Digit sum
Can we improve the sum of digits bound
Sp(qn) ≥ log n
log log n + Cp,q− 1?
![Page 26: Integer Complexity: Experimental and Analytical Results IIshallit/DC2015/iraids2.pdf · Integer Complexity: Experimental and Analytical Results II Juris Cernenoks˘ 1 J anis Iraids1](https://reader034.vdocuments.us/reader034/viewer/2022052003/6015ebf2aff63c57635d2f16/html5/thumbnails/26.jpg)
Introduction Main Results Conclusion
Questions?