Hybrid Reed-Muller Haar Transform and its Application ... - IEEE Xplore

0 downloads 0 Views 250KB Size Report
In this paper we present a new hybrid transform based on the Kronecker product of Reed-Muller and. Reed-Muller Haar transforms. The proposed transform.
38th International Symposium on Multiple Valued Logic

Hybrid Reed-Muller Haar Transform and its Application in Reduction the Spectral Representations of Logic Functions Susanna Minasyan, Jaakko Astola, Karen Egiazarian Tampere International Center of Signal Processing, Tampere University of Technology, P.O.Box 553, FIN-33101, Tampere, FINLAND, email: [email protected]

Radomir Stankovic Departament of Computer Science, Faculty of Electronics, 18000 Nis, Serbia, email: [email protected]

version of the Haar transform, has been constructed as well as generalizations of this and related transforms to functions in Galois fields of different orders. Parametrized slant-Haar transforms [13] and Treestructured Haar transforms [14] have been introduced in order to solve various signal processing tasks. These transforms can be adapted to the properties of signals to be processed by carefully adjusting certain parameters. In this paper, we will exploit both of the above mentioned approaches. We will define a transform as a combination of the Reed-Muller transform [15] and the Reed-Muller Haar transform [12], with the relative sizes of the Reed-Muller and Haar parts as parameters. The value of these parameters can be selected depending on the features of the signal to be processed. This transform will be called the hybrid Reed-Muller Reed-Muller Haar (RM-RMH) transform. To ensure applicability of the new transform in practice, we determine a fast calculation algorithm based on classical theory of FFT-like algorithms and exploiting the Kronecker product structure of both constituent transforms. As an illustration of possible applications of this transform, we consider the compactness of the corresponding spectral representations of binary valued functions in the number of nonzero coefficients. To that order, we also define Fixed-polarity RM-RMH transforms. Experimental results show that, on the average, the proposed approach reduces the number of nonzero coefficients in the binary spectrum compared to the RM transform.

Abstract In this paper we present a new hybrid transform based on the Kronecker product of Reed-Muller and Reed-Muller Haar transforms. The proposed transform shares attractive properties of both Reed-Muller transform and Reed-Muller Haar transform. An example of application of hybrid transform for reduction of the number of nonzero coefficients in spectra of truth vectors of switching functions is presented. The experiments show that the proposed approach, on average, reduces the number of nonzero coefficients in the spectra of benchmark functions.

1. Introduction Different transforms have found wide applications in many areas as signal processing, image processing, filtering, spectral analysis, circuit synthesis, digital logic design, communications systems, pattern recognition etc. In particular, the Reed-Muller (RM) transform is widely used in solving different problems in logic design, such as AND-EXOR synthesis [1], testability [2]-[7], design of easy testable logic networks [see in 7], etc. The same applies to various generalizations of the Reed-Muller transform to multiple-valued functions [8]. The Haar transform is another classical spectral tool efficiently applied in the same areas [9]. Combination of different transforms is an approach to design new transforms with properties well suited for some particular applications. For instance, the Hadamard-Haar transform (HHT) based on combination of Hadamard and Haar transforms has been introduced in [10],[11]. The basis functions of HHT are linear combinations of Haar and Walsh functions. Such combinations have been useful in feature selection, Wiener filtering and image processing. Recently new classes of discrete Haar wavelets have been derived allowing multiresolution analysis in different algebraic structures [12], [18]. An algorithm for derivation of Haar transform in different vector spaces has been also provided [12]. In particular, the Reed-Muller Haar transform (RMH), that can be viewed as a binary

0195-623X/08 $25.00 © 2008 IEEE DOI 10.1109/ISMVL.2008.8

2. Reed-Muller Haar Transform This section describes the Reed-Muller Haar transform in Galois field of different orders. We first repeat the definition of the Reed-Muller Haar transform given in [12]. Denote by P ( G ) the space of the functions

f : G → P , where G is a finite group and P is a field that may be the complex field C or a finite (Galois) field

232

GF(p). In this notation, the space of switching functions of n variables will be denoted by GF2 (C2n ) , where C2 is

 HT ( n − 1) ⊗ [1 1] H ( n) =  ,  I ( n − 1) ⊗ [0 1] 

