ArticleslgStudy

science

Addition chain

Addition chain is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Addition chain rather than just read about it. In short: In mathematics, an addition chain for computing a positive integer n can be given by a sequence of natural numbers starting with 1 and ending with n, such that each number in the sequence is the sum of two of the 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.

Key takeaways

  • Addition chain belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Addition chain to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Addition chain from memory before moving on to harder problems.

Reference excerpt

In mathematics, an addition chain for computing a positive integer n can be given by a sequence of natural numbers starting with 1 and ending with n, such that each number in the sequence is the sum of two of the 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.

Examples 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 n using only seven multiplications, instead of the 30 multiplications that one would get from repeated multiplication, and eight multiplications with exponentiation by squaring:

n2 = n × n n3 = n2 × n n6 = n3 × n3 n12 = n6 × n6 n24 = n12 × n12 n30 = n24 × n6 n31 = n30 × n

Methods for computing addition chains 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. 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. 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 is obtained recursively, from an addition chain for n′=⌊n/2⌋. If n is even, it can be obtained in a single additional sum, as n=n′+n′. If n is odd, this method uses two sums to obtain it, by computing n−1=n′+n′ and then adding one. The factor method for finding addition chains is based on the prime factorization of the number n to be represented. If n has a number p as one of its prime factors, then an addition chain for n can be obtained by starting with a chain for n/p, and then concatenating onto it a chain for p, modified by multiplying each of its numbers by n/p. The ideas of the factor method and binary method can be combined into Brauer's m-ary method by choosing any number m (regardless of whether it divides n), recursively constructing a chain for ⌊n/m⌋, concatenating a chain for m (modified in the same way as above) to obtain m⌊n/m⌋, and then adding the remainder. Additional refinements of these ideas lead to a family of methods called sliding window methods.

Chain length Let l(n) denote the smallest s so that there exists an addition chain of length s which computes n. It is known that log2n+log2ν(n)−2.13≤l(n)≤log2n+ν(n)−1, l(n)≤log2n+(1+o(1))log2nlog2log2n, where ν(n) is the Hamming weight (the number of ones) of the binary expansion of n. One can obtain an addition chain for 2n from an addition chain for n by including one additional sum 2n=n+n, from which follows the inequality l(2n)≤l(n)+1 on the lengths of the chains for n and 2n. However, this is not always an equality, as in some cases 2n may have a shorter chain than the one obtained in this way. For instance, l(382)=l(191)=11, observed by Knuth. It is even possible for 2n to have a shorter chain than n, so that l(2n)<l(n); the smallest n for which this happens is n=375494703, which is followed by 602641031, 619418303, and so on (sequence A230528 in the OEIS).

Brauer chain 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

l*(2n−1) ≤ n − 1 + l*(n) where ⁠l∗⁠ is the length of the shortest star chain. For many values of n, and in particular for n<12509, they are equal: l(n) = l*(n). But Hansen showed that there are some values of n for which l(n) ≠ l*(n), such as n = 26106 + 23048 + 22032 + 22016 + 1 which has l*(n) = 6110, l(n) ≤ 6109. The smallest such n is 12509.

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)≤n−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≤5784688 are Hansen (while 5784689 is not). Clift further verified that in fact l(2n−1)=n−1+l(n) for all n≤64.

See also Addition-subtraction chain Vectorial addition chain Lucas chain

References

External links OEIS sequence A003313 (Length of shortest addition chain for n). Note that the initial "1" is not counted (so element #1 in the sequence is 0). F. Bergeron, J. Berstel. S. Brlek "Efficient computation of addition chains"

Worked examples

Example 1 — a first encounter with Addition chain

Start with the simplest possible case. Write down what Addition chain claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Addition chain before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Addition chain ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Addition chain

In research
Addition chain appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Addition chain in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Addition chain is common in secondary-school and first-year university syllabi. It links to neighbouring topics Addition chains, NP-complete problems, so understanding it makes those chapters shorter.
In everyday life
Look for Addition chain outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Addition chain” →

How to study Addition chain in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Addition chain means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Addition chain out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Addition chain in simple terms?

In mathematics, an addition chain for computing a positive integer n can be given by a sequence of natural numbers starting with 1 and ending with n, such that each number in the sequence is the sum of two of the previous numbers. The length of an addition chain is the number of sums needed to expr…

Why does Addition chain matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Addition chain?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Addition chain.

Tags

  • Addition chains
  • NP-complete problems

Keep exploring