Myasnikov V.

advertisement
128
EFFICIENT ALGORITHM UNDER THE SET OF
CONVOLUTION ALGORITHMS 1
V.V. Myasnikov 2
2 Image
Processing Systems Institute of RAS
443001, Molodogvardeiskaja st., 151, Samara, Russia; +7 (846) 3378084, vmyas@smr.ru
A problem of the construction of a computationally efficient convolution algorithm is
considered. It is proved that the process of the efficient algorithm construction may be
presented as three sequential operations. During the first operation, we construct the
wise algorithm under the supporting set of the convolution algorithms. Then we construct reduced wise algorithm. Finally, we construct the induced algorithm, which belongs to the closure (by the transformation model) of the set of the only reduced wise
algorithm. The theorems presented in the work show the necessary and sufficient criteria on the efficiency and strict efficiency of the constructed algorithm. Examples of the
analytical construction of the efficient convolution algorithm are given.
Introduction
Convolution calculation is the basic operation
in the digital signal and image processing theories. It may be written as:
y n   h n  * x n  
M 1
 hm xn  m ,
m 0
n  M  1, N  1;
(1)
x, y , h  F.
Here x . and y . are input and output signals,
h . is a FIR-filter, F is (finite or infinite) field.
There are a huge number of convolution algorithms in the digital signal processing theory.
Their main groups are as follows:
 direct convolution algorithms ADC  [1];
AFC 
 fast
convolution
algorithms
[2,3,4,5,6,7], they use the fast orthogonal
transforms algorithms like Fast Fourier
Transform (FFT);
 recursive algorithms ARF  [8,1,9].
However, the abundance of the convolution
algorithms and the methods of their construction does not decide the basic practice problem: what is the way that allow to obtain the
convolution algorithm with the lowest compu-
tational (or time) requirements. Some of existent approaches, which are oriented to solve the
problem indicated above, were presented in [5]
and [6]. Unfortunately, these approaches are
focused on the discrete orthogonal transforms
algorithms only and do not take into account
some additional aspects of the problem (see
bellow for details). Moreover, the main imperfection is that they cannot guarantee the convolution algorithm, proposed by the specific
approach, has the lowest computational (or
time) requirements among the known or/and
available convolution algorithms.
This paper proposes new approach to solve the
problem indicated above and to construct the
efficient convolution algorithm. This approach
satisfies specific requirements:
 it uses any given supporting set of convolution algorithms while the constructing the
efficient algorithm,
 it takes into account the a prior information of the task (1). Particularly, it uses
the fact that the sizes of the signals and
values of the FIR-filter are preliminary
known;
_______________________________________________________________________
1


This research was financially supported by:
Russian Foundation for Basic Research. Project № 06-01-00616-а;
Russian Science Support Foundation.
129

it uses analytical features of the input signal and the original values of the FIR-filter,
 it guarantees the constructed algorithm will
be efficient under the supporting set of the
convolution algorithms.
Be definite, the constructed algorithm is called
efficient if its computational (or time) complexity:
 is less then or equal to the computational
complexity of every algorithm from the
supporting set at any convolution task (1),
 is less then the computational complexity
of every algorithm from the supporting set
at some convolution tasks (1) (strict efficiency).
Unvarying complexity algorithms


Let Z  Z 0 ,xn nN01 be a convolution task
(1)
with
the
a
prior
information
M 1
0  hn n0 , N ,  x   . Let the function par
is defined as




par Z 0 , xn nN01



0  h n 

  M , N  .
N , x   
M 1
n 0 ,
Definition 1 Algorithm A is called unvarying
complexity algorithm if for every task Z its
computational complexity equation may be
written as the explicit function of par Z  , i.e.
U  AZ   u A  par ( Z )   u A M , N  .
Let AM ,N  be the domain of the unvarying complexity algorithm.
Definition 2 Algorithm A  A is called the
wise algorithm under the supporting set A of
unvarying complexity convolution algorithms
if it is defined as follows:
A M , N  
 A M , N  ,
AA
 Z  A* M , N 
AZ   A* Z 
 M , N   parZ  

 u M , N  

A*

.
if 

min
u A  M , N 
 A A: AA 

  M , N A  M , N  


Proposition 1 [10] Wise algorithm under the
supporting set A of unvarying complexity
convolution algorithms is the unvarying complexity convolution algorithm.
■
Definition 3 [10,11] Complexity function
u A M , N  of the unvarying complexity algorithm A is called well-formed if the following
inequality holds
M , N   AM , N 
u A M , N  






 u A m, N  M  m   