the cyclic group of order 2, i.e., C2 =< {0,1} , ⊕ > , and ⊕ is the addition modulo 2 or logic EXOR. When a function f ∈ P(C pn ) is given by the truth vector

(

(1)

where H (1) = ( R (1) ) is the RM transform of order 2. T

For p=3 the RMH of order 3n is the following: THT ( n − 1) ⊗3 [1 1 1]   TH ( n ) =  I ( n − 1) ⊗3 [0 1 2]  ,    I ( n − 1) ⊗3 [0 1 1] 

)

F = [ f ( 0 ) ,..., f p n − 1 ]T then the spectrum and the

series expansion for f are defined as S f = Q −1 ( n ) F ,

(2)

T

where TH (1) = ( GF3 (1) ) is the RMH transform of order

F = Q (n) S f ,

3, and ⊗3 is the Kronecker product modulo 3.

where S f = [S(0),..., S( p n − 1)]T is the vector of spectral coefficients in the expansion with respect to the basis Q defined by columns of the matrix

3. Proposed Hybrid Transforms

n

Q ( n ) = ⊗ Q (1) ,

In this section we define a new hybrid transform by combining the RM and RMH transforms. We give also a fast calculation algorithm for the hybrid transform. Here due to the performance efficiency in chosen application discussed in Section 5, we use the following version of RMH transform of order 2n:  H ( n − 1) ⊗ [1 0] (3) H ( n) =  .  I ( n − 1) ⊗ [1 1]

i =1

where Q (1) is the Fourier transform matrix in P (C p ) or the matrix defining the product terms in polynomial expressions in P (C p ) . Definition 1 (Haar functions): Haar functions in P (C np ) are defined by the columns of the following matrix:  H ( n − 1) ⊗ q 0    I ( n − 1) ⊗ q1   , H ( n) =   #   I ( n − 1) ⊗ q p −1  where q i , i = 0,..., p − 1 are rows of QT (1) for P=GF(p), and of Q −1 (1) for P = C , and I ( r ) is the identity matrix of order r . For a function f ∈ P(C pn ) given by its truth vector F the Haar spectrum and the series expansion are defined as: S f = H −1 ( n ) F, F = H (n)S f ,

,

where S f is the vector of Haar spectral coefficients with respect to basis Q (1) . Example 1: For p=2, 3, 4 the basic Q (1) matrices used to define the Haar functions are the following: 1 0 0 0 1 0 0    1 0 1 1 1  , GF (1) = 1 1 1 1  . = R (1) =  , GF (1) 3 4    1 2 3 1  1 1  1 2 1    1 3 2 1  For p=2 the Reed-Muller Haar (RMH) transform of order 2n has the following form:

233

The difference between transforms (1) and (3) is that we use in (3) the non-transposed RM transform. Example 2: For n=3 the modified RMH transform H(3) is 1 0 0 0 0 0 0 0   1 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0   0 0 0 0 1 0 1 0  . H (3) = 1 1 0 0 0 0 0 0   0 0 1 1 0 0 0 0 0 0 0 0 1 1 0 0   0 0 0 0 0 0 1 1 Definition 2 (0-polarity hybrid transform): The forward RMH transform of order N = 2n with an integer parameter r is defined as T ( n, r ) = R ( r ) ⊗ H ( n − r ) , 0 ≤ r ≤ n , (4)

r where R ( r ) is the Reed-Muller transform of order 2

and H ( n − r ) is the Reed-Muller Haar transform of order n-r 2 . The parameter r can be selected appropriately to best exploit the features of the function to be represented in order to get the smallest number of nonzero coefficients. In particular, we will consider the following cases of this hybrid transform: 1. If r = 0, then T(n, 0) = H(n). 2. If r = 1 and r = 2, then

T ( n,1) = R (1) ⊗ H ( n − 1) , T ( n, 2 ) = R ( 2 ) ⊗ H ( n − 2 ) .

3.1 Ternary Hybrid Transform

