Underlying Idea
Using the following observation, one can create a recursive algorithm that computes xn for an integer n using squaring and multiplication:
A brief analysis shows that such an algorithm uses log2n squarings and at most log2n multiplications. For n > about 4 this is computationally more efficient than naïvely multiplying the base with itself repeatedly.
Read more about this topic: Exponentiation By Squaring
Famous quotes containing the words underlying and/or idea:
“It is commonplace that a problem stated is well on its way to solution, for statement of the nature of a problem signifies that the underlying quality is being transformed into determinate distinctions of terms and relations or has become an object of articulate thought.”
—John Dewey (18591952)
“The image cannot be dispossessed of a primordial freshness, which idea can never claim. An idea is derivative and tamed. The image is in the natural or wild state, and it has to be discovered there, not put there, obeying its own law and none of ours. We think we can lay hold of image and take it captive, but the docile captive is not the real image but only the idea, which is the image with its character beaten out of it.”
—John Crowe Ransom (18881974)