On-Line Evaluation of Powers Using Euclid's Algorithm

The aim of this paper is to present an efficient algorithm to compute powers of an element in a semigroup. The problem to compute x n using a minimal number of semigroup operations is equivalent to the problem of computing an optimal addition chain for n. The algorithm presented here is based upon a suitable continued fraction expansion for n and is remarkably stable: the asymptotic length of the addition chain produced is bounded by 1, 5 log 2 (n) for the worst case, and the average length is asymptotically 1,2946 log 2 (n).