3. If r = n, then T(n, n) = R (n) . In the case 1 the hybrid transform coincides with the RMH transform, while in the case 3 the hybrid transform coincides with the RM transform of order 2n . Example 3: For n = 3 and r = 1, the hybrid transform matrix T ( 3,1) and its inverse T−1 (3,1) are

The hybrid transform may be extended also from binary to higher order fields. Here we give briefly the definition of the hybrid RM-RMH transform over GF(3), thus, the addition and multiplication operations are done modulo 3. Definition 3 The ternary hybrid RM-RMH transform of order N=3n with an integer parameter r is defined as M ( n, r ) = TR ( r ) ⊗3 TH ( n − r ) , where TR(r) is the ternary RM transform of order 3r, TH(n-r) is the ternary RMH transform of order 3n-r, and ⊗3 is the Kronecker product modulo 3. Example 4: For n=2, r=1 the ternary hybrid transform is M ( 2,1) = TR (1) ⊗3 TH (1) =

T ( 3,1) = R (1) ⊗ H ( 2 ) = 1  1 1  0 = 1  1 1  0

0 0 0 0 0 0 0  0 1 0 0 0 0 0 1 0 0 0 0 0 0  0 1 1 0 0 0 0 0 0 0 1 0 0 0  0 1 0 1 0 1 0 1 0 0 1 1 0 0  0 1 1 0 0 1 1 

1  1 1  1 = 1  1 1  1  1

and T−1 (3,1) = R (1) ⊗ H −1 ( 2 ) = 1 0 0 0 0 0 0 0    1 0 1 0 0 0 0 0  1 1 0 0 0 0 0 0    0 0 1 1 0 0 0 0 = . 1 0 0 0 1 0 0 0    1 0 1 0 1 0 1 0  1 1 0 0 1 1 0 0    0 0 1 1 0 0 1 1  Both the RM and RMH transforms have fast calculation algorithms. The fast algorithm for the RM transform has the structure similar to that of the Hamadard transform, while the flowgraph of the RMH transform is similar to that of the fast Haar transform. Figure 1 illustrates the butterfly diagram of the fast RMH transform. As for many fast transforms, the fast hybrid RM-RMH transform may be calculated by a product of sparse factor matrices. In Figure 2, the fast hybrid RMRMH transform flowgraph is shown for the case r=1, N=8. The butterfly diagram of hybrid transform has a structure of fast Hadamard-Haar transform [3],[4]. The number of additions required to implement the fast RM is ( N 2 ) ⋅ log 2 N . The computational cost of the fast RMH transform is N – 1. For the hybrid RM-RMH transform of order N and the parameter r , the number of additions in

0 0 0 0 0 0 0 0  1 1 0 0 0 0 0 0 2 1 0 0 0 0 0 0  0 0 1 0 0 1 0 0 1 1 1 1 1 1 1 1 ,  2 1 1 2 1 1 2 1 0 0 2 2 2 1 0 0  1 1 2 2 2 1 1 1  2 1 2 1 2 1 2 1

1 0 0  where TR (1) = TH (1) = 1 1 1  is the ternary RM 1 2 1  transform of order 3. For that case, the ternary hybrid transform coincides with the ternary RM transform of the same order. The ternary hybrid transform based on ternary RMH transform (2) can be also considered and may be useful in many applications where similar transforms over Galois field have already found interesting applications [2],[9], [16], [18].

4. Fixed-polarity Hybrid Transform In this section the fixed polarity hybrid RM-RMH transforms based on both fixed-polarity RM and fixed polarity RMH are proposed. First, we define the fixedpolarity RMH transform. Definition 4 The fixed polarity RMH transform

fast implementation is 2r ⋅ ( N / 2r − 1) + r ⋅ ( N / 2) . It should be noticed that the computational costs are different for different values of r. In other words, for r=1,2,...,n-1 the number of additions in the fast algorithm is between the number of additions corresponding to the RMH and RM transforms.

(FRMH)

H

hn

( n)

with

the

polarity

h n = ( h1 , h2 ,..., hn ) , where hi ∈ {0,1} , is defined as

234

vector

0 0 0  0 1 0 0 1 0  0 0 0 = 1 1 0  0 0 1 0 0 0  0 0 0 We now define the transform. Definition 5 For an