min
 u A M  m, N  m   ,
 m1,M 2



 m, N ( M m ) A M , N  , add


 M m, N m A M , N 



 u A M  m, N  m  n   






N

M

n

1
min 
min
.

,
m 0,1, 2...
 n 0,1,2,...

N  M  1


 M m, N m n A M , N 



 u A M , n n  M  1 






 u A M , N  n  M  1N  n  

min
N  M 1
 n 1,N / 2 

 MM,,n A M , N  ,

  N n  M 1A M , N 




Definition 4 Unvarying complexity algorithm
with well-formed complexity function is called
the reduced (unvarying complexity) algorithm.
Theorem 1 [10] For any unvarying complexity algorithm A with domain AM ,N  the re
duced algorithm A exists (may be constructed) and the following inequalities hold:
A M , N   AM , N  ,
M , N   AM , N  u A M , N   u AM , N .
■
Following the theorem 1, we can introduce the
reduce operation, that construct the reduced

(unvarying complexity) algorithm A from the
(unvarying complexity) algorithm A . Some
aspects of the reduce operation, features of the
reduced wise algorithm and the results of them
practical application are presented in [11].
Definition 5 The extension to the domain
M ,N  of the (unvarying complexity) convolution algorithm A with the domain AM ,N  is
the operation, that gives the (unvarying complexity) convolution algorithm A( ) with the
domain A( ) M ,N   M ,N  , which satisfies:
130
M , N AM ,N 
A( ) M , N   AM , N  .

Obviously, definition 5 does not give the way
to construct the extension of the algorithm A ;
it gives only restrictions on this operation.
Closure of the set of convolution algorithms.
Induced algorithm
Equation (1) may be written in several equivalent forms. Therefore, to calculate the convolution we can use the algorithm of the CR-model.
CR-model of algorithm [10]
Step 1. Preprocessing. We calculate the convolution of the input signal x n  and specific FIRfilter g x k kKx01 :
~
x n  
K x 1
 g~x k xn  k ,
n  0, N  1 .
(2)
k 0
Step 2. We calculate S convolutions of the preprocessed signal ~x n  and prepared parts
h~s mSs01 of the preprocessed FIR-filter h. :
~y n  
s
 h~s m ~x n  m , n  0, N  1,
mDs
Ds  supphs m ,
s  0, S  1.
(3)
Step 3. Summation of values from Eq.(3):
~
y n  
S 1
 ~ys n  .
s 0
Step 4. Postprocessing. We calculate the values of the result signal y . recursively:
y n  
K h  K x 2
 g~t yn  t   ~y n ,
algorithm Aprep . It is used for the calculation of the convolution in the Eq.(2). Let’s
denote this convolution task as Z prep ;
set of the algorithms As Ss01 . They are used
for the calculation of S convolutions in
the Eq.(3). Let’s denote these convolution
tasks as Z s s  0, S  1 .
The computational complexity of the algorithm of the CR-model is as follows:


  
second group are algorithms. Namely, this
group has:

 S 1

  U  As Z s   add S  1  K h  K x  2 .
 s 0


Definition 6 Ternary K h , K x , S  of the positive natural integers is called the order of the
CR-model.
Definition 7 [10] Closure of order K h , K x , S 
by the transformation CR-model of the set of
algorithms A upon the task Z (further: closure CR K h , K x , S  ) is the set of the algorithms
of the CR-model, denoted as ACR Kh ,K x ,S  ,
which is obtained
- for the specified parameters K h , K x , S ,
- for admissible values of other numerical
parameters of the CR-model and
- for the fixed algorithms As Ss01 , Aprep from
the set A; algorithms have to that have the
tasks Z s s  0, S  1 and Z prep , correspondingly, in their domains:




Aprep  A Z prep  A,
t 1
g x k kKx01 and so on. Parameters from the

U ACR  U Aprep Z prep 
n  0, N  1 .
CR-model of algorithm - End
To determine the specific CR-algorithm we
have to determine several parameters f the CRmodel. It is easy to see that we can collect
these parameters into two groups. The first
group has the numerical parameters K x , K h ,

As  AZ s   A
s  0, S  1
.
Definition 8 [10] Closure by the transformation CR-model of the set of algorithms A
upon the task Z (further: closure) is the set of
the CR-model algorithms, denoted as A ,
given by:
A 

ACR Kh ,K x ,S  .
K h 1, M 1; K x 1, N 1; S 1, 2,...
131
Definition 9 [10] Algorithm A Z  A is
induced by the a prior information 0 of the
task Z (further: induced algorithm) if it has the
minimal computational complexity for the task
Z in the closure A and, also, the closure
A has no any other algorithm, which has the
same complexity and less order:


