Next Article in Journal
Towards Robust SDN Security: A Comparative Analysis of Oversampling Techniques with ML and DL Classifiers
Previous Article in Journal
Application of Optical Communication Technology for UAV Swarm
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Fast Algorithms for Short-Length Odd-Time and Odd-Frequency Discrete Hartley Transforms

by
Marina Polyakova
1,
Aleksandr Cariow
2,* and
Jekatierina Sklyar
3,*
1
Institute of Computer Systems, Odesa Polytechnic National University, Shevchenko Ave., 1, 65044 Odesa, Ukraine
2
Faculty of Computer Science and Information Technology, West Pomeranian University of Technology, Szczecin, Żołnierska 49, 71-210 Szczecin, Poland
3
Faculty of Electrical Engineering, West Pomeranian University of Technology, Szczecin, ul. Sikorskiego 37, 70-313 Szczecin, Poland
*
Authors to whom correspondence should be addressed.
Electronics 2025, 14(5), 996; https://doi.org/10.3390/electronics14050996
Submission received: 21 January 2025 / Revised: 21 February 2025 / Accepted: 24 February 2025 / Published: 28 February 2025

Abstract

:
This paper proposes fast algorithms for odd-time and odd-frequency discrete Hartley transforms (DHTs) with normalization if the size of the input sequence ranges from 2 to 8. Fast algorithms for small-sized inputs can be included as modules in fast algorithms for discrete transforms of large-length input sequences. The existing fast odd-time DHT and odd-frequency DHT algorithms are primarily radix-type algorithms, specifically, radix-2 and prime factor algorithms. However, the algorithms in the literature do not normalize the initial transform. This means that after applying such algorithms, additional N multiplications are required. In this paper, the structural approach is exploited supposing that the starting point to design the fast algorithms is a matrix vector product expression. The factorization of the matrices of DHT coefficients is produced to reduce computational complexity taking into account the repetition and arranging of the matrix entries. The strict mathematical background proves the correctness of the obtained algorithmic solutions. Also, the MATLAB R2023b environment was applied for testing of the performance of the proposed algorithms. The obtained factorizations of the odd-time DHT and odd-frequency DHT matrices allow us to reduce the number of multiplications by 69%, while the amount of additions is decreased by about of 5% for odd-time DHTs and 8% for odd-frequency DHTs if the length of input data is in the range from 2 to 8. A comparison is provided with the direct calculation of the matrix vector product. Additionally, the computational complexity for each obtained solution is compared with the computational complexity of the existing fast algorithms for odd-time DHTs and odd-frequency DHTs. In addition, data flow graphs have been created for the proposed odd-time DHT and odd-frequency DHT algorithms. The modular space–time structure of the resulting data flow graphs is suitable for VLSI implementation.

1. Introduction

The DHT is widely applied in digital signal and image processing to obtain the frequency representation of data [1,2,3]. This transform is used in image compression [4], smart grid applications [5], wireless communication [6], audio watermarking [7], digital image watermarking [8,9,10], signal processing [11], and other applications. This transform can successfully supplement the discrete cosine transform (DCT) in different applications due to additional exploiting of the sine transform [1,2,3]. The latter allows for the processing of the signal details at high noise levels with better performance. For example, in [12], the DHT is applied in three-dimensional (3D) medical image compression. X-ray angiogram (XA) and magnetic resonance (MR) data with varied resolutions and with different numbers of frames/slices were processed. Each XA or MR data point was represented by a 3D array which was divided into blocks of size 8 × 8 × 8, and then a 3D DHT and a 3D zigzag scheme were employed. For comparison, the 3D DCT was applied with the corresponding zigzag pattern [13]. In the full 3D DHT-based codec implementation, only the first L zig-zag coefficients are preserved, encoded by entropy coding [14], and then transmitted and/or stored. However, to study the effect of the 3D DHT block, the bitrate in bit per voxel (bpv) must be calculated before entropy coding. As a result, both transforms have shown better performance at compressing XA data than MR data. Compared with the DCT on the XA data [15], approximate versions of the exact 3D DHT and the one proposed in [12] present better performance than the 3D DCT in terms of peak noise–signal ratio for the low bitrate ranging from 1 bpv to 6 bpv.
To increase robustness against various noise disturbances, similar advantages of the DHT are employed in image and audio watermarking [8,9,10]. Additionally, a significant reduction in the multiplicative complexity allows us to increase the computing efficiency and save resources [12].
To date, different DHT types have been exploited, specifically a generalized DHT [16,17], sliding DHT [18], two-dimensional DHT [19,20], 3D DHT [12], etc. However, the traditional DHT is still the most developed and researched transform compared with other types of DHT transforms [21,22,23,24]. In our paper, the odd-time DHT and odd-frequency DHT are considered. The odd-frequency DHT allows for data processing of frequencies that are centred in the range of those employed by the traditional DHT.
Direct computation of the different types of DHTs requires a huge number of arithmetic operations. Specifically, direct computation of the odd-time DHT or odd-frequency DHT of an N-point sequence requires N 2 multiplications which are especially time- and resource-consuming. To achieve a reduction in computational complexity, fast DHT algorithms have been designed [23,24,25]. But in articles devoted to the efficient implementation of the odd-time DHT and odd-frequency DHT, large-length inputs are considered [17,25,26,27,28,29,30,31]. It should be noted that more complex fast algorithms can be designed with modules containing odd-time DHT and odd-frequency DHT algorithms for short-length sequences [17]. In particular, in [21], a 2 m n -point odd-frequency DHT is used to develop a split algorithm for a 2 m -point traditional DHT with reduced arithmetic complexity, where n is changed in the range from 1 to m. Once constructed, odd-time DHT and odd-frequency DHT algorithms for small-size inputs can be successfully exploited in different applications. As such, the development of fast odd-time DHT and odd-frequency DHT algorithms for short-length input sequences is a topical issue, and the appropriate approach for solving the determined parts of a general problem should be selected.

1.1. Related Papers

Most of the fast odd-time DHT and odd-frequency DHT algorithms are designed based on the divide-and-conquer strategy [17], which means obtaining a solution of a large problem via a set of solutions of smaller tasks. Bearing in mind this strategy, radix-type algorithms were developed including radix-2 and prime factor algorithms.
Thus, the radix-2 fast odd-time DHT and odd-frequency DHT algorithms were proposed in [17,26,27,28,29]. In [26,27] the proposed fast algorithms decompose the N-point odd-time DHT into two adjacent N/2-point odd-time DHTs. Such fast odd-time DHT algorithms save from 16% to 24% of the arithmetic operations in comparison with Hu’s algorithm if N varies from 16 to 64 [26].
In [17] the N-point odd-frequency DHT is decomposed into the N/2-point odd-frequency DHT and the N/2-point odd-time odd-frequency DHT. For odd-time DHT similar algorithms are also proposed. As a result, the computational complexity of the N-point odd-time DHT and odd-frequency DHT is reduced. In [28] the odd-frequency DHT of length N = 2 m was represented by several 16-point odd-frequency DHTs. Then the 16-point odd-frequency DHT is calculated by first-order moments. As a consequence, a needed number of additions and multiplications is lower than in other existing algorithms.
In [29,30] radix-2 fast algorithms are developed for the VLSI implementation of odd-time DHT and odd-frequency DHT of length N = 2 m . The algorithms differ by parallelism as well as regular and simple computational structure with low arithmetic cost.
Developed in [26,27,28,29] the fast odd-time DHT and odd-frequency DHT algorithms apply the decimation-in-frequency approach. However, for real-time applications the fast algorithms based on the decimation-in-time approach are preferable. Presented in [31] the radix-2 fast odd-time DHT algorithm with decimation-in-time substantially saves the arithmetic operations relative to Hu’s algorithm. Also, in [31] a regular signal flow graph is constructed which can be used for odd-time DHT with different lengths of inputs.
In [32] a split-radix algorithm with decimation-in-time splits N-point odd-time DHT into N/2-point odd-time DHT for even indexed samples and two odd-time DHTs of length N/4 for odd-indexed samples. Thus the number of multiplications and additions was reduced up to 29% and 10% respectively in comparison with the radix-2 odd-time DHT algorithm [31].
Mentioned radix-2 odd-time DHT and odd-frequency DHT algorithms are cost-effective but when the input sequence length is not a power of two the computational overhead frequently arises. Thus the prime factor algorithms are introduced in [17] for sequence lengths N = p × q, where p and q are relatively prime. The first prime factor algorithm decomposes the N-point odd-time DHT into p q-point odd-time DHT and q p-point odd-time DCTs. A similar decomposition also takes place for odd-frequency DHT by replacing odd-time transforms with odd-frequency transforms. However, in this case, irregularity in the index mapping occurs. To implement the in-place computation, which is easily attained by the radix-2 algorithms, the second prime factor algorithm was developed [17]. The N-point odd-time DHT is decomposed into N/q q-point odd-frequency DCTs and q N/q-point odd-time DHTs. The N-point odd-frequency DHT computation is decomposed into q N/q-point odd-frequency DHTs and N/q q-point odd-time DCTs.
Along with the algorithms synthesized based on the divide-and-conquer strategy, the algebraic signal processing is taken into account to develop the fast odd-time DHT and odd-frequency DHT algorithms. Thus, in [33] the polynomial transforms, linear congruencies, and index permutations are applied to design the fast odd-time DHT and odd-frequency DHT algorithms. In [11] fast general-radix algorithms for a wide class of orthogonal trigonometric transforms are provided. This transform class includes the odd-time DHT and odd-frequency DHTs and related algorithms are obtained by manipulating the polynomial algebras instead of manipulating the transform expression.
The short review of existing fast odd-time DHT and odd-frequency DHT algorithms has allowed defining their drawbacks and formulation of unsolved parts of the general problem of reducing computational complexity.