Figure 1. Flowgraph of fast RMH transform of order N=8.

0 0 1 0 0  0 0 1 0 0 1 0 0 0 0  0 0 1 0 1 . 0 0 0 0 0  1 0 0 0 0 0 1 1 0 0  0 0 0 1 1  fixed-polarity hybrid RM-RMH

n-variable switching function, the

fixed-polarity hybrid RM-RMH transform Thn ( n, r ) with the parameter r and the polarity vector h n = ( h1 , h2 ,..., hn ) , hi ∈ {0,1} , is defined as: Th n ( n, r ) = R h r ( r ) ⊗ H h n − r ( n − r ) = h  r   H n − r −1 ( n − r − 1) ⊗ C w  (6) =  ⊗ R hr (1)  ⊗  , I n − r −1 ⊗ [1 1]  i =1    0≤r≤n, where R hr ( r ) is the RM transform of order 2r for the

polarity vector h r = ( h1 , h2 ,..., hr ) , and the H hn − r ( n − r )

Figure 2. Flowgraph for fast 0-polarity hybrid RM-RMH transform with parameter r=1 and order N=8.

H

hn

where H

w  hn −1 ( n ) = H ( n − 1) ⊗ C  , I ( n − 1) ⊗ [1 1] 

h n −1

is the fixed-polarity RMH of order 2n − r for the polarity vector h n − r = ( hr +1 , hr + 2 ,..., hn ) and parameter r. The polarities for the RM and RMH transforms of order 2 are  1 0    , hi = 0  1 1 hi hi . R (1) = H (1) =   0 1 , h = 1  1 1 i  

(5)

( n − 1) is FRMH for the polarity vector

h n −1 = ( h1 , h2 ,..., hn −1 ) , and C polarity number w, that is,

C

w

=

{

w

is a vector with the

Notice that this definition of the hybrid fixed-polarity RM-RMH transform is similar to the corresponding definitions of other fixed-polarity transforms, as for instance, the recently defined multi-polarity generalized Haar and arithmetic-Walsh transforms [16],[17].

[1 0], w = 0 [0 1], w = 1

where the polarity w = hn is the last component of the polarity vector hn . Example 5: For n=3, and the polarity vector h3={1,0,1} the FRMH transform of order N=2n is  H (1,0) ( 2 ) ⊗ C (1)  h H 3 ( 3) =  =  I ( 2 ) ⊗ [1 1]    0 1  ⊗ [1 0]    1 1 ⊗ =    I 1 ⊗ [1 1]    ( )  I 2 ⊗ ( ) 

5. Application of the Hybrid RM-RMH Transform to the Reduction of Spectral Representations In this section, we consider the application of the hybrid RM-RMH transform for the 0-polarity and the fixed-polarity to the reduction of the number of nonzero coefficients in spectral representations of n-variable switching functions. A switching function f defined by the truth-vector F is transferred into the spectral domain by T(n, r ) transforms

  [0 1] =  1 1 [ ] 

235

spectrum. In fifth column the number of nonzero elements in the spectrum of fixed-polarity RMH transform (FRMH) is given. As we see, the FRMH transform increases the number of nonzero spectral coefficients, which is a justification to consider the hybrid transforms. In the last column denoted by FHybr we give the results of applying the method based on fixed-polarity hybrid RM-RMH transform. This method is described by the Algorithm 2 in the previous section. The method outperforms the FPRM for at about 32%. Table 3 compares the number of 4-variable functions requiring a given number of products t, where t = 0,…,16, in the minimum expressions. The average number of products per each function for different expressions is given in the last row of the table. In the columns 2 and 4, the results for the positive polarity RM (PRM) and fixed polarity RM expressions are given, respectively. The number of functions requiring t products for RMH transform is not given in this table since it coincides with the case of PRM. The fifth column, FRMH, shows the results for fixed polarity RMH expressions. In columns 3 and 6, the number of functions requiring t products for 0-polarity hybrid transform and fixed-polarity hybrid transform expressions are given, respectively. As one can see from Table 3, the PRM requires, on average, 8.00 products to realize an arbitrary function, while the Hybr require only 6.71 products. At the same time, the fixed-polarity hybrid transform (FHybr), on average, requires fewer number of products than the FRMH and FRM expressions.

of order 2n , r=0,1…,n, defined according to (4), (6) resulting in vector of spectral coefficients: S = T(n, r ) ⋅ F , (7) The approaches utilizing the proposed spectral transforms may be described by two algorithms. Algorithm 1: 1) Given an n-variable switching function by its truth vector F. For r = 0,1,...,n, calculate the spectra Sr = T(n, r ) ⋅ F, where, according to (4), the T(n, r ) is the 0-polarity hybrid RM-RMH transform. Then, calculate the number of nonzero binary spectral coefficients. 2) Find an optimal transform T∗ (n, r ) that gives the minimal number of nonzero spectral coefficients. In this approach n+1 transforms are considered. Algorithm 2: 1) Given an n-variable switching function by the truthvector F. Then, for every r =0,1,...,n, calculate the fixedpolarity hybrid RM-RMH transforms (6), combining the fixed-polarity RM and fixed-polarity RMH transforms. In other words, for every polarity vector hr all combinations of polarity vectors h n − r of FRMH transform are considered. In that case, for each r, we consider 2n transforms. Then, calculate the number of nonzero coefficients Numr in spectra of thus obtained transforms. 2) Find an optimal transform having the corresponding optimal polarity vector h*n ={ hr , hn - r } that gives the

