- Addition chain
In
mathematics , an addition chain is asequence "a"0, "a"1, "a"2, "a"3, ... that satisfies:"a"0 = 1, and :for each "k">0: "a""k" = "a""i" + "a""j" for some "i", "j" < "k".
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 : so for example we only need 7multiplication s to calculate 531: :52 = 51 × 51:53 = 52 × 51:56 = 53 × 53:512 = 56 × 56:524 = 512 × 512:530 = 524 × 56:531 = 530 × 51Calculating 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. [citation|first1=Peter|last1=Downey|first2=Benton|last2=Leong|first3=Ravi|last3=Sethi|title=Computing sequences with addition chains|journal=SIAM Journal on Computing|volume=10|issue=3|year=1981|pages=638–646|doi=10.1137/0210047. A number of other papers state that finding a single addition chain is NP-complete, citing this paper, but it does not claim or prove such a result.] 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 to calculate relatively short chains exist. One very well-known technique to calculate relatively short addition chains is the "binary method", similar to
exponentiation by squaring . Other well-known methods are the "factor method" and "window method".References
External links
* http://wwwhomes.uni-bielefeld.de/achim/addition_chain.html
* [http://www.research.att.com/~njas/sequences/A003313 Sequence A003313] , length of the shortest addition chain for "n", "The On-Line Encyclopedia of Integer Sequences ".
* [http://www.few.vu.nl/~skn410/bp/AdditionChains.pdf Addition Chains, efficient computing of powers] , General introduction on addition chains, including a comparison of several algorithms for calculating them.ee also
*
Addition chain exponentiation
*Addition-subtraction chain
*Lucas chain
*Scholz conjecture
Wikimedia Foundation. 2010.