1.2. The Main Contributions of the Paper

After review, we note that the existing fast odd-time DHT and odd-frequency DHT algorithms are developed using polynomial algebras or radix-type approach. However, several papers devoted to fast algorithms for orthogonal trigonometric transforms exploit a structural approach that compares the transform coefficient matrix with matrix patterns [34,35,36,37,38,39]. As an option, these matrix patterns are introduced in [34] based on Winograd’s approach to the fast algorithm development. The advantage of the structural approach is the factorization of the transform matrix on sparse, scaled orthogonal, rotational, or rotational-reflection matrices [38,39]. Moreover, based on the structural approach we can obtain the data flow graphs of odd-time DHT and odd-frequency DHT algorithms with only one multiplication along the critical path [34,35,36,37]. If there is more than one multiplication in the critical path of the algorithm, then this will create additional problems for the implementation of computations.
In [37] based on the structural approach efficient algorithms for small-sized odd-time DHT were developed that do not consider the normalizing coefficients. Many authors do this, naively thinking that the result can be multiplied by the normalizing constants at subsequent stages of data processing and combined with other calculations. However, this trick cannot always be implemented, and then the normalization still has to be introduced leading to the need to perform N additional multiplications. This means that to obtain true quantitative estimates of the computational complexity of the proposed solutions, it is necessary to include N additional multiplications for each N-point algorithm, otherwise such estimates will be incorrect. To avoid such shortcomings, it is necessary to consider the normalizing constants in the original transform matrix at the very beginning.
The article [34] describes a general approach to constructing reduced complexity algorithms for calculating matrix-vector products in those cases where the matrices have certain structures. In the paper, we apply this approach to specific transforms, namely, odd-time DHT and odd-frequency DHT. Taking into account the normalization of these transforms is influenced by the number of arithmetic operations, and in some cases on the matrix structure. As a result, the mentioned approach can also allow us to obtain new interesting solutions if normalization is kept in mind.
Therefore, in this article, we consider the case of factorization of the original transformation matrices, the entries of which are already initially multiplied by the corresponding normalizing constants. This paper aims to reduce the computational complexity of the odd-time DHT and odd-frequency DHT with normalization via developing fast algorithms. We base on the structural approach supposing that input sequence length N is changed from 2 to 8.
The article is organized as follows. The considered problem is introduced and the research subject is formulated in Section 1. Brief mathematical background is provided and the used notations are defined in Section 2. Section 3 is devoted to odd-time DHT and odd-frequency DHT matrix factorizations for different N from 2 to 8 and following obtaining of the fast odd-time DHT and odd-frequency DHT algorithms via the data flow graphs. In Section 4 and Section 5 the computational complexity of the proposed fast odd-time DHT and odd-frequency DHT algorithms is evaluated. In Section 6 the conclusions are provided.

2. Preliminary Background

The traditional DHT is expressed as follows [17]:
y k = n = 0 N 1 x n cas 2 π nk N ,   k = 0 ,   1 ,   ,   N 1 ,
where casθ = sinθ + cosθ = 2 cos(θ π/4);   y k is the output data sequence after the traditional DHT; x n is the sequence of input data; N is the number of signal samples.
The direct generalized DHT can be described by the following expression [17]:
y k = n = 0 N 1 x n cas ( n + n 0 ) ( k + k 0 ) 2 π N ,   k = 0 ,   1 ,   ,   N 1 ,
where y k is the output sequence after the direct generalized DHT; n 0 is a time shift; k 0 is a frequency shift.
Using the expression (2) we have the traditional DHT if n 0 = 0 ,   k 0 = 0 , the odd-time DHT if n 0 = 1 / 2 ,   k 0 = 0 , the odd-frequency DHT if n 0 = 0 ,   k 0 = 1 / 2 , the odd-time odd-frequency DHT if n 0 = 1 / 2 ,   k 0 = 1 / 2 .  When for the odd-time DHT with normalization the expression (2) is represented as follows [17]:
y k = 1 N n = 0 N 1 x n cas π 2 n + 1 k N ,   k = 0 ,   1 ,   ,   N 1 ,
where y k is the output sequence after the odd-time DHT.
For the odd-frequency DHT with normalization we derive the expression (2) as follows [17]:
y k = 1 N n = 0 N 1 x n cas π 2 k + 1 n N ,
where y k is the odd-frequency DHT outputs, k = 0 ,   1 ,   ,   N 1 .
The odd-time DHT and odd-frequency DHT can be obtained as a matrix-vector product:
Y N × 1 = C N X N × 1 ,
where C N = c 0 , 0 c 0 , 1 c 0 , N 1 c 1 , 0 c 1 , 1 c 1 , N 1 c N 1 , 0 c N 1 , 1 c N 1 , N 1 , c k n = 1 N cas π 2 n + 1 k N for odd-time DHT, and c k n = 1 N cas π 2 k + 1 n N for odd-frequency DHT, n, k = 0, …, N − 1; Y N × 1 = y 0 ,   y 1 ,   ,   y N 1 T , X N × 1 = x 0 ,   x 1 ,   ,   x N 1 T .
Because the generalized DHT with normalization is orthonormal then the matrices of inverse transforms are transposed to the direct ones. That is, for odd-time DHT the inverse is odd-frequency DHT and vice versa. For traditional DHT the inverse transform is the same [40].
In the article the following notations and abbreviations are used [34]:
  • ⊕ is the direct sum of two matrices;
  • I N is an order N identity matrix;
  • ⊗ is a Kronecker product of two matrices;
  • H 2 is a 2 × 2 Hadamard matrix;
  • s m ( N ) is a multiplier;
  • P N is a permutation matrix;
  • W M × N is a block-diagonal matrix of size M × N;
  • W N , D N are block-diagonal and diagonal matrices of size N × N, respectively;
  • an empty cell in a matrix means that it contains zero;
  • DHT is a discrete Hartley transform;
  • VLSI is very large-scale integration;
  • DCT is a discrete cosine transform;
  • XA is a X-ray angiogram;
  • MR is magnetic resonance;
  • 3D is a three-dimensional data.

3. Reduced Complexity Algorithms for Short-Length Odd-Time DHT and Odd-Frequency DHT

3.1. Algorithms for 2-Point Odd-Time DHT and Odd-Frequency DHT

To develop the algorithm for two-point odd-time DHT with normalization we consider the expression:
Y 2 × 1 = C 2 X 2 × 1 ,
where C 2 = a 2 a 2 a 2 a 2 , a 2 = 1 2 cas 0 = 1 2 0.7071, b 3 = 1 3 cas π 3 0.7887, c 3 = 1 3 cas 2 π 3 0.2113, Y 2 × 1 = y 0 ,   y 1 T , X 2 × 1 = x 0 ,   x 1 T . The expression (6) for two-point odd-frequency DHT with normalization is the same because C 2 = C 2 T .
Then the factorization of the odd-time and odd-frequency DHT matrix for N = 2 can be presented as follows:
Y 2 × 1 = D 2 H 2 X 2 × 1 ,
where D 2 = diag s 0 ( 2 ) ,   s 1 ( 2 ) , s 0 ( 2 ) = s 1 ( 2 ) = a 2 .
We have shown a data flow graph of the algorithm for the 2-point odd-time DHT and odd-frequency DHT in Figure 1. As can be seen, we have 2 additions as well as when using the direct method. The number of multiplication is also 2 against 4 multiplications for the direct matrix-vector product.

3.2. Algorithms for 3-Point Odd-Time DHT and Odd-Frequency DHT

The expression for 3-point odd-time DHT with normalization is as follows:
Y 3 × 1 = C 3 X 3 × 1 ,
where Y 3 × 1 =   y 0 ,   y 1 , y 2 T , X 3 × 1 = x 0 ,   x 1 ,   x 2 T , C 3 = a 3 a 3 a 3 b 3 a 3 c 3 c 3 a 3 b 3 with a 3 = 1 3 cas 0 = 1 3 0.5774, b 3 = 1 3 cas π 3 0.7887, c 3 = 1 3 cas 2 π 3 0.2113. For odd-frequency DHT with normalization we use C 3 T instead of C 3 in Equation (8).
To factorize the C 3 matrix we swap the first and second rows. Then we alter the sign of the third row and third column of the resulted matrix C 3 ( a ) and decompose it into two components:
C 3 ( a ) = C 3 ( b ) + C 3 ( c ) ,
where C 3 ( b ) = a 3 a 3 a 3 a 3 a 3 , C 3 ( b ) = b 3 c 3 c 3 b 3 .
In the second column and second row of the matrix C 3 ( b ) we obtained identical entries that differ only in sign. Therefore, the number of operations can be reduced without additional transforms. Next, we eliminate the second row and second column containing only zero entries in matrix C 3 ( c ) , and matrix C 2 ( a ) = b 3 c 3 c 3 b 3 was obtained.
We derive the factorization for the 3-point odd-time DHT based on the decomposition of matrix C 2 ( a ) [34,37]:
Y 3 × 1 = P 3 W 3 × 4 W 4 D 4 W 4 × 3 W 3 X 3 × 1 ,
where D 4 = diag s 0 ( 3 ) ,   s 1 ( 3 ) ,   s 2 ( 3 ) ,   s 3 ( 3 ) , s 0 ( 3 ) = ( b 3 + c 3 ) / 2 , s 1 ( 3 ) = ( b 3 c 3 ) / 2 , s 2 ( 3 ) = s 3 ( 3 ) = a 3 ,
  W 4 = ( I - 2 H 2 )   I 2 ,  