U A Z  
min U  AZ 
AZ A
 A Z   ACR Kh ,K x ,S  
~ ~ ~
  K h , K x , S  K h , K x , S 





.






min
U
A
Z

U
A
Z
 AZ ACR K~ , K~ ,S~ 

h x






Efficiency of the induced algorithm.
Construction of the efficient algorithm
Theorem 2 Induced algorithm A Z  A
upon the task Z is efficient algorithm under the
supporting set A of convolution algorithms,
used to solve Z.
■
Theorem 3 Let ADC  be the set of the only
direct convolution algorithm ADC ; let AFC 
be the set of the fast convolution algorithms;
and ARF  be the set of the recursive convolu
tion algorithm. Let A be the reduced wise
algorithm, which is constructed under the set
ADC  AFC  of the unvarying complexity algorithms.
Then,
for
any
task
Z
 A the induced algorithm
AADC AFC 
 

A Z   A is efficient under the set of algorithms ADC  AFC  AFR .
■
Last theorem gives the obvious way to construct the efficient algorithm. This way is presented in the following conclusion.
Conclusion of theorem (method for constructing the efficient algorithm) To construct
the efficient algorithm for the task Z under the
set of algorithms ADC  AFC  AFR  it is
necessary:
 to construct the wise algorithm A under the
supporting set ADC  AFC  of algorithms
(algorithm ADC has to have the required
domain),

 to construct the reduced wise algorithm A
from the wise algorithm A ;
 to construct the induced algorithm

A Z  A Z  (of the task Z), which belongs to the closure of the set of the only re
duced wise algorithm A Z  .
■
This conclusion determines the order of operations, which give the efficient convolution algorithm. Moreover, top two operations are fully formalized for technological and/or program
implementation. The difficulty of the last operation, i.e. the construction of the induced algorithm, depends on the properties of the field
F.




Because of the limited space of this paper, it is
impossible to present the details of the work in
it. Therefore, the presentation will present:
 the way to construct the reduced and wise
algorithms,
 several theorems and propositions, which
prove the equivalence of the different orders of the operations (reducing, extension
and wise algorithm constraction).
Moreover, some results on the induced algorithm construction will be presented. In addition, the examples of the analytical construction of the efficient algorithm will be given.
Conclusion
A problem of the construction of a computationally efficient convolution algorithm has
been considered. It has been proved that the
process of the efficient algorithm construction
may be presented as three sequential operations. Some aspects of these operations have
been given. The propositions presented the
necessary and sufficient criteria on the efficiency and strict efficiency of the constructed
algorithm have been presented.
References
1. Rabiner L.R., Gold B. Theory and applications of
digital signal processing // Prentice-Hall, Inc. Englewood Cliffs, New Jersey, 1975.
2. Agayan S.S. Successes and problems of the fast orthogonal transforms // Recognition, classification
and forecasting. – M.: Nauka, 1990. Vol.3. pp.146214 (In Russian).
132
3. Ahmed N., Rao K.R. Orthogonal Transforms for
Digital Signal Processing // New York: SpringerVerlag, 1975.
4. Blahut R.E. Fast Algorithms for Digital Signal Processing // Reading, MA: Addison-Wesley, Inc.,
1984.
5. Chernov V.M. Arithmetic method used for the synthesis of the fast discrete transformation algorithms
// Doctoral thesis in discipline 05.13.17 «Theoretical
basics in informatics ». Samara: IPSI RAS, 1998.
277 pages (In Russian).
6. Labunetc V.G. Unified approach to the fast transformation algorithms // Application of the orthogonal
methods for the signal processing and systems analysis. Sverdlovsk: UPI, 1980. pp. 4-14 (In Russian).
7. Nussbaumer H.J. Fast Fourier Transform and Convolution Algorithms // Springer, Heidelberg, Germany, 1990.- 276 p.
8. Myasnikov V.V. Methods for Designing Recursive
FIR Filters // Proceedings of International Conference “Computer Vision and Graphics” (ICCVG
2004). Warsaw, Poland, September 22-24, 2004,
Springer, pp.845-850.
9. Sergeyev V.V. Parallel-recursive FIR-filters used for
image processing // Computer optics. Vol.10-11,
1992. pp.186–201 (In Russian).
10. Myasnikov V.V. On the synthesis of the efficient
algorithm under the set of convolution algorithms //
Computer optics, Vol. 29, 2006, pp. 78-117 (In Russian).
11. Bavrina A.Yu., Myasnikov V.V. Investigation of the
reduced wise algorithm under the set of convolution
algorithms // PRIA-8, Yoshkar-Ola, RF, October 713, 2007 (this conference).
Download