Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let $\ell(n)$ be the smallest number of multiplications needed to compute $a^n$ for any integer $a$. Here, a multiplication is $a_i := a_j \cdot a_k$ for $j, k < i$ and $a_0 := a$, e.g. $\ell(8) = 3$. I want to show the following inequality:

$$\lambda(n) \leq \ell(n) \leq \lambda(n) + v(n) + 1,$$

where $\lambda(n)$ is one less than the number of significant bits of $n$ in the binary representation and $v(n)$ is the number of $1$s in the binary representation of $n$.

I tried to prove this inequality using induction and the upper bound for $\ell(n)$ is quite easy to show, however I don't see how I can prove the lower bound. The only thing about $\ell(n+1)$ I know is that it is less or equal to $\ell(n) + 1$. But if we for example look at $n=7$, we see that $\ell(n+1) < \ell(n)$, so $\ell(n)$ is not monotonically increasing... Can anyone give me a hint how to show the lower bound or how $\ell(n)$ is bounded?

Thanks for any help in advance.

share|cite|improve this question
Have you looked at the references in This looks related to the – Ross Millikan Oct 13 '11 at 17:19
up vote 0 down vote accepted

For the lower bound, we argue by induction that $a_i \leq a^{2^i}$ for all $i$. In order to get $a_t = n$, we must have $a^{2^t} \geq a_t = a^n$ or $2^t \geq n$. It follows that $$t \geq \log n \geq \lfloor \log n \rfloor = \lambda(n).$$

share|cite|improve this answer

Look at it the other way and try to put an upper bound on the exponents of the computable powers knowing the number of multiplications : for any given integer $k$, what is the greatest power of $a$ you can compute with only $k$ multiplications ?

share|cite|improve this answer
The answer to your question is $2^k$, but I don't see yet how this helps. Also, what exactly are "the computable exponents"? – Huy Oct 13 '11 at 17:42
well then, what does that say about $\ell(n)$ if $n > 2^k$ ? – mercio Oct 13 '11 at 17:46
Really, I have no idea. And I still don't see the relation between your question and mine. – Huy Oct 13 '11 at 18:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.