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:
“Histories are more full of examples of the fidelity of dogs than of friends.”
—Alexander Pope (16881744)
“No rules exist, and examples are simply life-savers answering the appeals of rules making vain attempts to exist.”
—André Breton (18961966)
“There are many examples of women that have excelled in learning, and even in war, but this is no reason we should bring em all up to Latin and Greek or else military discipline, instead of needle-work and housewifry.”
—Bernard Mandeville (16701733)