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:
“The dominant metaphor of conceptual relativism, that of differing points of view, seems to betray an underlying paradox. Different points of view make sense, but only if there is a common co-ordinate system on which to plot them; yet the existence of a common system belies the claim of dramatic incomparability.”
—Donald Davidson (b. 1917)
“An idea is always a generalization, and generalization is a property of thinking. To generalize means to think.”
—Georg Wilhelm Friedrich Hegel (17701831)