Table 1. The number of nonzero coefficients in the spectra of RM and hybrid transforms.

minimal number of nonzero spectral coefficients.

6. Experiments The proposed approaches were tested via experiments on a set of different benchmark functions and results were averaged. Tables 1, 2 and 3 illustrate the results for a sample of 10 benchmark functions randomly selected. In Tables 1 and 2 the second column denoted by in shows the number of input variables of an n-variable binary function. The third column shows the number of 1’s in the original domain. In Table 1 the columns RM and RMH, give the number of nonzero elements in spectrum of the RM and RMH transforms. The last column denoted by Hybr shows the results of applying the Algorithm 1, that is, the number of nonzero elements in the spectra of hybrid RMRMH transforms for the 0-polarity. The results show that on average the proposed approach reduces the number of nonzero coefficients to 76.1 which is about 49.02% better than in the case of the RM transform. In Table 2 the fourth column shows the number of nonzero coefficients in the fixed-polarity RM (FRM)

Bench.

in

#1

RM

RMH

Hybr

clip0

9

256

clip1

9

256

86

36

36

86

175

72

clip2

9

256

88

309

79

clip3

9

256

93

161

81

clip4

9

256

105

85

61

9sym

9

420

272

102

102

rnd10

10

871

398

200

195

rd84_1

8

121

137

77

56

rd84_2

8

128

85

85

23

rd84_4

8

162

143

56

56

298

149.3

128.6

76.1

13.8

49.02

average

improvement compared to RM (%)

236

Extensions to the generalized Reed-Muller and ReedMuller Haar transforms for multiple-valued functions are possible and will be the subject of a future work.

Table 2. The number of nonzero coefficients in the spectrum of fixed-polarity RM and hybrid transforms. Bench

in

#1

FRM

FRMH

FHybr

clip0

9

256

86

35

35

clip1

9

256

82

174

60

clip2

9

256

78

307

68

clip3

9

256

81

152

78

clip4

9

256

65

73

47

9sym

9

420

135

90

90

rnd10

10

871

309

176

174

rd84_1

8

121

40

77

40

rd84_2

8

128

12

85

12

rd84_4

8

162

64

54

44

298

95.2

122.3

64.8

average

improvement compared to FRM

-28.5%

