A Mathematical Expression is sufficient to represent an algorithm which in most cases represents input/output relationships. The efficiency of such an Algorithm can be evaluated by the amount of computational resources it takes to compute output or the quantity of interest.
Motivation and applications
In an algorithm we can assume that we have a mathematical expression relating the output and input. Example of Algorithms can be Filters, Fourier Transforms, Histograms, Image Enhancements and etc. All of these operations can be expressed as mathematical formulas and can be directly computed as we write the expressions. As one would expect this can be termed as the Obvious Implementation[1] of the Algorithm. Also it is not necessary that this obvious implementation is always efficient.
When people began to compute such things, they began to look for more efficient ways. The wiki page aims at showcasing such efficient and Fast Algorithms for Multidimensional Signals. A multidimensional (M-D) signal can be modeled as a function of M independent variables, where M is greater than or equal to 2. These signals may be categorized as continuous, discrete, or mixed. A continuous signal can be modeled as a function of independent variables which range over a continuum of values, example – an audio wave travelling in space, 3-D space waves measured at different times. A discrete signal, on the other hand, can be modeled as a function defined only on a set of points, such as the set of integers. An Image is the simplest example of 2-D Signal which is spatial in nature.
In the context of Fast Algorithms, consider the below example:
We need to compute A which is given by
A = αγ + αδ + βγ + βδ where α,β,γ and δ are complex variables.
To compute A, we need 4 complex multiplications and 3 complex additions. The above equation can be written in its simplified form as
A = (α + β)(γ + δ)
This form requires only 1 complex multiplication and 2 complex additions.
Thus the second way of computing A is much more efficient and fast compared to the first method of computing A. This is the motivation for the evolution of the Fast Algorithms in the Digital Signal Processing Field. Consequently, many of the real life applications make use of these efficient Algorithms for fast computations.
Problem Statement and Basics
The simplest form of representing a system is through its Impulse response. And the output of such a system is given by the convolution of its input signal and system’s Impulse response. This is mathematically represented as follows:
Convolution of a Discrete Domain Input Signal with Discrete domain Impulse response
Where
is the impulse response of the system.
According to the equation above to obtain the Output value at a particular point ( say
) we need to multiply several values of the input
and Impulse Response
. Of course this is dependent on the Region of Support of the input as well as the impulse response. The key point here to be noted is that we need to perform so many complex multiplications and additions to obtain 1 output value.
Assuming a 2-D input signal is of length M X M and the systems impulse response is of length N x N we need to perform
number of multiplications to obtain complete output values. This is a huge number and very inefficient way of calculating.
We encounter a similar scenario when we have to compute the Discrete Fourier Transforms of a Signal of interest.
The Direct Calculation of 2-D DFT is simply the evaluation of the double Sum [2]
The total number of complex multiplications and complex additions needed to evaluate DFT by direct calculation is
.
This is a naive approach, however, we already know that an N-point 1-D DFT can be computed with far fewer than
multiplications by using fast Fourier Transform (FFT) algorithm. As described in the next section we can develop fast Fourier transforms for calculating 2-D or higher Dimensional DFTs as well [2]
Existing Approaches
Row Column Decomposition approach for the evaluation of DFT [2]
The DFT sum
in the previous equation can also be written in the following form
Let
denote the quantity inside the brackets and is given by:
Employing this method DFT of
can be computed as multiple 1-D DFTs. That is, each column of
can be considered as 1-D DFT of the corresponding column of
(
= constant). And each row of
is the 1-DFT of the corresponding row of the
(
= constant). Hence we are computing 2-D DFT by decomposing into Row and Column DFTs.
The same principle is employed for evaluating a M - dimensional signal.
Now let's talk about the computational savings we get using this approach. It is observed that we require
complex additions and multiplications. Further, if each of these 1-D DFTs are computed using 1-D FFT number of complex multiplications can be further reduced to
Just like 1-D FFT, decimation in time can be achived in case of 2-D Signals. In 1-D DFT a signal of length of power of 2,the corresponding DFT can be expressed in terms of two half length DFTs, each of these can again be expressed as combination of quarter length DFTs and so on.
In case of 2-D Signals we can express
DFT in terms of four
DFTs (assuming
and
are of length of power of 2). For the sake of simplicity let us assume that
. The DFT double sum can be decomposed into four separate summations, one over those samples of
for which both
and
are even, one for which
is even and
is odd, one for which
is odd and
is even and the last one for which
and
are odd.
This is written as :
where
All the arrays
and
are the each periodic in
with horizontal and vertical periods
. Using this fact and also the fact that
we can obtain the following identities :
The above equation tell us how to compute the four DFT points
for a particular value of
from the four points
. And these corresponding samples of
can be obtained by evaluating the
-point DFT (similarly other
arrays can be obtained).
Thus we see that the
DFT can be expressed in terms of four
DFTs.
By analogy from 1-D case, the computation depicted in the below figure is called a
or more precisely
.
Each butterfly requires three complex multiplications and eight complex additions for the calculation of outputs from the inputs. And to compute all the samples of
from
requires calculations of
butterflies.
This decimation procedure is performed
times when
is a power of 2. Each stage of decimation consists of
butterflies, and each butterfly involves three complex multiplications and eight complex additions and hence the number of complex multiplications that needs to be performed during the computation of an
-point radix
FFT is given by
Small Radix Cooley-Tukey algorithms <ref = "fa">
References
- ^ Fast Algorithms for Signal Processing by Richard E. Blahut, Cambridge University Press 2010
- ^ a b c d Dan E. Dudgeon, Russell M. Mersereau, “Multidimensional Digital Signal Processing”, Prentice-Hall Signal Processing Series, ISBN 0136049591, 1983.