P 3 = 1 1 1 ,   W 3 × 4 = 1 1 1 1 1 1 ,   W 3 = 1 1 1 1 1 ,   W 4 × 3 = 1 1 1 1 .
Based on Equation (10) the factorization for the 3-point odd-frequency DHT is obtained as:
Y 3 × 1 = W 3 T W 4 × 3 T D 4 W 4 T W 3 × 4 T P 3 T X 3 × 1 .
A data flow graph of the 3-point odd-time DHT algorithm is shown in Figure 2. Then the amount of multiplications can be reduced from 9 to 3 because s 0 ( 3 ) = 0.5 . However, the number of additions enlarges from 6 to 7.
A data flow graph of the 3-point odd-frequency DHT algorithm is shown in Figure 3. The number of arithmetic operations remains the same as for 3-point odd-time DHT.

3.3. Algorithms for 4-Point Odd-Time DHT and Odd-Frequency DHT

The four-point odd-time DHT with normalization is defined as follows:
Y 4 × 1 = C 4 X 4 × 1 ,
where Y 4 × 1 = y 0 ,   y 1 , y 2 ,   y 3 T , X 4 × 1 = x 0 ,   x 1 ,   x 2 ,   x 3 T , C 4 = a 4 a 4 a 4 a 4 b 4 0 b 4 0 a 4 a 4 a 4 a 4 0 b 4 0 b 4 with a 4 = 1 2 cas 0 = 0.5, b 4 = 1 2 cas π 4 0.7071. For odd-frequency DHT with normalization we use C 4 T instead of C 4 in Equation (12).
We permutate the rows of C 4 according to π 4 = 1 2 1 3 3 4 2 4 . The permutation matrix is P 4 = 1 1 1 1 . The obtained matrix C 4 ( a ) = a 4 a 4 a 4 a 4 a 4 a 4 a 4 a 4 b 4 0 b 4 0 0 b 4 0 b 4 matches the pattern A 2 A 2 B 2 B 2 where A 2 = a 4 a 4 a 4 a 4 and B 2 = b 4 b 4 .
Applying the matrix templates from [34,37], we derive the expressions
C 4 ( a ) = ( A 2 B 2 ) ( H 2 I 2 ) ,   A 2 = ( a 4 a 4 ) H 2 ,   B 2 = ( b 4 b 4 ) I 2 .
Therefore the factorization of the 4-point odd-time DHT matrix is as follows:
Y 4 × 1 = P 4 D 4 W 4 ( 0 ) W 4 ( 1 ) X 4 × 1 ,
where W 4 ( 0 ) = H 2 I 2 , D 4 = diag s 0 ( 4 ) ,   s 1 ( 4 ) ,   s 2 ( 4 ) ,   s 3 ( 4 ) , s 0 ( 4 ) = s 1 ( 4 ) = a 4 ,   s 2 ( 4 ) = s 3 ( 4 ) = b 4 ,   W 4 ( 1 ) = H 2 I 2 .
The data flow graph of the 4-point odd-time DHT algorithm is presented in Figure 4. As one can see, the number of multiplications is reduced from 4 to 2 because s 0 ( 4 ) = s 1 ( 4 ) = a 4 = 0.5 , the number of additions is decreased from 8 to 6 compared to direct matrix-vector product.
Taking into consideration the Equation (14), the factorization for the four-point odd-frequency DHT matrix is expressed as
Y 4 × 1 = W 4 ( 1 ) T W 4 ( 0 ) T D 4 P 4 T X 4 × 1
The algorithm of the 4-point odd-frequency DHT with normalization is provided as a data flow graph in Figure 5. The number of arithmetic operations is the same as for odd-time DHT.

3.4. Algorithms for 5-Point Odd-Time DHT and Odd-Frequency DHT

To develop the algorithm for five-point odd-time DHT with normalization we use the following expression
Y 5 × 1 = C 5 X 5 × 1 ,
where Y 5 × 1 = y 0 ,   y 1 ,   y 2 ,   y 3 ,   y 4 T , X 5 × 1 = x 0 ,   x 1 ,   x 2 ,   x 3 ,   x 4 T , a 5 = 1 5 0.4472, b 5 =   1 5 cas π 5 0.6247, c 5   = 1 5 cas 3 π 5 0.2871, d 5 = 1 5 cas 2 π 5 0.5635, e 5   = 1 5 cas 4 π 5 0.0989,
C 5 = a 5 a 5 a 5 a 5 a 5 b 5 c 5 a 5 d 5 e 5 d 5 b 5 a 5 e 5 c 5 c 5 e 5 a 5 b 5 d 5 e 5 d 5 a 5 c 5 b 5 .
For odd-frequency DHT with normalization in Equation (16) we use C 5 T instead of C 5 .
We alter the order of rows and columns of C 5 applying the permutations
π 5 = 1 2 2 3 3 4 5 1 5 4 ,   π 6 = 1 2 1 2 3 4 5 3 5 4 .
The corresponding permutation matrices are as follows
P 5 ( 1 ) = 1 1 1 1 1 ,   P 5 ( 0 ) = 1 1 1 1 1 .
Then we decompose the resulting matrix C 5 ( a ) into two submatrices:
C 5 ( a ) = C 5 ( b ) + C 5 ( c ) ,
where C 5 ( b ) = a 5 a 5 a 5 a 5 a 5 a 5 a 5 a 5 a 5 and C 5 ( c ) = b 5 c 5 e 5 d 5 d 5 b 5 c 5 e 5 e 5 d 5 b 5 c 5 c 5 e 5 d 5 b 5 .
In the third column and third row of the matrix C 5 ( b ) it is obtained identical entries that differ only in sign. Therefore, the number of operations can be reduced without additional transforms [36]. We eliminate in matrix C 5 ( c ) the row and column with only zero entries. The resulted matrix
C 4 ( d ) = b 5 c 5 e 5 d 5 d 5 b 5 c 5 e 5 e 5 d 5 b 5 c 5 c 5 e 5 d 5 b 5
matches the matrix template A 2 ( a ) B 2 ( a ) B 2 ( a ) A 2 ( a ) where A 2 ( a ) = b 5 c 5 d 5 b 5 , B 2 ( a ) = e 5 d 5 c 5 e 5 .
The factorization of template A 2 ( a ) B 2 ( a ) B 2 ( a ) A 2 ( a ) is known from [34], and we represent the matrix C 4 ( d ) as
C 4 ( d ) = ( I - 2     I 2 ) ( H 2     I 2 ) 1 / 2 [ ( A 2 ( a ) + B 2 ( a ) )     ( A 2 ( a ) B 2 ( a ) ) ] ( H 2     I 2 ) ,
where I - 2 = 1 0 0 1 . The resulting matrices A 2 ( a ) + B 2 ( a ) = b 5 + e 5 c 5 d 5 d 5 c 5 b 5 e 5 and A 2 ( a ) B 2 ( a ) = b 5 e 5 c 5 + d 5 d 5 + c 5 b 5 + e 5 match the templates g h h g and p q q p , respectively. Therefore, we obtain the following factorizations from [34]:
A 2 ( a ) + B 2 ( a ) = I - 2 H 2 × diag ( ( g + h ) / 2 ,   ( g   h ) / 2 ) H 2 , A 2 ( a ) B 2 ( a )   = T 2 × 3 ( 4 ) × diag ( p   q ,   p   q ,   q ) T 3 × 2 ( 3 ) ,
where T 2 × 3 ( 4 ) = 1 0 1 0 1 1 , T 3 × 2 ( 3 ) = 1 0 0 1 1 1 ,  g = b 5 + e 5 , h = c 5 d 5 , p = b 5 e 5 ,  q = c 5 + d 5 .
Let us add matrices from decomposition (19) to the left of the diagonal matrix into the matrix   W 6 × 7 = ( I - 2 H 2 )   I 2     T 2 × 3 ( 4 ) , and to the left of the diagonal matrix into the matrix   W 7 × 6 = H 2     I 2     T 3 × 2 ( 3 ) . Combining the expressions (17), (18), and (19) the matrix factorization for the five-point odd-time DHT with normalization is represented as
Y 5 × 1 = P 5 ( 1 ) W 5 × 6 W 6 ( 1 ) W 6 × 7 D 7 W 7 × 6 W 6 ( 0 ) W 6 × 5 P 5 ( 0 ) X 5 × 1
where
D 7 = diag s 0 ( 5 ) ,   s 1 ( 5 ) ,   s 2 ( 5 ) ,   s 3 ( 5 ) , s 4 ( 5 ) ,   s 5 ( 5 ) ,   s 6 ( 5 ) ,   s 0 ( 5 ) = ( b 5 + e 5 + c 5 d 5 ) / 4 ;   s 1 ( 5 ) = ( b 5 + e 5 c 5 + d 5 ) / 4 ; s 2 ( 5 ) = a 5 ;   s 3 ( 5 ) = a 5 ;   s 4 ( 5 ) = ( b 5 e 5 c 5 d 5 ) / 2 ;   s 5 ( 5 ) = ( b 5 + e 5 c 5 d 5 ) / 2 ;   s 6 ( 5 ) = ( c 5 + d 5 ) / 2 ;   W 6 ( 1 ) = 1 1 1 1 1 1 1 1 1 1 ,   W 6 ( 0 ) = 1 1 1 1 1 1 1 1 1 1 , W 6 × 5 = 1 1 1 1 1 1 1 1 1 ,   W 5 × 6 = 1 1 1 1 1 1 1 1 1 1 .
We have added the matrix I 2 into the crossing of third and fourth columns and rows of the matrices   W 7 × 6 ,   W 6 × 7 , W 6 ( 1 ) and W 6 ( 0 ) . This allows the factorizing the matrix C 5 ( b ) using W 6 × 5 and  W 5 × 6 .
Next, we present the algorithm of the five-point odd-time DHT with normalization via the data flow graph in Figure 6. As one can see, the number of multiplications is reduced from 25 to 6 because s 1 ( 5 ) = 0.25 ; the number of additions is enlarged from 20 to 23.
Based on Equation (20), the matrix factorization for the five-point odd-frequency DHT with normalization is represented as
Y 5 × 1 = P 5 ( 0 ) T W 6 × 5 T W 6 ( 0 ) T W 7 × 6 T D 7 W 6 × 7 T W 6 ( 1 ) T W 5 × 6 T P 5 ( 1 ) T X 5 × 1
Figure 7 shows a data flow graph of the algorithm for the five-point odd-frequency DHT with normalization. The number of arithmetic operations is the same as for 5-point odd-time DHT with normalization.