8. References [1] T. Sasao, Switching Theory for Logic Synthesis. Kluwer Academic Publishers, 1999. [2] S. Agaian, J.T. Astola, and K. Egiazarian, Binary Polynomial Transforms and Nonlinear Digital Filters. Marcel Dekker, New York, 1995. [3] T. Damarla, M.G. Karpovsky, "Detection of stuck-at and bridging faults in Reed-Muller canonical (RMC) network”, IEE Proceedings, Pt. E, vol. 136, No. 5, 1989, pp. 430-433. [4] E.V. Dubrova, J.C. Muzio, "Testability of Generalized Multiple-Valued Reed-Muller Circuits,” Proc. of 26th IEEE Int. Symp. on Multiple-Valued Logic, (ISMVL'96),1996, pp.56-61. [5] V.E. Dubrova, J.C. Muzio, “Easily Testable MultipleValued Logic Circuits Derived from Reed-Muller Circuits”, IEEE Transactions on Computers, vol. 49, No. 11, 2000, pp.1285 – 1289. [6] M.G. Karpovsky, (ed.), Spectral Techniques and Fault Detection. Academic Press, Orlando, Florida, 1985. [7] D. Varma, L.A. Trachtenberg, "Efficient spectral techniques for logic synthesis", in T. Sasao, (Ed.), Logic Synthesis and Optimization. Kluwer Academic Publishers, 1993, pp.215-232. [8] D.H. Green, "Reed Muller expansions with fixed and mixed polarities over GF(4)," IEE Proc., Part E, vol. 137, No. 5, 1990, pp.380-388. [9] S.L. Hurst, "The Haar transform in digital network synthesis," Proc. 11th Int. Symp. on Multiple-valued Logic, 1981, pp.10-18. [10] K. Rao, M. Narasimhan, K. Revuluri, “Image data processing by Hadamard-Haar Transform,” IEEE Trans.on Computers, vol.24, No.9, 1975, pp. 888-896. [11] K. Rao, A. Jalali, P. Yip, “Rationalized Hadamard-Haar Transform,” in Proc. 11st Ann. Asilomar Conf. Signals Syst. Comput., 1977, pp.194-203. [12] R. Stankovic, C. Moraga, “Design of Haar Wavelet Transforms and Haar spectral transform decision diagrams for multiple-valued functions,” Proc. of 31 IEEE Int. Symp. on Multiple-valued Logic (ISMVL’01), 2001, pp.311-316. [13] S. Agaian, K. Tourshan, J.P. Noonan, "Parametrisation of slant-Haar transforms," IEE Proc. Vis. Image Signal Process., vol. 150, No. 5, 2003, pp.306-311. [14] K. Egiazarian, J.T. Astola, "Tree-structured Haar transfo rms," Jour. of Math. Imaging and Vision,vol. 16, 2002, pp.269-279. [15] D.H. Green, "Generalized partially-mixed-polarity ReedMuller expansion and its fast computation", IEEE Trans. Computers, vol. 45, No. 9, 1996, pp.1084-1088. [16] B. Falkowski, “Generalized Multi-Polarity Haar Transform”, Proc. IEEE Int. Symp.on Circuits and Systems (ISCAS’02), 2002, pp.757-760. [17] B. Falkowski, S. Yan, “Properties and Relations for Hybrid Multi-Polarity Arithmetic-Walsh Transform”, Proc. th IEEE Midwest Symposium on Circuits and Systems (48 MWSCAS), 2005, pp.583-586. [18] Astola, J., Yaroslavsky, L., Advances in Signal Transforms, Theory and Applications, Hindawi Publishing, 2007.

32 %

Table 3. Number of 4-variable functions requiring t products. t 0 1 2 3 4 5 6 7 8 9 10

PRM 1 16 120 560 1820 4368 8008 11440 12870 11440 8008

Hybr 1 33 287 1347 4121 8926 14015 15744 12312 6417 2026

11 12 13 14 15 16 av.

4368 1820 560 120 16 1 8.00

301

6.71

FRM 1 81 836 3496 8878 17884 20152 11600 2336 240 32

FRMH 1 31 322 1658 5114 10746 14962 14890 10262 4978 1906

FHybr 1 81 1324 6080 14686 20580 17576 4488 696 24

530 122 10 2 2 5.50

6.52

4.96

7. Conclusions In this paper the hybrid binary and ternary RM-RMH transforms as well as fixed-polarity binary RM-RMH transforms are proposed. We give also an example of application of these transforms to the reduction of the number of nonzero spectral coefficients. The experiments show that the proposed techniques on average outperform both the RM and fixed-polarity RM expressions.

237