Index Mappings For Multidimensional Formulation of The DFT and Convolution
Index Mappings For Multidimensional Formulation of The DFT and Convolution
TRANSACTIONS ON ACOUSTICS,
SPEECH, AND SIGNAL
PROCESSING, VOL. ASSP-25,
NO. 3, JUNE 1917 239
A&sstract-Themapping of onedimensional arrays into two- or higher n = K1n , + K2n2 = K1(n, t AN,) + K, n2 mod N ,
dimensional arrays is the basis of the fast Fouriertransform (FFT)
certain
algorithms
and convolution
schemes.
This
fast paper
thegives X an integer. (2)
general conditions for these mappings to be unique and cyclic, and then
considerstheapplication to discrete Fouriertransform (DFT) and
This is easily seen to be true if and only ifKl = orNz where Q:
convolution
evaluation. is some integer. Likewise,mapthe cyclic
is in n2 if
only
and
ifKz = pN, .
The major question is what the conditions on K1 and Kz
INTRODUCTION are for the mapping to be unique or one-to-one. The answer
to this uses results from number theory or, more specifically,
T HERE areseveralareas ofcomputationalmathematics
where the ideaof transforming a one-dimensional array
into a two- orhigherdimensional array gives computational
from congruence theory and requires considering the problem
as two cases. The first requires that N 1 andN, have no com-
advantageand theoretical insight. Indeed, this hasbeen the mon integer factors. The secondcase requires N l and N z to
basis for the efficient discrete Fourier transform (DFT) have a common factor X. The notation [5] for this is
algorithms [ l ] , [2] known as the fast Fouriertransforms
=X
(Nl ,Nz) (3)
(FFT) andseveralfast convolution algorithms [3]. It is the
purpose of this paper to explore the nature of a class of these where X is the greatest common divisor or factor of N , and
one- to two-dimensionaltransformations usingideas from N 2 . In other words,N 1 = XP1 and N z = hP2 where P1 and Pz
congruence theory and to give the general condition for their are relatively prime (have no common factors). IfNl and N z
uniqueness. The application to the evaluation of the DFT and have no common factors, i.e.,relativelyprime althoughnot
convolution is then discussed in this general light. necessarilyindividuallyprime numbers,then (N, , N z ) = 1.
Using this notation then, we have
A MAP FROM ONE TO Two DIMENSIONS
The particular problem to beconsidered is themap of a case a: (N1, N z ) = 1
one-dimensional array of length N = N l N 2 into a two-dimen- case b: (N1, N z ) f 1.
sional array that is N 1 by Nz in size. This is needed to map a Theorem: The necessary and sufficient conditions for the
function f ( n ) for n = 0, 1, * * . ,N - 1 into a two-dimensional map given in (1) to be unique are
functionf(nl,nz) for 1 2 , = 0 , 1, , N , - 1, and n2 = 0 , 1, case a:
2, . * * , N z - 1. In most cases, n is evaluated modulo N and 1) (K1 = O L N Z ) and (K2 # p N l ) and(Q:,N1)= (Kz,Nz) = 1
the mapping is required to be unique. or
1 1) (K, = N z ) a n d ( K 2 #&'Vl)and(a,N1)=(K2,Nz)=
Or
1
2) ( K , #OLN2)and(K2 = p N l ) a n d ( K l , N 1 ) = ( p , N z ) = 1.
The conditions for case a can be stated in a slightly different
and more compact form by
There are many forms this map could take, but for computa-
case a: (K, = OLN ), and/or (K, = pNl) and (K1, N , ) = (K,,
tional reasons, a particularly useful one is the linear form
N , ) = 1.
n = K l n l + K2n2
modN. (1) There are other maps
than
those of the
form given by (1).
Indeed,it is possible to use amap that hasno analytical
The map is called cyclic in n because n is evaluated moduloN . description but is defined by a table-in the case of a computer
If the mapalso
is
cyclic in nl ,then
algorithm, this could be a set stored
of addresses.However,
the form in (1) seems to be by far the most useful, and the
Manuscript received May 21,1976; revised
January 7,1977. above conditions give thecomplete picture ofits possibilities.
Theauthor was on leave attheInstitut fur Nachrichententechnik, Note that for a to have a uniquemapping, it must be
Universitat
Erlangen-Niirnberg,
Germany with an Alexander von
HumboldtSenior Award. He is with t h e Department of ElectricalEngi- in IZ1 Or n2 (K1 must be a multiple ofN, Or K Z must be
neering, Rice
University,
Houston, TX 77001. multiple
a of N , ) or
it may be
cyclic in both. On the
other
Authorized licensed use limited to: Tsinghua University. Downloaded on March 29,2023 at 08:46:35 UTC from IEEE Xplore. Restrictions apply.
240 IEEE TRANSACTIONS
ON ACOUSTICS, SPEECH, AND SIGNAL PROCESSING, J U N E 1977
hand, for case b, it can only be cyclic in n 1 or n 2 . It cannot with the exponent of W evaluated modulo N. If the maps are
be cyclic in both, and it cannot be noncyclic in both. This is used forboththe indices, the transformcanbemade two-
an interesting property thatis important in application. dimensional.
To better understand these results, consider a simple exam-
ple for case awith N = 15 = 5 . 3 . If wechoose K 1 , the
simplest multiple of N z , i.e., K 1 = N2 = 3, then K 2 = 1, 2, 4,
5 , 7, 8, 10, etc., are all possible values for a unique mapping. with n1 and k l indexed to N1 - 1 and nz and kz to N z - 1.
K 2 = 3, 6, 9, 15, etc., are not allowed because they are not This gives from (4)
relatively prime to Nz,i.e., (K,, 3) # 1. For K z = 5, 10, etc.,
the mapping is cyclic in both variablesas K 1 = c N z and
C ( K 3 k 1+ K 4 k 2 )
n, “2
=xx
X ( K l n l + K z n z )WSk. (6)
K z = pNl . If K 1 = 6, the same values for K 2 are allowed. In
fact, any multipleof 3 for K 1 allows the same K 2 values if Defining the two-dimensional arrays i? and x^ gives
( K , , N,) = 1. If K 1 = 7 (or some other nonmultiple of 3),
then K z must be a multiple of 5 , such as 5 or 10. As is easily
seen, there exists a large class of unique mappings.
For case b, consider N = 10 . 6. For K 1 = 6, there are Kz = with
w;k = K2K,n2k, W$lK,nlk2 K I K ~ ~W I$ Z~ KIK , ~ Z ~ I
1, 5 , 7, 3 5 , etc., allowedvalues. Note that K z = 10 is not WN WN
allowed as K 2 cannot be a multipleof N1: K 1 = 12 is not
allowed since (a,10) f 1. For this case, the allowed values are (8)
more restricted. In order to improve computational efficiency, the evaluation
There are special examples that should be noted. For both of the two-dimensional DFT in (7) can be nested as
cases a and b, the choice of a = 1 and K 2 = 1 is always pos-
sible. This gives a two-dimensional array that has sections or
blocks of the one-dimensional array as columns and sampled
valuesasrows.Theuseof
:k
x(n13 nz)f1(n1 n2, kz) f i b 1 k l , k z )
9
I
K 1 = 1 and 0= 1 gives the trans- with f l not being a function of k l and f z not a function of
3(9)
posedarrayandislikewisealways possible. For case a, the nz . For this nesting to be possible, it is necessary for the fourth
most basic form that is periodic in both directions uses a = 0 = factor in (8) to be unity.
1, i.e., K1 = Nz and K 2 =N1., Another possibility uses a = W2
K 3 n 2 k l = 1 (exponent mod N).
N i l mod Nl and = N;’ mod N2. This makes the map of (1)
become the Chinese Remainder Theorem (CRT) where n = n l This is true if
mod N1 and n = nz mod Nz [SI. Good [2] pointed out the
K 2 = p N l and K 3 = y N 2 , (10)
analogyof this form to the Lagrange interpolationformula.
It might also be viewed as analogous to the sampling theorem which partially determines the maps in (5). At this point, we
where n , and n2 are “samples” of n . For both analogies, the distinguish between the two cases discussed in the last section.
CRT form would be the normalized version, and CY = 0 = 1 the Assume ( N , , N z ) = 1 which givescase a. We call algorithms
unnormalized version. based on t h s map prime factor algorithms(PFA).In this
Allofthese applications and conditions canbe extended case, it is possible to also set
to dimensions higher than two. K1 = o r N z and K 4 = 6 N 1 , (1 1)
which also makesthe second factor in (8) equal unity.
APPLICATIONS TO THE CALCULATIONOF THE DFT
A particularly impressiveapplicationofthese typesof
wgl K 4 n l k2 = 1 (exponent mod N).
mappingshasbeenindeveloping theFFT algorithms for This gives for (7) and (9)
evaluationof the DFT.Mostdescriptionshaveusedflow
graphs, matrix factoring, or algebraic developments. Few have
explicitly usedmultidimensionalmappings,and still fewer
2 ( k l , k i ) = C [ x $(n1,n2)WN,
Ql E2
P S N1 nz k2 ] WN
f fly N 2 k1
Authorized licensed use limited to: Tsinghua University. Downloaded on March 29,2023 at 08:46:35 UTC from IEEE Xplore. Restrictions apply.
BURRUS: MULTIDIMENSIONAL FORMULATION OF THE DFT AND CONVOLUTION 241
Equation(12) now becomes atrue two-dimensional DFT in practice. Also, in the CFA, the TF’sare included with
with the mapping of n being the simplest form and that of one of the nestings and therefore usually require no more
k being the CRT. operations.
z ( k l ,k z ) =E[xx^(nl,n z ) W z k I W z i ” . (14)
The most promising use of the PFA seems to be in the ap-
proach proposed by Winograd [8] for the efficient calculation
n1 n2
of the DFT. This approach uses the PFA to map theDFT
From (12) it is seen that (14) can also be derived by using the
into multidimensional prime length DFT’s which are converted
CRT on n and the simple 6 = y = 1 for k . Parks [7] suggested
into convolution by an index map first suggested by Rader [9] .
using the CRT for both n and k. That results in a modifica-
The convolutions are carried out by special algorithms to
tion of (14) such that the W is not the usual lengthN, value.
reduce the number of multiplies [3], [lo] , [ l l ] .
It is also possible to use the simple 01 = /3 = 6 = y = 1 form for Note that the application of the various index maps for the
both n and k which also requires a modification of W and, in evaluation of (4) does not specify the nature of W. The ap-
fact, there is a whole class of transforms based on (12) using proach can be used with number theoretic transforms, Walsh
modified W : transforms, or any that use congruence evaluation of the
Now consider the case b where ( N , ,N z )# 1,indicating that indices.
N , and N z have a common factor and are not relatively prime.
We call algorithms based on these maps common fqctor algo- APPLICATIONS TO CALCULATION OF CONVOLUTION
rithms (CFA) and they include the Cooley-Tukey FFT The use of index mapping for efficient calculation of con-
method [ 11 and its variations.
volution bas proven useful [3] , [ 101 . If we consider a length
In this case, we also use (10) to eliminate the last factor in
N , cyclic convolution is
(8), but for the CFA, it is not possible to also use (11) and
have a unique transform. This gives (6) in the form of (9) as
Authorized licensed use limited to: Tsinghua University. Downloaded on March 29,2023 at 08:46:35 UTC from IEEE Xplore. Restrictions apply.
242 IEEE TRANSACTIONS ON ACOUSTICS,
SPEECH, AND SIGNAL PROCESSING, VOL. ASSP-25, NO. 3, JUNE 1977
maps to be unique and cyclic. The applications of these on the FFT,” ZEEE Trans. Audio and Electroacoust., vol. AU-16,
conditions to the DFT and convolution gives insight into pp. 16-19, June 1967.
[5] 0.Ore, Number Theory and Zts History. New York: McGraw-
existing algorithms and gives a large class of new possibilities Hill, 1948.
that are yet to be investigated. [6] P. J. Nicholson, “Algebraic theory of finite Fourier transforms,”
J. Comput. Syst. Sci.,vol. 5, pp. 524-541,1971.
[7] T. W. Parks, private communications.
ACKNOWLEDGMENT [8] S. Winograd, “On computing the discrete Fourier transform,”
The author would like to acknowledge helpful conversa- Proc. Nat. Acad. Sei. USA, vol. 73, pp. 1005-1006, Apr. 1976.
[9] C. M. Rader, “Discrete Fourier transforms when the number of
tions with R. Bernstein and P. Steffen on this problem and the data samples is prime,” Proc. ZEEE, vol. 56, pp. 1107-1108,
support of the Humboldt Foundation. June 1968.
[lo] R. C. Agarwal and J. W. Cooley, “Some new algorithms for fast
REFERENCES convolution by multidimensional techniques,” presented at the
JEEE Arden House Workshop on Digital Signal Processing, Harri-
[ 11 B. Gold and C. M. Rader, Digital Signal Processing. New York: man, NY, Feb. 1976.
McGraw-Hill, 1969. [11] D.P. Kolba and T. W. Parks, “Convolution algorithms for the
[2] I. J. Good, “The relationship between two fastFourier trans- DFT,” Dep. Elec. Eng., Rice Univ., Houston, TX, Oct. 1976; also
forms,”ZEEE Trans. Comput., vol. C-20, pp. 310-317, Mar. 1971. to appear in ZEEE Trans. Acoust., Speech, Signal Processing.
[3] R. C. Agarwal and C. S. Burrus, “Fast one-dimensional digital [ 121 Y. Zalcstein, “A note on fast convolution,” ZEEE Trans Comput.,
convolution by multidimensional technique,” ZEEE Trans. vol. C-20, pp. 665-666, June 1971.
Acoust., Speech, Signal Processing, vol. ASSP-22, pp. 1-10, Feb. [ 131 R. Bernstein, “Schnelle Faltung mit der Rader Transformation,”
1974. Diplomarbeit, Institut fur Nachrichtentechnik, Universitat
[4] J. W. Cooley, P. A. W. Lewis, and P.D. Welch, “Historical notes Erlangen-Nurnberg, Germany, July 1974.
Abstract-A periodic waveform, with known period, sampled every sampling rate is fixed but is less than twice the highest signifi-
T seconds, can be recovered by plotting each sample in the appropriate cant frequency present in the waveform. Suppose that it is
place in a “composite” period, even when T is greater than the period
of the waveform. When the period is unknown, a multiplicity of trial desired to recover the waveform from its samples.Nyquist’s
periods are used and the mostsatisfactoryreconstructionis chosen. criterion is most accurately stated in terms of the bandwidth
This paper discusses an organized technique for making such trials. An of the sampled waveform. If, as is often the case, the wave-
example is given in which the technique has been used to reconstruct form being sampled is periodic, its bandwidth is zero, and
a sampled waveform of infrared radiance of the earth as seen from the Nyquist’s criterion, a necessary condition, says nothing about
LES-9 satellite.
recovery of the waveform from its samples. (Nyquist’s crite-
rion forotherthan low-passwaveforms does not apply to
Authorized licensed use limited to: Tsinghua University. Downloaded on March 29,2023 at 08:46:35 UTC from IEEE Xplore. Restrictions apply.