3.5. Algorithms for 6-Point Odd-Time DHT and Odd-Frequency DHT

Let us propose an algorithm for six-point odd-time DHT with normalization which is expressed as follows:
Y 6 × 1 = C 6 X 6 × 1 ,
where Y 6 × 1 = y 0 ,   y 1 , y 2 ,   y 3 ,   y 4 ,   y 5 T , X 6 × 1 = x 0 ,   x 1 ,   x 2 ,   x 3 ,   x 4 ,   x 5 T ,
C 6 = a 6 a 6 a 6 a 6 a 6 a 6 b 6 a 6 c 6 b 6 a 6 c 6 b 6 a 6 c 6 b 6 a 6 c 6 a 6 a 6 a 6 a 6 a 6 a 6 c 6 a 6 b 6 c 6 a 6 b 6 c 6 a 6 b 6 c 6 a 6 b 6
with a 6 = 1 6 0.4082 ,   b 6   =   1 6 cas π 6 0.5577, c 6   =   1 6 cas 2 π 3 0.1494. For odd-frequency DHT with normalization in Equation (22) we use C 6 T instead of C 6 .
Note that c 6 =   b 6 a 6 , thus we decompose C 6 = a 6 C 6 ( a ) + C 6 ( b ) , where
C 6 ( a ) = 1 1 1 1 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 0 1 1 0 ,   C 6 ( b ) = b 6 b 6 b 6 b 6 b 6 b 6 b 6 b 6 b 6 b 6 b 6 b 6 b 6 b 6 b 6 b 6 .
Further the matrix C 6 ( a ) is added to factorization immediately as a submatrix of the matrix  W 8 × 10 :   W 8 × 10 = C 6 ( a )     B 2 × 4 , B 2 × 4 = 1 1 1 1 1 1 1 1 . The matrix B 2 × 4 is determined by the structure of the matrix C 6 ( b ) for which the second and sixth rows, the third and fifth rows are the same except on the sign. The matrices W 10 × 6 and W 6 × 8 will denote the order of the columns and the rows of the matrices C 6 ( a ) and B 2 × 4 in resulted factorization. The identity submatrix I 6  of W 10 × 6 and W 6 × 8 related to C 6 ( a ) , and the rest submatrices of W 10 × 6 and W 6 × 8 related to B 2 × 4 :
W 10 × 6 = 1 1 1 1 1 1 1 1 1 1 , W 6 × 8 = 1 1 1 1 1 1 1 1 1 1
Let us introduce s 0 6   = s 1 6 = s 2 6 = s 3 6 = s 4 6   = s 5 6 = a 6 to multiply the each row of matrix C 6 ( a ) , and s 6 6 = s 7 6 = b 6 to multiply the each row of B 2 × 4 . Then the factorization of the matrix of the 6-point odd-time DHT with normalization can be expressed as [37]
Y 6 × 1 = W 6 × 8 D 8 W 8 × 10 W 10 × 6 X 6 × 1 ,
where D 8 = diag ( s 0 6 ,   s 1 6 ,   s 2 6 ,   s 3 6 ,   s 4 6 ,   s 5 6 ,   s 6 6 ,   s 7 6 ) .
Figure 8 shows the data flow graph of the algorithm of the 6-point odd-time DHT with normalization. The amount of multiplications and additions can be lessened from 36 to 8 and from 30 to 28, respectively.
Based on Equation (23), the matrix factorization for the 6-point odd-frequency DHT with normalization is expressed as
Y 6 × 1 = W 10 × 6 T W 8 × 10 T D 8 W 6 × 8 T X 6 × 1 ,
Figure 9 shows the data flow graph of the algorithm implementing the 6-point odd-frequency DHT with normalization. As one can see, the amount of multiplications may be lessened from 36 to 8. Also we decreased the amount of additions from 30 to 24.

3.6. Algorithms for 7-Point Odd-Time DHT and Odd-Frequency DHT

