July 2002
Intermediate to advanced
320 pages
8h 15m
English
A well-known technique for computing xn, when n is a nonnegative integer, involves the binary representation of n. The technique applies to the evaluation of an expression of the form x • x • x • x • … • x where • is any associative operation, such as addition, multiplication including matrix multiplication, and string concatenation (as suggested by the notation (‘ab’)3 = ‘ababab’). As an example, suppose we wish to compute y = x13. Because 13 expressed in binary is 1101 (that is, 13 = 8 + 4 + 1),
![]()
Thus, x13 may be computed as follows:
This requires five multiplications, ...
Read now
Unlock full access