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 female culture has shifted more rapidly than the male culture; the image of the go-get em woman has yet to be fully matched by the image of the lets take-care-of-the-kids- together man. More important, over the last thirty years, mens underlying feelings about taking responsibility at home have changed much less than womens feelings have changed about forging some kind of identity at work.”
—Arlie Hochschild (20th century)
“Once, when lying in bed with no paper at hand, he began to sketch the idea for a new machine on the back of his wifes nightgown. He asked her if she knew the figure he was drawing. Yes, she answered, the figure of a fool.”
—For the State of New Jersey, U.S. public relief program (1935-1943)