An Algorithm for Fast Multiplication of Kaluza Numbers

: This paper presents a new algorithm for multiplying two Kaluza numbers. Performing this operation directly requires 1024 real multiplications and 992 real additions. We presented in a previous paper an effective algorithm that can compute the same result with only 512 real multiplications and 576 real additions. More effective solutions have not yet been proposed. Nevertheless, it turned out that an even more interesting solution could be found that would further reduce the computational complexity of this operation. In this article, we propose a new algorithm that allows one to calculate the product of two Kaluza numbers using only 192 multiplications and 384 additions of real numbers.


Introduction
The permanent development of the theory and practice of data processing, as well as the need to solve increasingly complex problems of computational intelligence, inspire the use of complex and advanced mathematical methods and formalisms to represent and process big multidimensional data arrays. A convenient formalism for representing big data arrays is the high-dimensional number system. For a long time, high-dimensional number systems have been used in physics and mathematics for modeling complex systems and physical phenomena. Today, hypercomplex numbers [1] are also used in various fields of data processing, including digital signal and image processing, machine graphics, telecommunications, and cryptography [2][3][4][5][6][7][8][9][10]. However, their use in brain-inspired computation and neural networks has been largely limited due to the lack of comprehensive and all-inclusive information processing and deep learning techniques. Although there has been a number of research articles addressing the use of quaternions and octonions, higher-dimensional numbers remain a largely open problem [11][12][13][14][15][16][17][18][19][20][21][22]. Recently, new articles appeared in open access that presented a sedenion-based neural network [23,24]. The expediency of using numerical systems of higher dimensions was also noted. Thus, the object of our research was hypercomplex-valued convolutional neural networks using 32-dimensional Kaluza numbers.
In advanced hypercomplex-valued convolutional neural networks, multiplying hypercomplex numbers is the most time-consuming arithmetic operation. The reason for this is that the addition of N-dimensional hypercomplex numbers requires N real additions, while the multiplication of these numbers already requires N(N − 1) real additions and N 2 real multiplication. It is easy to see that the increasing of dimensions of hypercomplex numbers increases the computational complexity of the multiplication. Therefore, reducing the computational complexity of the multiplication of hypercomplex numbers is an important scientific and engineering problem. The original algorithm for computing the product of Kaluza numbers was described in [25], but we found a more efficient solution. The purpose of this article is to present our new solution.

Preliminary Remarks
In all likelihood, the rules for constructing Kaluza numbers were first described in [26]. In article [25], based on these rules, a multiplication table for the imaginary units of the Kaluza number was constructed. A Kaluza number is defined as follows: where N = 2 m−1 and {d n } for n = 1, 2, . . . , 31 are real numbers, and {e n } for n = 1, 2, . . . , 31 are the imaginary units.
Imaginary units e 1 , e 2 , . . . , e m are called principal, and the remaining imaginary units are expressed through them using the formula: e s = e p , e q , . . . e r , where 1 ≤ p < q < · · · < r ≤ m.
All kinds of works of imaginary units are entirely based on established rules: e 2 p = p ; q p = α pq p q ; p < q; pq = 1, 2, . . . , m For Kaluza numbers [26]: Using the above rules, the results of all possible products of imaginary units of Kaluza numbers can be summarized in the following tables [25]: Tables 1-4. For conveniens of notation we represents each element e i in the tables by its subscript i, and we set i = e i . Table 1. Multiplication rules of Kaluza numbers for e 0 , e 1 , . . . , e 15 and e 0 , e 1 , . . . , e 15 (elements e i denoted by their subscripts, i.e., i = e i ).   ine× 16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  ine0  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  1  10  11  12  13  14  15  26  27  28  29  22  23  24  25  31  30  Suppose we want to compute the product of two Kaluza numbers: where d (1) = a 0 + 31 ∑ n=1 a n e n and d (2) The operation of the multiplication of Kaluza numbers can be represented more compactly in the form of a matrix-vector product: where The direct multiplication of the matrix-vector product in Equation (1) requires 1024 real multiplications and 992 additions. We shall present an algorithm that reduces computation complexity to 192 multiplications and 384 additions of real numbers.

