Metraipolis › archive › dc_d476e8c51598

Addition-subtraction chain — Wikipedia (en)

Source
Wikipedia (en)
Original
https://en.wikipedia.org/wiki/Addition-subtraction_chain
License (as archived)
CC-BY-SA-4.0
Archived
2026-11-07T13:42:03.475Z
SHA-256 of the archived text
2b5b66bd0304e920088d040fc2532fb6c97b77962999e6939e94e0a8da3b1daa
Stable URL of this page
https://metraipolis.com/documento/dc_d476e8c51598

How to cite

Addition-subtraction chain — Wikipedia (en) — Wikipedia (en), https://en.wikipedia.org/wiki/Addition-subtraction_chain (CC-BY-SA-4.0); archived copy: https://metraipolis.com/documento/dc_d476e8c51598 (Metraipolis archive dc_d476e8c51598, sha256 2b5b66bd0304e920088d040fc2532fb6c97b77962999e6939e94e0a8da3b1daa)
BibTeX
@misc{dcd476e8c51598,
  title = {Addition-subtraction chain — Wikipedia (en)},
  howpublished = {Wikipedia (en)},
  url = {https://en.wikipedia.org/wiki/Addition-subtraction_chain},
  note = {License CC-BY-SA-4.0; archived copy https://metraipolis.com/documento/dc_d476e8c51598; sha256 2b5b66bd0304e920088d040fc2532fb6c97b77962999e6939e94e0a8da3b1daa},
  year = {2026}
}

Archived text

Reproduced under CC-BY-SA-4.0. Attribution: Wikipedia (en), https://en.wikipedia.org/wiki/Addition-subtraction_chain. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

An addition-subtraction chain, a generalization of addition chains to include subtraction, is a sequence a0, a1, a2, a3, ... that satisfies a 0 = 1 , {\displaystyle a_{0}=1,\,} for k > 0 , a k = a i ± a j for some 0 ≤ i , j < k . {\displaystyle {\text{for }}k>0,\ a_{k}=a_{i}\pm a_{j}{\text{ for some }}0\leq i,j<k.} An addition-subtraction chain for n, of length L, is an addition-subtraction chain such that a L = n {\displaystyle a_{L}=n} . That is, one can thereby compute n by L additions and/or subtractions. (Note that n need not be positive. In this case, one may also include a−1 = 0 in the sequence, so that n = −1 can be obtained by a chain of length 1.) By definition, every addition chain is also an addition-subtraction chain, but not vice versa. Therefore, the length of the shortest addition-subtraction chain for n is bounded above by the length of the shortest addition chain for n. In general, however, the determination of a minimal addition-subtraction chain (like the problem of determining a minimum addition chain) is a difficult problem for which no efficient algorithms are currently known. The related problem of finding an optimal addition sequence is NP-complete (Downey et al., 1981), but it is not known for certain whether finding optimal addition or addition-subtraction chains is NP-hard. For example, one addition-subtraction chain is: a 0 = 1 {\displaystyle a_{0}=1} , a 1 = 2 = 1 + 1 {\displaystyle a_{1}=2=1+1} , a 2 = 4 = 2 + 2 {\displaystyle a_{2}=4=2+2} , a 3 = 3 = 4 − 1 {\displaystyle a_{3}=3=4-1} . This is not a minimal addition-subtraction chain for n=3, however, because we could instead have chosen a 2 = 3 = 2 + 1 {\displaystyle a_{2}=3=2+1} . The smallest n for which an addition-subtraction chain is shorter than the minimal addition chain is n=31, which can be computed in only 6 additions (rather than 7 for the minimal addition chain): a 0 = 1 , a 1 = 2 = 1 + 1 , a 2 = 4 = 2 + 2 , a 3 = 8 = 4 + 4 , a 4 = 16 = 8 + 8 , a 5 = 32 = 16 + 16 , a 6 = 31 = 32 − 1. {\displaystyle a_{0}=1,\ a_{1}=2=1+1,\ a_{2}=4=2+2,\ a_{3}=8=4+4,\ a_{4}=16=8+8,\ a_{5}=32=16+16,\ a_{6}=31=32-1.} Like an addition chain, an addition-subtraction chain can be used for addition-chain exponentiation: given the addition-subtraction chain of length L for n, the power x n {\displaystyle x^{n}} can be computed by multiplying or dividing by x L times, where the subtractions correspond to divisions. This is potentially efficient in problems where division is an inexpensive operation, most notably for exponentiation on elliptic curves where division corresponds to a mere sign change (as proposed by Morain and Olivos, 1990). Some hardware multipliers multiply by n using an addition chain described by n in binary: n = 31 = 0 0 0 1 1 1 1 1 (binary). Other hardware multipliers multiply by n using an addition-subtraction chain described by n in Booth encoding: n = 31 = 0 0 1 0 0 0 0 −1 (Booth encoding).

Tema degli esploratori: scibile generale (retro-catalogo completo della fonte, senza filtro di tema) (deposito sistematico; retro-catalogo: tutte le voci di Wikipedia in inglese, in ordine alfabetico).
Fonte: Wikipedia in inglese, voce «Addition-subtraction chain» — https://en.wikipedia.org/wiki/Addition-subtraction_chain
Wikidata Q4681308: «generalization of addition chains to include subtraction» (dati Wikidata in CC0 1.0) — https://www.wikidata.org/wiki/Q4681308
Autori: i contributori di Wikipedia (cronologia: https://en.wikipedia.org/wiki/Addition-subtraction_chain?action=history).
Licenza: Creative Commons Attribuzione-Condividi allo stesso modo 4.0 (CC BY-SA 4.0) — https://creativecommons.org/licenses/by-sa/4.0/. Il riuso richiede attribuzione e stessa licenza.
Estratto dell'introduzione non modificato nel contenuto; revisione 1376833492, consultata il 2026-11-07T13:37:13.910Z tramite l'API ufficiale di Wikipedia. Impronta SHA-256 dell'estratto: 0c6139f828a3c991ae53b29a7d8bd0ef27a665f5ce8e7e780ce0c6218c6f2584