Examples
As an example: v = (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 7 multiplications to calculate 531:
- 52 = 51 × 51
- 53 = 52 × 51
- 56 = 53 × 53
- 512 = 56 × 56
- 524 = 512 × 512
- 530 = 524 × 56
- 531 = 530 × 51
Read more about this topic: Addition Chain
Famous quotes containing the word examples:
“It is hardly to be believed how spiritual reflections when mixed with a little physics can hold peoples attention and give them a livelier idea of God than do the often ill-applied examples of his wrath.”
—G.C. (Georg Christoph)
“Histories are more full of examples of the fidelity of dogs than of friends.”
—Alexander Pope (16881744)
“In the examples that I here bring in of what I have [read], heard, done or said, I have refrained from daring to alter even the smallest and most indifferent circumstances. My conscience falsifies not an iota; for my knowledge I cannot answer.”
—Michel de Montaigne (15331592)