4.6.3 EVALUATION OF POWERS 445 Fig. (Web hosting providers) 13. The
Sunday, July 22nd, 20074.6.3 EVALUATION OF POWERS 445 Fig. 13. The power tree. for all i = 1, 2, . . . , r. One way of looking at this definition is to consider a simple computer that has an accumulator and is capable of the three operations LDA, STA, and ADD; the machine begins with the number 1 in its accumulator, and it proceeds to compute the number n by adding together previous results. Note that al must equal 2, and US is either 2, 3, or 4. The shortest length, r, for which there exists an addition chain for n is denoted by l(n). Our goal in the remainder of this section is to discover as much as we can about this function l(n). The values of l(n) for small n are displayed in tree form in Fig. 14, which shows how to calculate P with the fewest possible multiplications for all n 5 100. The problem of determining l(n) was apparently first raised by H. Dellac in 1894, and a partial solution by E. de Jonquibres mentioned the factor method [cf. I IntermMiaire des MatMmaticiens 1 (1894), 20, 162-1641. In his solution, de JonquiBres listed what he felt were the values of l(p) for all prime numbers p < 200, but his table entries for p = 107, 149, 163, 179 were one too high. The factor method tells us immediately that l(mn) I l(m) + l(n), (3) since we can take the chains 1, al, . . . , a, = m and 1, bl, . . . , b, = n and form the chain 1, al, . . . , a,, arbl, . . . , u7bs = mn. We can also recast the m-ary method into addition-chain terminology. Con- sider the case m = 2k, and write n = d,,mt + dlmt- + . . . + dt in the m-ary number system; the corresponding addition chain takes the form 1,2,3, . . . ) m -2,m -1, 2d,,, 4do,. . .,mdo,mdo+dl, 2(mdo+dl), 4(mdo+dl), . . . , m(mdo+dl), m2do -t mdl + da, 7 mtdo + mt-ldl + . . . + dt. (4