Now we will design the algorithm for 7-point odd-time DHT with normalization using the expression
Y 7 × 1 = C 7 X 7 × 1 ,
where Y 7 × 1 =   y 0 ,   y 1 , y 2 ,   y 3 ,   y 4 ,   y 5 ,   y 6 T , X 7 × 1 = x 0 ,   x 1 ,   x 2 ,   x 3 ,   x 4 ,   x 5 ,   x 6 T , a 7 = 1 7 0.3780, b 7 =   1 7 cas π 7 0.5045, c 7 = 1 7 cas 3 π 7 0.4526, d 7 = 1 7 cas 5 π 7 0.0598, e 7   = 1 7 cas 2 π 7 0.5312, g 7   = 1 7 cas 6 π 7 0.1765, f 7   =   1 7 cas 4 π 7 0.2844,
C 7 = a 7 a 7 a 7 a 7 a 7 a 7 a 7 b 7 c 7 d 7 a 7 e 7 f 7 g 7 e 7 g 7 c 7 a 7 f 7 b 7 d 7 c 7 e 7 b 7 a 7 g 7 d 7 f 7 f 7 d 7 g 7 a 7 b 7 e 7 c 7 d 7 b 7 f 7 a 7 c 7 g 7 e 7 g 7 f 7 e 7 a 7 d 7 c 7 b 7 .
For odd-frequency DHT with normalization in Equation (25) the C 7 T matrix must be used instead of C 7 .
Let us define the permutations π 7 and π 8 :
π 7 = 1 2 2 3 3 4 5 6 7 4 1 7 6 5 ,   π 8 = 1 2 3 4 5 6 7 1 2 3 4 7 6 5 .
After permutation of the rows of C 7  with π 7  and permutation the columns of C 7 with π 8 , we alter the sign of the fifth, sixth, and seventh columns. The corresponding permutation matrices are introduced as
P 7 ( 1 ) = 1 1 1 1 1 1 1 ,   P 7 ( 0 ) = 1 1 1 1 1 1 1 .
The obtained matrix C 7 ( a ) was decomposed into two components:
C 7 ( a ) = C 7 ( b ) + C 7 ( c ) ,
where
C 7 ( b ) = a 7 a 7 a 7 a 7 a 7 a 7 a 7 a 7 a 7 a 7 a 7 a 7 a 7 ,   C 7 ( c ) = b 7 c 7 d 7 g 7 f 7 e 7 e 7 g 7 c 7 d 7 b 7 f 7 c 7 e 7 b 7 f 7 d 7 g 7 g 7 f 7 e 7 b 7 c 7 d 7 d 7 b 7 f 7 e 7 g 7 c 7 f 7 d 7 g 7 c 7 e 7 b 7 .
We can reduce the number of operations by taking into account the similar entries in the fourth column and fourth row of the matrix C 7 ( b ) [36], which differ only in sign. Next, in matrix C 7 ( c ) we eliminate the rows and columns with only zero entries. The obtained matrix
C 6 ( d ) = b 7 c 7 d 7 g 7 f 7 e 7 e 7 g 7 c 7 d 7 b 7 f 7 c 7 e 7 b 7 f 7 d 7 g 7 g 7 f 7 e 7 b 7 c 7 d 7 d 7 b 7 f 7 e 7 g 7 c 7 f 7 d 7 g 7 c 7 e 7 b 7
acquires the structure A 3 B 3 B 3 A 3 and can be decomposed as [34]:
C 6 ( d ) = ( H 2 I 3 ) 1 / 2 [ ( A 3 + B 3 )     ( A 3 B 3 ) ] ( H 2 I 3 ) .
Now we will decompose the matrices
A 3 + B 3   = b 7 g 7 c 7 + f 7 e 7 + d 7 e 7 + d 7 b 7 g 7 ( c 7 + f 7 ) c 7 + f 7 ( e 7 + d 7 ) b 7 g 7 ,   A 3 B 3 = b 7 + g 7 c 7   f 7 d 7 e 7 e 7 d 7 ( b 7   + g 7 ) ( c 7 f 7 ) c 7 f 7 d 7 e 7 b 7 + g 7 ,
representing them as a circular convolution matrix H 3 = h 0 h 2 h 1 h 1 h 0 h 2 h 2 h 1 h 0   [35,36]:
H 3 = T 3 ( 1 ) T 3 × 4 × diag ( s 0 , s 1 , s 2 , s 3 )   ×   T 4 × 3 T 3 ( 0 ) ,
where s 0 = ( h 0 + h 1 + h 2 ) / 3 ,   s 1 = h 0 h 2 , s 2 = h 1 h 2 ,   s 3 = ( h 0 + h 1 2 h 2 ) / 3 ; T 3 ( 1 ) = 1 1 1 1 1 1 1 ,
T 3 × 4 = 1 1 1 1 1 ,   T 4 × 3 = 1 1 1 1 1 ,   T 3 ( 0 ) = 1 1 1 1 1 1 1 .
We need to modify the matrices ( A 3 + B 3 ) , ( A 3 B 3 ) to make them consistent with the expression of the circular convolution for N = 3. For that, in the matrix ( A 3 + B 3 ) the sign of entries in the first column and first row was altered by multiplying left and right on P 3 ( 1 ) = 1 1 1 . In the ( A 3 B 3 ) matrix the sign of the second-row entries was changed by multiplying left on P 3 ( 0 ) = 1 1 1 . As a result, we obtain the matrices:
( A 3 + B 3 ) ( 0 )   = b 7     g 7 ( c 7 + f 7 ) ( e 7 + d 7 ) ( e 7 + d 7 ) b 7     g 7 ( c 7 + f 7 ) ( c 7 + f 7 ) ( e 7 + d 7 ) b 7   g 7 ,   ( A 3 B 3 ) ( 0 )   = b 7 + g 7 c 7 f 7 d 7 e 7 d 7 e 7 b 7 + g 7 c 7 f 7 c 7 f 7 d 7 e 7 b 7 + g 7 .
Let us apply the expression (28) to ( A 3 + B 3 ) ( 0 ) , ( A 3   B 3 ) ( 0 ) .  For the matrix ( A 3 + B 3 ) ( 0 )  the elements of circular convolution are h 0 = b 7 g 7 ,   h 1 = e 7 d 7 ,   h 2 = c 7 f 7 . For the matrix ( A 3 B 3 ) ( 0 )  we have h 0 = b 7 + g 7 ,   h 1 = e 7 + d 7 ,   h 2 = c 7 f 7 . Further we form the matrices   W 10 × 8 = T 4 × 3 I 2 T 4 × 3 ,   W 8 × 10 = T 3 × 4     I 2     T 3 × 4 to factorize the circular convolutions. The matrices T 3 ( 1 ) and T 3 ( 0 ) were multiplied on P 3 ( 1 ) and P 3 ( 0 ) . And we obtained W a = T 3 ( 0 ) P 3 ( 1 ) = 1 1 1 1 1 1 1 , W c = P 3 ( 1 ) T 3 ( 1 ) = 1 1 1 1 1 1 1 , W d = P 3 ( 0 ) T 3 ( 1 ) = 1 1 1 1 1 1 1
We have added the matrix I 2 into direct sum in the matrices   W 10 × 8 ,   W 8 × 10 , W 8 ( 0 ) and W 8 ( 1 ) . This allows the factorizing the matrix C 7 ( b ) using W 7 × 8 and  W 8 × 7 .
In sum, we derive the factorization of the matrix of the seven-point odd-time DHT with normalization:
Y 7 × 1 = P 7 ( 1 ) W 7 × 8 W 8 W 8 ( 1 ) W 8 × 10 D 10 W 10 × 8 W 8 ( 0 ) W 8 W 8 × 7 P 7 ( 0 ) X 7 × 1 ,
where D 10 = diag ( s 0 7 , s 1 7 , s 2 7 ,   s 3 7 ,   s 4 7 ,   s 5 7 ,   s 6 7 ,   s 7 ( 7 ) ,   s 8 7 ,   s 9 ( 7 ) ) ,
W 8 ( 0 ) = W a I 2 T 3 ( 0 ) ,   W 8 ( 1 ) = W c I 2 W d , s 0 ( 7 ) = ( b 7 g 7 e 7 d 7 c 7 f 7 ) / 6 ;   s 1 ( 7 ) = ( b 7 g 7 + c 7 + f 7 ) / 2 ;   s 2 ( 7 ) = ( e 7 d 7 + c 7 + f 7 ) / 2 ;   s 3 ( 7 ) = ( b 7 g 7 d 7 e 7 + 2 c 7 + 2 f 7 ) / 6 ;   s 4 ( 7 ) = a 7 ;   s 5 ( 7 ) = a 7 ; s 6 ( 7 ) = ( b 7 + g 7 e 7 + d 7 + c 7 f 7 ) / 6 ;   s 7 ( 7 ) = ( b 7 + g 7 c 7 + f 7 ) / 2 ;   s 8 ( 7 ) = ( e 7 + d 7 c 7 + f 7 ) / 2 ;   s 9 ( 7 ) = ( b 7 + g 7 e 7 + d 7 2 c 7 + 2 f 7 ) / 6 ; W 7 × 8 = 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ,   W 8 × 7 = 1 1 1 1 1 1 1 1 1 1 1 1 1 , W 8 = 1 1 1 1 1 1 1 1 1 1 1 1 1 1 .
To calculate the 7-point odd-time DHT with normalization the fast algorithm is developed and presented in Figure 10 by data flow graph. As a consequence we can reduce the amount of multiplications from 49 to 10, but the amount of additions increased from 42 to 46.
Based on Equation (29), the matrix factorization for the 7-point odd-frequency DHT with normalization is obtained as
Y 7 × 1 = P 7 ( 0 ) T W 8 × 7 T W 8 T W 8 ( 0 ) T W 10 × 8 T D 10 W 8 × 10 T W 8 ( 1 ) T W 8 T W 7 × 8 T P 7 ( 1 ) T X 7 × 1 ,
To compute the 7-point odd-frequency DHT with normalization we propose the fast algorithm shown in Figure 11 by data flow graph. The number of arithmetic operations is the same as for 7-point odd-time DHT with normalization.

3.7. Algorithms for 8-Point Odd-Time DHT and Odd-Frequency DHT

