# Fast Type-II Hartley Transform Algorithms for Short-Length Input Sequences
## 4 Results  
The experiment confirmed the correctness of the DHT-II matrix factorizations obtained in Section 3. Namely, the coinciding results of the multiplication of factorized matrices from Section 3 (Equations (7), (10), (12), (18), (21), (27), and (30)) with the original DHT-II matrix was evaluated using the MATLAB R2023b software. For this, the DHT-II matrices were directly calculated for different input sequence sizes \(N\) using the expression (3) from Section 3. Next, the factorized matrices were obtained using the expressions (7), (10), (12), (18), (21), (27), and (30) for \(N=2\), \(3\), \(4\), \(5\), \(6\), \(7\), and \(8\), respectively. Further, the results of the direct calculation of the DHT-II matrix were compared to the results of the multiplication of matrices included in the DHT-II factorizations. The results' consistency was evaluated, indicating the correctness of the developed factorizations.  
Based on the DHT-II matrix factorization, the proposed fast algorithms of the DHT-II calculation were represented in Section 3 by the data flow graphs in Figures 1-7. To test the correctness of the constructed data flow graphs for the proposed algorithms, 210 sequences of random normally distributed numbers of length \(N\) from \(2\) to \(8\) were generated. Each sequence was transformed by a direct matrix-vector product using a data flow graph. The coinciding results obtained for each \(N\) indicated the correctness of the constructed data flow graphs for the proposed algorithms.  
Next, the numbers of multiplications and additions for the direct DHT-II calculation method and the proposed algorithms were estimated and compared. To ensure the accuracy of the estimates, zero elements in the base DHT-II matrices were not taken into account. This meant that the estimate of the multiplicative complexity of the calculations was calculated using the formula \(N^{2}\)-Q and the additive complexity was calculated using the formula \(N(N-1)\)-Q, where Q is the number of positions with zero elements in the base transform matrix. So, in the matrix \(\mathbf{C_{4}}\), four zeros appeared; in the matrix \(\mathbf{C_{8}}\), eight zeros were found. Overall, the number of multiplications on the data flow graphs was determined by the number of graph vertices, indicated by circles with factors. The number of additions was determined by the number of occurrences of two graph edges in one vertex. The proposed algorithms significantly reduced the number of multiplications in the DHT-II algorithms for a 1D signal, with the number of samples in the range of \(3\) to \(8\). At the same time, the number of additions was slightly reduced or even increased. The number of additions was reduced by an average of \(5\%\) and the number of multiplications was reduced by an average of \(73\%\) with the number of samples in the range of \(3\) to \(8\). The obtained results are shown in Table 1. The percentage difference in the number of operations is indicated in parentheses, a plus means that the number of operations increased compared to the direct method, and a minus means it was reduced.  
The numbers of multiplications and additions for the algorithms known from the literature are shown in Table 2. Also, the percentage difference in the number of operations is indicated in parentheses.  
\begin{table}
\begin{tabular}{c c c c c} \hline \(N\) & \multicolumn{2}{c}{**Direct Method**} & \multicolumn{2}{c}{**Proposed Algorithms**} \\ \hline  & **Additions** & **Multiplications** & **Additions** & **Multiplications** \\ \hline
2 & 2 & 0 & 2 (0\%) & 0 (0\%) \\
3 & 6 & 4 & 7 (+16\%) & 1 (\(-75\%\)) \\
4 & 8 & 4 & 6 (\(-25\%\)) & 2 (\(-50\%\)) \\
5 & 20 & 16 & 23 (+15\%) & 5 (\(-69\%\)) \\
6 & 30 & 16 & 26 (\(-13\%\)) & 2 (\(-88\%\)) \\
7 & 42 & 36 & 46 (+10\%) & 8 (\(-78\%\)) \\
8 & 48 & 40 & 26 (\(-35\%\)) & 8 (\(-80\%\)) \\ \hline \end{tabular}
\end{table}
Table 1: The number of operations of the direct method and the proposed algorithms.