Content deleted Content added
mNo edit summary |
m Typo "to to" |
||
Line 24:
Since ''n''-1 is composite, this convolution can be performed directly via the [[convolution theorem]] and more conventional FFT algorithms. However, that may not be efficient if ''n''-1 itself has large prime factors, requiring recursive use of Rader's algorithm. Instead, one can compute a cyclic convolution exactly by zero-padding it into a linear convolution of at least twice the length, say to a power of two, which can then be evaluated in O(''n'' log ''n'') time without the recursive application of Rader's algorithm.
This algorithm, then, requires O(''n'') additions plus O(''n'' log ''n'') time for the convolution. In practice, the O(''n'') additions can often be performed by absorbing the additions into the convolution: if the convolution is performed by a pair of FFTs, then the sum of ''x''<sub>''k''</sub> is given by the DC (0th) output of the FFT of ''a''<sub>''q''</sub>, and ''x''<sub>0</sub> can be added to all the outputs by adding it to the DC term of the convolution prior
If Rader's algorithm is performed by using FFTs of size ''n''-1 to compute the convolution, rather than by zero padding as mentioned above, the efficiency depends strongly upon ''n'' and the number of times that Rader's algorithm must be applied recursively. The worst case would be if ''n''-1 were 2''n''<sub>2</sub> where ''n''<sub>2</sub> is prime, with ''n''<sub>2</sub>-1 = 2''n''<sub>3</sub> where ''n''<sub>3</sub> is prime, and so on. In such cases, supposing that the chain of primes extended all the way down to some bounded value, the application of Rader's algorithm would actually require O(''n''<sup>2</sup>) time. Such ''n''<sub>j</sub> are called [[Sophie Germain prime|Sophie Germain primes]], and the sequence of them is called a [[Cunningham chain]]. The lengths of Cunningham chains, however, are observed to grow more slowly than log<sub>2</sub>(''n''), so Rader's algorithm applied in this way is probably not [[Big O notation|Ω]](''n''<sup>2</sup>), though it is likely worse than O(''n'' log ''n'') for the worst cases. Fortunately, a guarantee of O(''n'' log ''n'') complexity can be achieved by zero padding.
|