Shifting nth Root Algorithm - Performance

Performance

On each iteration, the most time-consuming task is to select β. We know that there are B possible values, so we can find β using comparisons. Each comparison will require evaluating . In the kth iteration, y has k digits, and the polynomial can be evaluated with multiplications of up to digits and additions of up to digits, once we know the powers of y and β up through for y and n for β. β has a restricted range, so we can get the powers of β in constant time. We can get the powers of y with multiplications of up to digits. Assuming n-digit multiplication takes time and addition takes time, we take time for each comparison, or time to pick β. The remainder of the algorithm is addition and subtraction that takes time, so each iteration takes . For all k digits, we need time .

The only internal storage needed is r, which is digits on the kth iteration. That this algorithm doesn't have bounded memory usage puts an upper bound on the number of digits which can be computed mentally, unlike the more elementary algorithms of arithmetic. Unfortunately, any bounded memory state machine with periodic inputs can only produce periodic outputs, so there are no such algorithms which can compute irrational numbers from rational ones, and thus no bounded memory root extraction algorithms.

Note that increasing the base increases the time needed to pick β by a factor of, but decreases the number of digits needed to achieve a given precision by the same factor, and since the algorithm is cubic time in the number of digits, increasing the base gives an overall speedup of . When the base is larger than the radicand, the algorithm degenerates to binary search, so it follows that this algorithm is not useful for computing roots with a computer, as it is always outperformed by much simpler binary search, and has the same memory complexity.

Read more about this topic:  Shifting nth Root Algorithm

Famous quotes containing the word performance:

    What avails it that you are a Christian, if you are not purer than the heathen, if you deny yourself no more, if you are not more religious? I know of many systems of religion esteemed heathenish whose precepts fill the reader with shame, and provoke him to new endeavors, though it be to the performance of rites merely.
    Henry David Thoreau (1817–1862)

    The way to go to the circus, however, is with someone who has seen perhaps one theatrical performance before in his life and that in the High School hall.... The scales of sophistication are struck from your eyes and you see in the circus a gathering of men and women who are able to do things as a matter of course which you couldn’t do if your life depended on it.
    Robert Benchley (1889–1945)

    Tennis is more than just a sport. It’s an art, like the ballet. Or like a performance in the theater. When I step on the court I feel like Anna Pavlova. Or like Adelina Patti. Or even like Sarah Bernhardt. I see the footlights in front of me. I hear the whisperings of the audience. I feel an icy shudder. Win or die! Now or never! It’s the crisis of my life.
    Bill Tilden (1893–1953)