B
(1) where: There is a possiblity to use a method of factorization for the standardized matrices (6)- ( 8). This allows us to reduce the number of multiplications to 8 2 /2 using 8(8 + 1) additions for each of above matrices. Therefore, similar to the previous we can write [27,28]: where A N/2 , B N/2 are some matrices. Therefore, we can rewrite (6) (2−) 8 where: B 8 .
Combining partial decompositions in a single procedure we can rewrite procedure, (3) as following: , H 2 is the order 2 Hadamard matrix, i.e.: Introducing the following notation: to (10)-(13), we obtain: In order to simplify, we introduce the following notation for the elements of matrix B (2+) 8 (14): we obtain: Now, we introduce the following notation for the elements of matrix B (2−) 8 (15): we obtain: All of the above matrices have the same internal structure. We can permute rows and columns using the π r = (5 1 2 7 4 0 3 6) and π c = (5 1 2 6 4 0 3 7) permutation rules, respectively. We obtain the following form: where B The matricesB ,  We can use the multiplication procedure (9) and represent the above matrices in a form:B   Figure 1 shows a data flow diagram describing the new algorithm for the computation of the product of Kaluza numbers (17). In this paper, the data flow diagram is oriented from left to right. Straight lines in the figure denote the operations of data transfer. Points, where lines converge, denote summation. The dotted lines indicate the subtraction operation. We use the regular lines without arrows on purpose, so as not to clutter the picture. The rectangles indicate the matrix-vector multiplications with matrices inscribed inside a rectangle.

Evaluation of Computational Complexity
We will now calculate how many multiplications and additions of real numbers are required for the implementation of the new algorithm and will compare this with the number of operations required both for direct computation of matrix-vector products in Equation ( 1) and for implementing our previous algorithm [25]. The number of real multiplications required using the new algorithm is 192. Thus, using the proposed algorithm, the number of real multiplications needed to calculate the Kaluza number product is significantly reduced. The number of real additions required using our algorithm is 384. We observe that the direct computation of the Kaluza number product requires 608 additions more than the proposed algorithm. Thus, our proposed algorithm saves 832 multiplications and 960 additions of real numbers compared with the direct method. Thus, the total number of arithmetic operations for the proposed algorithm is approximately 71.4% less than that of the direct computation. The previously proposed algorithm [25] calculates the same result using 512 multiplications and 576 additions of real numbers. Thus, our proposed algorithm saves 62.5% of multiplications and 33.3% of additions of real numbers compared with our previous algorithm. Hence, the total number of arithmetic operations for the new proposed algorithm is approximately 47% less than that of our previous algorithm.

Conclusions
We presented a new effective algorithm for calculating the product of two Kaluza numbers. The use of this algorithm reduces the computational complexity of multiplications of Kaluza numbers, thus reducing implementation complexity and leading to a high-speed resource-effective architecture suitable for parallel implementation on VLSI platforms. Additionally, we note that the total number of arithmetic operations in the new algorithm is less than the total number of operations in the compared algorithms. Therefore, the proposed algorithm is better than the compared algorithms, even in terms of its software implementation on a general-purpose computer.
The proposed algorithm can be used in metacognitive neural networks using Kaluza numbers for data representation and processing. The effect in this case is achieved by using non-commutative finite groups based on the properties of the hypercomplex algebra [24]. When using the Kaluza number, in this case, the rule for generating the elements of the group will be set, as well as the rule for performing the group operation of multiplication. Such a system can contain two components: a neural network based on Kaluza numbers, which represents a cognitive component, and a metacognitive component, which serves to self-regulate the learning algorithm. At each stage, the metacognitive component will decide how and when the learning takes place. The algorithm removes unnecessary samples and keeps only those that are used. This decision will be determined by the magnitude and 31 phases of the Kaluza number. However, these matters are beyond the scope of this article and require more detailed research.