By James W. Cooley and John W. Tukey
An efficient method for the calculation of the interactions of a factorial experiment was introduced by Yates and is widely known by his name. The generalization to was given by Box et al. [1]. Good [2] generalized these methods and gave elegant algorithms for which one class of applications is the calculation of Fourier series. In their full generality, Good’s methods are applicable to certain problems in which one must multiply an -vector by an matrix which can be factored into sparse matrices, where is proportional to . This results in a procedure requiring a number of operations proportional to rather than . These methods are applied here to the calculation of complex Fourier series. They are useful in situations where the number of data points is, or can be chosen to be, a highly composite number. The algorithm is here derived and presented in a rather different form. Attention is given to the choice of . It is also shown how special advantage can be obtained in the use of a binary computer with and how the entire calculation can be performed within the array of data storage locations used for the given Fourier coefficients.
Consider the problem of calculating the complex Fourier series
where the given Fourier coefficients are complex and is the principal th root of unity,
A straightforward calculation using (1) would require operations where “operation” means, as it will throughout this note, a complex multiplication followed by a complex addition.
The algorithm described here iterates on the array of given complex Fourier amplitudes and yields the result in less than operations without requiring more data storage than is required for the given array . To derive the algorithm, suppose is a composite, i.e., . Then let the indices in (1) be expressed
Then, one can write
Received August 17, 1964. Research in part at Princeton University under the sponsorship of the Army Research Office (Durham). The authors wish to thank Richard Garwin for his essential role in communication and encouragement.
Since
the inner sum, over , depends only on and and can be defined as a new array,
The result can then be written
There are elements in the array , each requiring operations, giving a total of operations to obtain . Similarly, it takes operations to calculate from . Therefore, this two-step algorithm, given by (6) and (7), requires a total of
operations.
It is easy to see how successive applications of the above procedure, starting with its application to (6), give an -step algorithm requiring
operations, where
If with , then unless , when .
In general, then, using as many factors as possible provides a minimum to (9), but factors of 2 can be combined in pairs without loss. If we are able to choose to be highly composite, we may make very real gains. If all are equal to , then, from (10) we have
and the total number of operations is
If , then we find that
so that
is a weighted mean of the quantities
whose values run as follows
| r | |
|---|---|
| 2 | 2.00 |
| 3 | 1.88 |
| 4 | 2.00 |
| 5 | 2.15 |
| 6 | 2.31 |
| 7 | 2.49 |
| 8 | 2.67 |
| 9 | 2.82 |
| 10 | 3.01. |
The use of is formally most efficient, but the gain is only about 6% over the use of 2 or 4, which have other advantages. If necessary, the use of up to 10 can increase the number of computations by no more than 50%. Accordingly, we can find "highly composite" values of within a few percent of any given large number.
Whenever possible, the use of with or 4 offers important advantages for computers with binary arithmetic, both in addressing and in multiplication economy.
The algorithm with is derived by expressing the indices in the form
where and are equal to 0 or 1 and are the contents of the respective bit positions in the binary representation of and . All arrays will now be written as functions of the bits of their indices. With this convention (1) is written
where the sums are over . Since
the innermost sum of (15), over , depends only on and can be written
Proceeding to the next innermost sum, over , and so on, and using
one obtains successive arrays,
for .
Writing out the sum this appears as
According to the indexing convention, this is stored in a location whose index is
It can be seen in (20) that only the two storage locations with indices having 0 and 1 in the bit position are involved in the computation. Parallel computation is permitted since the operation described by (20) can be carried out with all values of , and simultaneously. In some applications* it is convenient to use (20) to express in terms of , giving what is equivalent to an algorithm with .
The last array calculated gives the desired Fourier sums,
in such an order that the index of an must have its binary bits put in reverse order to yield its index in the array .
In some applications, where Fourier sums are to be evaluated twice, the above procedure could be programmed so that no bit-inversion is necessary. For example, consider the solution of the difference equation,
The present method could be first applied to calculate the Fourier amplitudes of from the formula
The Fourier amplitudes of the solution are, then,
The and arrays are in bit-inverted order, but with an obvious modification of (20), can be used to yield the solution with correct indexing.
A computer program for the IBM 7094 has been written which calculates three-dimensional Fourier sums by the above method. The computing time taken for computing three-dimensional arrays of data points was as follows:
- A multiple-processing circuit using this algorithm was designed by R. E. Miller and S. Winograd of the IBM Watson Research Center. In this case was found to be most practical.
| a | b | c | No. Pts. | Time (minutes) |
|---|---|---|---|---|
| 4 | 4 | 3 | 2^{11} | .02 |
| 11 | 0 | 0 | 2^{11} | .02 |
| 4 | 4 | 4 | 2^{12} | .04 |
| 12 | 0 | 0 | 2^{12} | .07 |
| 5 | 4 | 4 | 2^{13} | .10 |
| 5 | 5 | 3 | 2^{13} | .12 |
| 13 | 0 | 0 | 2^{13} | .13 |
IBM Watson Research Center Yorktown Heights, New York
Bell Telephone Laboratories, Murray Hill, New Jersey
Princeton University Princeton, New Jersey
- G. E. P. Box, L. R. Connor, W. R. Cousins, O. L. Davies (Ed.), F. R. Hirnsworth & G. P. Silitto, The Design and Analysis of Industrial Experiments, Oliver & Boyd, Edinburgh, 1954.
- I. J. Good, "The interaction algorithm and practical Fourier series," J. Roy. Statist. Soc. Ser. B., v. 20, 1958, p. 361-372; Addendum, v. 22, 1960, p. 372-375. MR 21 1674; MR 23 A4231.