Let us develop the algorithm for eight-point odd-time DHT with normalization which is expressed as follows:
Y 8 × 1 = C 8 X 8 × 1 ,
where Y 8 × 1 = y 0 ,   y 1 , y 2 ,   y 3 ,   y 4 ,   y 5 ,   y 6 ,   y 7 T , X 8 × 1 = x 0 ,   x 1 ,   x 2 ,   x 3 ,   x 4 ,   x 5 ,   x 6 ,   x 7 T ,
C 8 = a 8 a 8 a 8 a 8 a 8 a 8 a 8 a 8 b 8 b 8 c 8 c 8 b 8 b 8 c 8 c 8 d 8 0 d 8 0 d 8 0 d 8 0 b 8 b 8 c 8 c 8 b 8 b 8 c 8 c 8 a 8 a 8 a 8 a 8 a 8 a 8 a 8 a 8 c 8 c 8 b 8 b 8 c 8 c 8 b 8 b 8 0 d 8 0 d 8 0 d 8 0 d 8 c 8 c 8 b 8 b 8 c 8 c 8 b 8 b 8
with  a 8 = 1 8 0.3536; b 8   = 1 8 cas π 8 0.4619; c 8 = 1 8 cas 5 π 8 0.1913; d 8   = 1 8 cas π 4 = 0.5. For odd-frequency DHT with normalization in (31) the C 8 T matrix must be used instead of C 8 .
Let us define the permutation π 8 = 1 2 1 5 3 4 5 6 7 8 3 7 4 2 6 8  to change the order of rows of C 8 . The permutation matrix P 8  and the resulted matrix C 8 ( a ) can be expressed as
P 8 = 1 1 1 1 1 1 1 1 ,   C 8 ( a ) = a 8 a 8 a 8 a 8 a 8 a 8 a 8 a 8 a 8 a 8 a 8 a 8 a 8 a 8 a 8 a 8 d 8 0 d 8 0 d 8 0 d 8 0 0 d 8 0 d 8 0 d 8 0 d 8 b 8 b 8 c 8 c 8 b 8 b 8 c 8 c 8 b 8 b 8 c 8 c 8 b 8 b 8 c 8 c 8 c 8 c 8 b 8 b 8 c 8 c 8 b 8 b 8 c 8 c 8 b 8 b 8 c 8 c 8 b 8 b 8 .
The resulted matrix C 8 ( a ) acquires the structure:
A 4 A 4 B 4 B 4 with   A 4 = a 8 a 8 a 8 a 8 a 8 a 8 a 8 a 8 d 8 0 d 8 0 0 d 8 0 d 8 and   B 4 = b 8 b 8 c 8 c 8 b 8 b 8 c 8 c 8 c 8 c 8 b 8 b 8 c 8 c 8 b 8 b 8 .
Then using the template from [34] we obtain C 8 ( a ) = ( A 4     B 4 ) ( H 2     I 4 ) . The matrix A 4 has the following structure:
A 2 ( b ) A 2 ( b ) B 2 ( b ) B 2 ( b ) with   A 2 ( b ) = diag ( a 8 ,   a 8 ) H 2 and   B 2 ( b ) = d 8 I 2 .
Using the decomposition of the extracted submatrices [34], the matrix A 4 is represented as
A 4 = diag ( a 8 ,   a 8 ,   d 8 ,   d 8 ) ( H 2     I 2 ) ( H 2     I 2 ) .
The entries of the diagonal matrix we denoted as s 0 ( 8 ) = a 8 ,   s 1 ( 8 ) = a 8 ,   s 2 ( 8 ) = d 8 ,   s 3 ( 8 ) = d 8 .
Next we swap the first and second column of the B 4 matrix with permutation matrix P 2     I 2 , P 2 = 1 1 . The resulted matrix B 4 ( a ) = b 8 b 8 c 8 c 8 b 8 b 8 c 8 c 8 c 8 c 8 b 8 b 8 c 8 c 8 b 8 b 8   is similar to the template A 2 ( c ) B 2 ( c ) B 2 ( c ) A 2 ( c ) and can be decomposed as
B 4 ( a ) = ( H 2     I 2 ) 1 / 2 [ ( A 2 ( c ) + B 2 ( c ) )     ( A 2 ( c ) B 2 ( c ) ) ] ( H 2     I 2 ) ,
where 1 / 2 ( A 2 ( c ) + B 2 ( c ) ) = 1 / 2 b 8 + c 8 b 8 + c 8 b 8 + c 8 b 8 c 8  matches the pattern 1 / 2 e f f e   , e = b 8 + c 8 , f = b 8 + c 8 . It is represented as
1 / 2 ( A 2 ( c ) + B 2 ( c ) )   = T 2 × 3 ( 4 ) ×   diag ( e f ,   e   f ,   f ) T 3 × 2 ( 3 ) ,
where T 2 × 3 ( 4 ) , T 3 × 2 ( 3 ) are defined as in Equation (19). The entries of diagonal matrix we denoted as s 4 ( 8 ) = b 8 ,   s 5 ( 8 ) = c 8 ,   s 6 ( 8 ) = ( b 8 + c 8 ) / 2 .  The matrix 1 / 2 ( A 2 ( c ) B 2 ( c ) ) is similarly decomposed with diagonal matrix entries s 7 ( 8 ) = b 8 ,   s 8 ( 8 ) = c 8 ,   s 9 ( 8 ) = ( b 8 c 8 ) / 2 .
Let us add matrices from decomposition (34) to the left of the diagonal matrix into the matrix W 8 × 10 = I 4   T 2 × 3 ( 4 )     T 2 × 3 ( 4 ) , and to the right of the diagonal matrix into the matrix W 10 × 8 = I 4     T 3 × 2 ( 3 )     T 3 × 2 ( 3 ) . Also we added matrices from decompositions (32), (33) to the left of the diagonal matrices into the matrix W 8 ( a ) = I 4     ( H 2 I 2 ) , and to the right of the diagonal matrices into W 8 ( b ) = H 2     I 2     P 2     I 2 , W 8 ( c ) = ( H 2     I 2 )   I 4 , W 8 ( d ) = H 2   I 4 .
In sum, the 8-point odd-time DHT with normalization is factorized as
Y 8 × 1 = P 8 W 8 ( a ) W 8 × 10 D 10 W 10 × 8 W 8 ( a ) W 8 ( b ) W 8 ( c ) W 8 ( d ) X 8 × 1 ,
where D 10 = diag ( s 0 ( 8 ) ,   s 1 ( 8 ) ,   s 2 ( 8 ) ,   s 3 ( 8 ) ,   s 4 ( 8 ) ,   s 5 ( 8 ) ,   s 6 ( 8 ) ,   s 7 ( 8 ) ,   s 8 ( 8 ) ,   s 9 ( 8 ) ) .
To compute the 8-point odd-time DHT with normalization the data flow graph of the fast algorithm is designed and presented in Figure 12. As a consequence we can reduce the amount of multiplications from 48 to 8, because s 2 ( 8 ) = s 3 ( 8 ) = 0.5 , and the amount of additions from 48 to 28.
Based on Equation (35), the matrix factorization for the 8-point odd-frequency DHT with normalization is given as
Y 8 × 1 = W 8 ( d ) T W 8 ( c ) T W 8 ( b ) T W 8 ( a ) T W 10 × 8 T D 10 W 8 × 10 T W 8 ( a ) T P 8 T X 8 × 1 ,
Figure 13 shows the data flow graph of the algorithm implementing the 8-point odd-frequency DHT with normalization. The amount of arithmetic operations is the same as for 8-point odd-time DHT with normalization.

4. Results

We confirmed the correctness of the odd-time DHT and odd-frequency DHT matrix factorizations obtained in Section 3 by experiment. Using the MATLAB R2023b software it was evaluated the coincidence of the results of the multiplication of factorized matrices by Formulas (7), (10), (14), (20), (23), (29), and (35) with the original odd-time DHT matrices. Also, it was evaluated the similarity of the results of the computing of the matrices of the odd-frequency DHT with the expressions (11), (15), (21), (24), (30), (36) using the MATLAB R2023b environment. The last formulas define the factorizations of the odd-frequency DHT matrices. The obtained coincidence of the factorized matrices with the initial odd-time DHT and odd-frequency DHT matrices for each N indicates the correctness of the developed algorithms.
Next, we evaluated the number of arithmetic operations for the calculation of the odd-time DHT and odd-frequency DHT with normalization via matrix-vector product and for the proposed algorithms. In general, the multiplications on data flow graphs are corresponded to the graph vertices, denoted by circles with factors. The amount of additions was evaluated by the amount of entering of two graph edges in one vertex. One must notice that these operations for zero elements of odd-time DHT and odd-frequency DHT matrices were not counted. In the matrices C 4 and C 8 we have four and eight zeros, respectively. Also if an element of the odd-time DHT or odd-frequency DHT matrix can be expressed as a power of two then the multiplication by this element can be implemented by a shift and has not counted as a multiplication. The proposed algorithms use the same number of multiplications to both the odd-time DHT and the odd-frequency DHT with normalization. Applying these algorithms we can reduce the number of multiplications required for odd-time or odd-frequency DHTs by nearly 69%, and the amount of additions by nearly of 5% for odd-time DHT and 8% for odd-frequency DHT if the length of input data is in the range from 2 to 8.
Table 1 shows the obtained results. In parentheses, we indicate the difference in the amount of operations in percent. The plus means that the amount of operations has increased relative to the matrix-vector product, and the minus means it has lessened. In Table 2 and Table 3 the number of multiplication and additions is presented for the existing odd-time DHT and odd-frequency DHT algorithms.

5. Discussion of Computational Complexity

Let us compare the number of multiplication and additions for the existing algorithms and for the proposed algorithms of odd-time DHT and odd-frequency DHT with normalization. As for the odd-time DHT, if N = 4 then the proposed algorithm is no different from algorithms known from the literature by the multiplication number. However if the existing algorithms do not include the normalization they require the additional four multiplications. If N = 8 then the amount of multiplications may be lessened with the proposed solution versus Hamood’s algorithms [31,32] by 33%. Relative to the prime factor algorithm [17], the amount of multiplications for N = 8 is the same, and less than for the radix-2 algorithm [27] by 20%. However, the considered existing algorithms of odd-time DHT do not include normalization for N = 8 which requires 8 additional multiplications. The amount of additions for N = 8 has increased by 17% relative to Hamood’s algorithms [31,32] and is the same as for algorithms in [17,27].
As for the odd-frequency DHT, if N = 4 then the obtained algorithm is no different from algorithms known from the literature by the amount of multiplications. However the absence of normalization requires the additional four multiplications. Besides, for N = 4, the proposed algorithm reduces the number of additions significantly (by 40–45%). If N = 8 then the number of multiplications may be significantly lessened with the proposed solution relative to the radix-2 algorithm [28,29] but exceeds by 33% the number of multiplications for the algorithm of the prime factor (N = 2 m ) without normalization [17,41,42]. The normalization will require 8 additional multiplications.
Due to the evaluation that has been done in [34], we can estimate the reduction of computational complexity of the proposed algorithms by Big O notation. The list represents the number of arithmetic operations that the algorithm performs to obtain the odd-time or odd-frequency DHT of size N. We can use the estimation of template complexity for even N directly. For odd N we have decomposed the initial transform matrix as the sum of two matrices. Therefore we have to add two multiplications and 2(N − 1) additions to the Big O notation of the template complexity. The obtained estimations are summarised in Table 4. Analysing the resulting Big O estimates it should be noted the following. The number of multiplications is reduced two times, in general, although the number of additions is increased by 2(N − 1) if the proposed algorithms are compared to the direct matrix-vector product.

6. Conclusions

