In mathematics, an addition chain for computing a positive integer can be given by a sequence of natural numbers starting with 1 and ending with, such that each number in the sequence is the sum of two previous numbers. The length of an addition chain is the number of sums needed to express all its numbers, which is one less than the cardinality of the sequence of numbers.[1]
As an example: (1,2,3,6,12,24,30,31) is an addition chain for 31 of length 7, since
2 = 1 + 1
3 = 2 + 1
6 = 3 + 3
12 = 6 + 6
24 = 12 + 12
30 = 24 + 6
31 = 30 + 1
Addition chains can be used for addition-chain exponentiation. This method allows exponentiation with integer exponents to be performed using a number of multiplications equal to the length of an addition chain for the exponent. For instance, the addition chain for 31 leads to a method for computing the 31st power of any number using only seven multiplications, instead of the 30 multiplications that one would get from repeated multiplication, and eight multiplications with exponentiation by squaring:
2 = ×
3 = 2 ×
6 = 3 × 3
12 = 6 × 6
24 = 12 × 12
30 = 24 × 6
31 = 30 ×
Calculating an addition chain of minimal length is not easy; a generalized version of the problem, in which one must find a chain that simultaneously forms each of a sequence of values, is NP-complete.[2] There is no known algorithm which can calculate a minimal addition chain for a given number with any guarantees of reasonable timing or small memory usage. However, several techniques are known to calculate relatively short chains that are not always optimal.[3]
One very well known technique to calculate relatively short addition chains is the binary method, similar to exponentiation by squaring. In this method, an addition chain for the number
n
n'=\lfloorn/2\rfloor
n
n=n'+n'
n
n-1=n'+n'
The factor method for finding addition chains is based on the prime factorization of the number
n
n
p
n
n/p
p
n/p
m
n
\lfloorn/m\rfloor
m
m\lfloorn/m\rfloor
Let
l(n)
s
s
n
log2(n)+log2(\nu(n))-2.13\leql(n)\leqlog2(n)+log2(n)(1+o(1))/log2(log2(n))
\nu(n)
n
One can obtain an addition chain for
2n
n
2n=n+n
l(2n)\lel(n)+1
n
2n
2n
l(382)=l(191)=11
2n
n
l(2n)<l(n)
n
n=375494703
602641031
619418303
A Brauer chain or star addition chain is an addition chain in which each of the sums used to calculate its numbers uses the immediately previous number. A Brauer number is a number for which a Brauer chain is optimal.
Brauer proved that
where is the length of the shortest star chain. For many values of n, and in particular for, they are equal:[4] . But Hansen showed that there are some values of n for which, such as which has . The smallest such n is 12509.
See main article: Scholz conjecture. The Scholz conjecture (sometimes called the Scholz–Brauer or Brauer–Scholz conjecture), named after Arnold Scholz and Alfred T. Brauer), is a conjecture from 1937 stating that
l(2n-1)\len-1+l(n).
This inequality is known to hold for all Hansen numbers, a generalization of Brauer numbers; Neill Clift checked by computer that all
n\le5784688
l(2n-1)=n-1+l(n)
n\le64
. Richard K. Guy. Richard K. Guy. Unsolved Problems in Number Theory. Springer-Verlag. 2004. 978-0-387-20860-2. 54611248 . 1058.11001. Section C6.