In the paper, the fast algorithms for odd-time DHT and odd-frequency DHT with normalization are proposed for input signals of short length. The obtained algorithms for short-length input signals can subsequently be used as readymade modules of algorithms for long-length sequences.
Including the normalization in the fast algorithms for odd-time DHT and odd-frequency DHT allows us to use them directly in applications that involve recovering the processed signals or images, specifically, in image compression, signal and image denoising, image encryption, etc. Normalization ensures the orthonormality of transform and, as a result, the inverse transform matrix is obtained by a transposing of the direct transform matrix. The last property enables the construction of fast algorithms for inverse transform based on the fast algorithms for direct transform easily.
The fast algorithms for odd-time DHT and odd-frequency DHT were developed in the article based on the structural properties of the matrices of the transform coefficients. Optimization of the parameters of the odd-time DHT and odd-frequency DHT is not performed. We have applied the partition of the initial matrix into the submatrices with previous rearranging of the matrix rows and/or columns. The partitioning of the original matrix and rearranging its structure aims to find the factorization which possibly reduces further the computational complexity. Based on the obtained factorizations, we have constructed the fast algorithms presented by the data flow graphs. The critical path of each designed data flow graph has only one multiplication. This is a significant advantage of the proposed solutions. If the critical path of the data flow graph has more than one multiplication, additional difficulties arise with the presentation and further processing of the result of each successive multiplication.
The comparison of the computational complexity of the direct matrix-vector products with the computational complexity of the proposed algorithms has shown a reducing in the number of multiplications by 69% for the input sequence lengths from 2 to 8. At the same time, the amount of additions is lowered by nearly 5% for odd-time DHT and by 8% for odd-frequency DHT for the same range of the input sequence lengths.
The comparison of the designed fast algorithms for odd-time DHT and odd-frequency DHT with the existing algorithms shows that bearing in mind the structure of transform matrices enabled the increase in the fast algorithms’ efficiency against the efficiency of radix-type algorithms. This result enables easier operation in real time because the amount of needed signal processor resources is significantly reduced. Reducing the number of multiplications significantly contributes to the resource- and time-saving of signal processing and enables easier operation in real-time.

Author Contributions

Conceptualization, A.C.; methodology, A.C. and M.P.; software, M.P.; validation, A.C., M.P. and J.S.; formal analysis, A.C., M.P. and J.S.; investigation, M.P. and J.S.; writing—original draft preparation, M.P. and A.C.; writing—review and editing, A.C., M.P. and J.S.; supervision, A.C. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

Data are contained within the article.

Conflicts of Interest

The authors declare no conflicts of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.

References

  1. Jones, K. The regularized fast Hartley transform. In Low-Complexity Parallel Computation of the FHT in One and Multiple Dimensions, 2nd ed.; Springer: New York, NY, USA, 2021. [Google Scholar]
  2. Patra, N.; Nayak, S.S. Discrete Hartley transform and its applications—A review. J. Integr. Sci. Technol. 2022, 10, 173–179. [Google Scholar]
  3. Moraga, C. Generalized discrete Hartley transforms. In Proceedings of the 39th International Symposium on Multiple-Valued Logic, Naha, Japan, 21–23 May 2009. [Google Scholar]
  4. Vimal Kumar, C.; Raghavendra, D.; Eshwarappa, M.N. Design and implementation of VLSI DHT algorithm for image compression. Int. J. Eng. Trends Technol. 2015, 23, 218–223. [Google Scholar] [CrossRef]
  5. de Oliveira Nascimento, F.A. Hartley transform signal compression and fast power quality measurements for smart grid application. IEEE Trans. Power Deliv. 2023, 99, 1–11. [Google Scholar] [CrossRef]
  6. Anoh, K.; Tanriover, C.; Ribeiro, M.V.; Adebisi, B.; See, C.H. On the fast DHT precoding of OFDM signals over frequency-selective fading channels for wireless applications. Electronics 2022, 11, 3099. [Google Scholar] [CrossRef]
  7. Budiman, G.; Suksmono, A.B.; Danudirdjo, D.; Pawellang, S. QIM-based audio watermarking with combined techniques of SWT-DST-QR-CPT using SS-based synchronization. In Proceedings of the 6th International Conference on Information and Communication Technology (ICoICT), Bandung, Indonesia, 3–4 May 2018. [Google Scholar]
  8. Lipinski, P.; Puchala, D. Digital image watermarking using fast parametric transforms. Bull. Pol. Acad. Sci. Tech. Sci. 2019, 67, 463–477. [Google Scholar] [CrossRef]
  9. Kasban, H. A spiral-based image watermarking scheme using Karhunen–Loeve and discrete Hartley transforms. Multidimens. Syst. Signal Process. 2017, 28, 573–595. [Google Scholar] [CrossRef]
  10. Zhang, X.; Su, Q. A spatial domain-based colour image blind watermarking scheme integrating multilevel discrete Hartley transform. Int. J. Intell. Syst. 2021, 36, 4321–4345. [Google Scholar] [CrossRef]
  11. Voronenko, Y.; Puschel, M. Algebraic Signal Processing Theory: Cooley-Tukey Type Algorithms for Real DFTs. IEEE Trans. Signal Process. 2009, 57, 205–222. [Google Scholar] [CrossRef]
  12. Coutinho, V.A.; Cintra, R.J.; Bayer, F.M. Low-complexity three-dimensional discrete Hartley transform approximations for medical image compression. Comput. Biol. Med. 2021, 139, 105018. [Google Scholar] [CrossRef]
  13. Bozinovic, N.; Konrad, J. Scan order and quantization for 3D-DCT coding. Proc. SPIE Vis. Commun. Image Process. 2003, 5150, 1205. [Google Scholar]
  14. Rao, K.R.; Yip, P. The Transform and Data Compression Handbook, 1st ed.; CRC Press LLC: Boca Raton, FL, USA, 2001. [Google Scholar]
  15. Rao, K.R.; Yip, P. Discrete Cosine Transform: Algorithms, Advantages, Applications, 2nd ed.; Academic Press: Cambridge, UK, 2014. [Google Scholar]
  16. Prots’ko, I. Algorithm of efficient computation of generalised discrete Hartley transform based on cyclic convolutions. IET Signal Process. 2014, 8, 301–308. [Google Scholar] [CrossRef]
  17. Bi, G.; Zeng, Y. Transforms and Fast Algorithms for Signal Analysis and Representations, 1st ed.; Birkhäuser: Boston, FL, USA, 2004. [Google Scholar]
  18. Kober, V. Fast recursive computation of sliding DHT with arbitrary step. Sensors 2020, 20, 5556. [Google Scholar] [CrossRef]
  19. Jiang, L.; Shu, H.; Wu, J.; Wang, L.; Senhadji, L. A novel split-radix fast algorithm for 2-D discrete Hartley transform. IEEE Trans. Circuits Syst. I Regul. Pap. 2010, 57, 911–924. [Google Scholar] [CrossRef]
  20. Wu, J.; Shu, H.; Senhadji, L.; Luo, L.M. Radix-3x3 algorithm for the 2-D discrete Hartley transform. IEEE Trans. Circuits Syst. Part 2 Analog Digit. Signal Process. 2008, 55, 566–570. [Google Scholar]
  21. Grigoryan, A.M. Novel algorithm for computing the 1-D discrete Hartley transform. IEEE Signal Process. Lett. 2004, 11, 156–159. [Google Scholar] [CrossRef]
  22. Hamood, M. New efficient algorithm for the discrete Hartley transform. IOP Conf. Ser. Mater. Sci. Eng. 2020, 978, 012013. [Google Scholar] [CrossRef]
  23. Chiper, D.F. A novel VLSI DHT algorithm for a highly modular and parallel architecture. IEEE Trans. Circuits Syst. II Express Briefs 2013, 60, 282–286. [Google Scholar] [CrossRef]
  24. Pyrgas, L.; Kitsos, P.; Skodras, A.N. An FPGA design for the two-band fast discrete Hartley transform. In Proceedings of the IEEE International Symposium on Signal Processing and Information Technology (ISSPIT), Limassol, Cyprus, 12–14 December 2016. [Google Scholar]
  25. Yang, X.; Megson, G.M.; Xing, Y.; Evans, D.J. A novel radix-3/9 algorithm for type-III generalized discrete Hartley transform. J. Circuits Syst. Comput. 2006, 15, 301–312. [Google Scholar] [CrossRef]
  26. Shu, H.; Wang, Y.; Senhadji, L.; Luo, L. Direct computation of type-II discrete Hartley transform. IEEE Signal Process. Lett. 2007, 14, 329–332. [Google Scholar] [CrossRef]
  27. Chiper, D.F. Fast radix-2 algorithm for the discrete Hartley transform of type II. IEEE Signal Process. Lett. 2011, 18, 687–689. [Google Scholar] [CrossRef]
  28. Hua, X.; Liu, J. A novel fast algorithm for discrete Hartley transform of type-III base on the split-radix and first-order moments. In Proceedings of the SPIE Eighth International Symposium on Multispectral Image Processing and Pattern Recognition, Wuhan, China, 26–27 October 2013. [Google Scholar]
  29. Chiper, D.F. Radix-2 fast algorithm for computing discrete Hartley transform of type III. IEEE Trans. Circuits Syst. II Express Briefs 2012, 59, 297–301. [Google Scholar] [CrossRef]
  30. Chiper, D.F. An improved algorithm for the VLSI implementation of type II generalized DHT that allows an efficient incorporation of obfuscation technique. In Proceedings of the 45th International Conference on Telecommunications and Signal Processing (TSP), Prague, Czech Republic, 13–15 July 2022. [Google Scholar]
  31. Hamood, M.T. Fast algorithm for computing the discrete Hartley transform of type-II. Indones. J. Electr. Eng. Inform. 2016, 4, 120–125. [Google Scholar] [CrossRef]
  32. Hamood, M.T. Direct split-radix algorithm for fast computation of type-II discrete Hartley transform. Telecommun. Comput. Electron. Control 2020, 18, 3067–3072. [Google Scholar] [CrossRef]
  33. Huang, Y.-M.; Wu, J.-L. Polynomial transform based algorithms for computing two-dimensional generalized DFT, generalized DHT, and skew circular convolution. Signal Process. 2000, 80, 2255–2260. [Google Scholar] [CrossRef]
  34. Cariow, A. Strategies for the synthesis of fast algorithms for the computation of the matrix-vector product. J. Signal Process. Theory Appl. 2014, 3, 1–19. [Google Scholar] [CrossRef]
  35. Cariow, A.; Papliński, J. Algorithmic structures for realizing short-length circular convolutions with reduced complexity. Electronics 2021, 10, 2800. [Google Scholar] [CrossRef]
  36. Polyakova, M.; Witenberg, A.; Cariow, A. The design of fast type-V discrete cosine transform algorithms for short-length input sequences. Electronics 2024, 13, 4165. [Google Scholar] [CrossRef]
  37. Polyakova, M.; Cariow, A. Fast Type-II Hartley Transform Algorithms for Short-Length Input Sequences. Appl. Sci. 2024, 14, 10719. [Google Scholar] [CrossRef]
  38. Perera, S.M. Signal flow graph approach to efficient and forward stable DST algorithms. Linear Algebra Its Appl. 2018, 542, 360–390. [Google Scholar] [CrossRef]
  39. Perera, S.M.; Lingsch, L. Sparse matrix-based low-complexity, recursive, radix-2 algorithms for discrete sine transforms. IEEE Access 2021, 9, 141181–141198. [Google Scholar] [CrossRef]
  40. Paraskevas, I.; Barbarosou, M.; Chilton, E. Hartley transform and the use of the whitened Hartley spectrum as a tool for phase spectral processing. J. Eng. 2015, 2015, 95–101. [Google Scholar] [CrossRef]
  41. Wang, Z. A prime factor fast W transform algorithm. IEEE Trans. Signal Process. 1992, 40, 2361–2368. [Google Scholar] [CrossRef] [PubMed]
  42. Hu, N.C.; Chang, H.I.; Ersoy, O.K. Generalized discrete Hartley transforms. IEEE Trans. Signal Process. 1992, 40, 2931–2940. [Google Scholar]
Figure 1. The data flow graph of the proposed algorithm for computation of two-point odd-time DHT and odd-frequency DHT.
Figure 1. The data flow graph of the proposed algorithm for computation of two-point odd-time DHT and odd-frequency DHT.
Electronics 14 00996 g001
Figure 2. The data flow graph of the algorithm for the 3-point odd-time DHT.
Figure 2. The data flow graph of the algorithm for the 3-point odd-time DHT.
Electronics 14 00996 g002
Figure 3. The data flow graph of the algorithm for the 3-point odd-frequency DHT.
Figure 3. The data flow graph of the algorithm for the 3-point odd-frequency DHT.
Electronics 14 00996 g003
Figure 4. The data flow graph of the algorithm for implementation of 4-point odd-time DHT.
Figure 4. The data flow graph of the algorithm for implementation of 4-point odd-time DHT.
Electronics 14 00996 g004
Figure 5. The data flow graph of the algorithm for implementation of 4-point odd-frequency DHT.
Figure 5. The data flow graph of the algorithm for implementation of 4-point odd-frequency DHT.
Electronics 14 00996 g005
Figure 6. The data flow graph of the algorithm for the 5-point odd-time DHT.
Figure 6. The data flow graph of the algorithm for the 5-point odd-time DHT.
Electronics 14 00996 g006
Figure 7. The data flow graph of the algorithm for the 5-point odd-frequency DHT.
Figure 7. The data flow graph of the algorithm for the 5-point odd-frequency DHT.
Electronics 14 00996 g007
Figure 8. The data flow graph of the algorithm for the computation of the 6-point odd-time DHT.
Figure 8. The data flow graph of the algorithm for the computation of the 6-point odd-time DHT.
Electronics 14 00996 g008
Figure 9. The data flow graph of the algorithm for the computation of the 6-point odd-frequency DHT.
Figure 9. The data flow graph of the algorithm for the computation of the 6-point odd-frequency DHT.
Electronics 14 00996 g009
Figure 10. The data flow graph implementing the 7-point odd-time DHT.
Figure 10. The data flow graph implementing the 7-point odd-time DHT.
Electronics 14 00996 g010
Figure 11. The data flow graph implementing the 7-point odd-frequency DHT.
Figure 11. The data flow graph implementing the 7-point odd-frequency DHT.
Electronics 14 00996 g011
Figure 12. The data flow graph for the computing of the 8-point odd-time DHT.
Figure 12. The data flow graph for the computing of the 8-point odd-time DHT.
Electronics 14 00996 g012
Figure 13. The data flow graph of the algorithm for the 8-point odd-time DHT.
Figure 13. The data flow graph of the algorithm for the 8-point odd-time DHT.
Electronics 14 00996 g013
Table 1. The computational complexity of the matrix-vector product and the proposed fast algorithms for odd-time and odd-frequency DHTs.
Table 1. The computational complexity of the matrix-vector product and the proposed fast algorithms for odd-time and odd-frequency DHTs.
NMatrix-Vector ProductProposed Odd-Time DHT AlgorithmsProposed Odd-Frequency DHT Algorithms
Adds.Mults.Adds.Mults.Adds.
2242 (0%)2 (−50%)2 (0%)
3697 (+16%)3 (−67%)6 (0%)
4846 (−25%)2 (−50%)6 (−25%)
5202523 (+15%)6 (−76%)23 (+15%)
6303628 (−7%)8 (−78%)24 (−20%)
7424946 (+10%)10 (−80%)46 (+10%)
8484828 (−42%)8 (−83%)28 (−42%)
Table 2. The number of operations for the existing odd-time DHT algorithms.
Table 2. The number of operations for the existing odd-time DHT algorithms.
AlgorithmYear of Publication, ReferenceN = 4N = 8
Mults.Adds.Mults.Adds.
Prime factor2003, [17]2 (0%)10 (−40%)8 (0%)28 (0%)
Radix-22011, [27]10 (−20%)28 (0%)
Radix-2 with decimation-in-time2016, [31]2 (0%)6 (0%)12 (−33%)24 (+17%)
Split-radix2020, [32]2 (0%)6 (0%)12 (−33%)24 (+17%)
Proposed26828
Table 3. The number of operations of the existing odd-frequency DHT algorithms.
Table 3. The number of operations of the existing odd-frequency DHT algorithms.
AlgorithmYear of Publication, ReferenceN = 4N = 8
Mults.Adds.Mults.Adds.
Radix-22011, [28,29]8 (−75%)11 (−45%)16 (−50%)37 (−24%)
Prime factor, Wang1992, [41]2 (0%)10 (−40%)8 (0%)28 (0%)
Prime factor, Hu, Chang, Ersoy1992, [42]2 (0%)10 (−40%)8 (0%)28 (0%)
Prime factor, Bi, Zeng2003, [17]2 (0%)10 (−40%)6 (+33%)26 (+8%)
Proposed26828
Table 4. The computational complexity of the proposed algorithms and the direct matrix-vector product in the Big O notation.
Table 4. The computational complexity of the proposed algorithms and the direct matrix-vector product in the Big O notation.
NProposed AlgorithmsMatrix-Vector Product
Adds.Mults.Adds.Mults.
2, 4, 8 N 2 / 2 N 2 / 2 N ( N   1 ) N 2
3, 5, 7 ( N + 2 ) ( N 1 ) ( N 1 ) 2 / 2 + 2
6 ( N + 2 ) ( N   1 ) N + 2
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Polyakova, M.; Cariow, A.; Sklyar, J. Fast Algorithms for Short-Length Odd-Time and Odd-Frequency Discrete Hartley Transforms. Electronics 2025, 14, 996. https://doi.org/10.3390/electronics14050996

AMA Style

Polyakova M, Cariow A, Sklyar J. Fast Algorithms for Short-Length Odd-Time and Odd-Frequency Discrete Hartley Transforms. Electronics. 2025; 14(5):996. https://doi.org/10.3390/electronics14050996

Chicago/Turabian Style

Polyakova, Marina, Aleksandr Cariow, and Jekatierina Sklyar. 2025. "Fast Algorithms for Short-Length Odd-Time and Odd-Frequency Discrete Hartley Transforms" Electronics 14, no. 5: 996. https://doi.org/10.3390/electronics14050996

APA Style

Polyakova, M., Cariow, A., & Sklyar, J. (2025). Fast Algorithms for Short-Length Odd-Time and Odd-Frequency Discrete Hartley Transforms. Electronics, 14(5), 996. https://doi.org/10.3390/electronics14050996

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop