Recursive Matrix Calculation Paradigm by the Example of Structured Matrix

: In this paper, we derive recursive algorithms for calculating the determinant and inverse of the generalized Vandermonde matrix. The main advantage of the recursive algorithms is the fact that the computational complexity of the presented algorithm is better than calculating the determinant and the inverse by means of classical methods, developed for the general matrices. The results of this article do not require any symbolic calculations and, therefore, can be performed by a numerical algorithm implemented in a specialized (like Matlab or Mathematica) or general-purpose programming language (C, C ++ , Java, Pascal, Fortran, etc.).


Introduction
In previous studies [1,2], we proposed a classical numerical method for inverting the generalized Vandermonde matrix (GVM). The new contributions in this article are as follows: • We derive recursive algorithms for calculating the determinant and inverse of the generalized Vandermonde matrix.

•
The importance of the recursive algorithms becomes clear when we consider practical implementation of the GVM; they are useful each time we add a new interpolation node or a new root of a given differential equation in question.

•
The recursive algorithms, which we propose in this work, can allow avoiding the recalculation of the determinant and/or inverse. • The main advantage of the recursive algorithms is the fact that the computational complexity of the presented algorithm is of the O(n) class for the computation of the determinant.

•
The results of this article do not require any symbolic calculations and, therefore, can be performed by a numerical algorithm implemented in a high-level (like Matlab or Mathematica) or low-level programming language (C, C++, Java, Pascal, Fortran, etc.).
In this article, we neatly combined the results from previous studies [3,4] and extended the computational examples.
The main results of this article are shown in Algorithms 1 and 2. The paper is organized as follows: Section 2 justifies the importance of the generalized Vandermonde matrices, Section 3 gives the recursive algorithms for the generalized Vandermonde matrix determinant, Section 4 gives two recursive algorithms for calculating the desired inverse, Section 5 presents, with an example, the application of the proposed algorithms, and Section 6 summarizes the article.

Practical Importance of the Generalized Vandermonde Matrix
In this article, we consider the generalized Vandermonde matrix (GVM) of the form proposed by El-Mikkawy [5]. The classical form is considered in References [6,7]. For the n ∈ Z + real pairwise distinct roots c 1 , . . . , c n and the real constant coefficient k, we define the GVM as follows: c k n c k+1 n · · · c k+n−1 These matrices arise in a broad range of both theoretical and practical issues. Below, we survey the issues which require the use of the generalized Vandermonde matrices. Linear, ordinary differential equations (ODE): the Jordan canonical form matrix of the ODE in the Frobenius form is a generalized Vandermonde matrix ( [8] pp. 86-95). Control issues: investigating the so-called controllability [9] of the higher-order systems leads to the issue of inverting the classic Vandermonde matrix [10] (in the case of distinct zeros of the system characteristic polynomial) and the generalized Vandermonde matrix [11] (for systems with multiple characteristic polynomial zeros). As the examples of the higher-order models of the physical objects, we can mention Timoshenko's elastic beam equation [12] (fourth order) and Korteweg-de Vries's equation of waves on shallow water surfaces [13,14] (third, fifth, and seventh order). Interpolation: apart from the ordinary polynomial interpolation with single nodes, we consider the Hermite interpolation, allowing multiple interpolation nodes. This issue leads to the system of linear equations, with the generalized Vandermonde matrix ( [15] pp. 363-373). Information coding: the generalized Vandermonde matrix is used in coding and decoding information in the Hermitian code [16]. Optimization of the non-homogeneous differential equation [17].

Algorithms for the Generalized Vandermonde Matrix Determinant
In this chapter, we propose a library of recursive algorithms for the calculation of the generalized Vandermonde matrix determinant. These algorithms solve the following set of practically important, incremental problems: (A) Suppose we have the value of the Vandermonde determinant for a given series of roots c 1 , . . . , c n−1 .
How can we calculate the determinant after inserting another root into an arbitrary position in the root series, without the need to recalculate the whole determinant? This problem corresponds to the situation which frequently emerges in practice, i.e., adding a new node (polynomial interpolation) or increasing the order of the characteristic equation (linear differential equation solving, optimization, and control problems). (B) Contrary to the previous scenario, we have the Vandermonde determinant value for a given root series c 1 , . . . , c n . We remove an arbitrary root c q from the series. How can we recursively calculate the determinant in this case? The examples of real applications from the previous point also apply here. The proper solution is given in Section 3.1. (C) We are searching for the determinant value, when, in the given root series c 1 , . . . , c n , we change the value of an arbitrarily chosen root (Section 3.1). (D) We are searching for the determinant value, for the given root series c 1 , . . . , c n , calculated recursively.
The theorem below is the main tool to construct the above recursive algorithm.

The Recursive Determinant Formula
Theorem 1. The following recursive formula is fulfilled for the generalized Vandermonde matrix: Proof. Applying the standard determinant linear properties, we can obtain Next, in compliance with Laplace's expansion formula applied to the q-th column, we directly have This concludes the proof of Equation (2). Directly from Theorem 1, we can obtain the algorithms below for the incremental problems A-D. The detailed implementation of these formulas is straightforward and omitted.
Cases A, B: All we need to do is apply Equation (2). Case C: Let us assume that, for the given root series c 1 , . . . , c n , the corresponding determinant value is equal to detV (k) G c 1 , . . . , c q , . . . , c n . Our objective is to find the value of the determinant detV (k) G c 1 , . . . , c q + ∆c q , . . . , c n . Applying Equation (2) twice, we can obtain the following expression for the searched determinant: G c 1 , . . . , c q , . . . , c n , q = 1, .., n.

Case D:
The proper recursive function expressing the determinant value, for the given root series c 1 , . . . , c n , has the following form:

Computational Complexity of the Proposed Algorithms
The following facts are worth noting: The computational complexity of the presented Algorithms A-C is of the O(n) class with respect to the number of floating-point operations necessary to perform. This enables us to efficiently solve the incremental Vandermonde problems, avoiding the quadratic complexity, typical in the Vandermonde field (e.g., References [14,18]) Algorithm D is of the O(n 2 ) class, being, by the linear term, more efficient than the ordinary Gauss elimination method.

Special Cases
In this section, we give special forms of Algorithms A-D tuned for two special cases of the generalized Vandermonde matrix, i.e., for the equidistant roots, as well as the roots equal to the succeeding positive integers.

Generalized Vandermonde Matrix with Equidistant Roots
Let us take into account the GVM with the equidistant roots of the form In this special case Formula (2) becomes detV (k) and Algorithms A-D change to the recursive Equation (3).

Generalized Vandermonde Matrix with Positive Integer Roots
In Reference [5], it is considered a special case of GVM, which can be obtained from Equation (1) when c i = i, i = 1, . . . , n, denoting this matrix by V For the special V

Algorithms for the Generalized Vandermonde Matrix Inverse
In this chapter, we give a recursive algorithm to invert the generalized Vandermonde matrix of Equation (1). At first, let us refer to the known, non-recursive results within this topic presented previously [5]. Reference [5] features an explicit form of the GVM inverse, which makes use of the so-called elementary symmetric functions, defined below.

Definition of the Elementary Symmetric Functions
If the n parameters c 1 , c 2 , . . . , c n are distinct, then the elementary symmetric functions σ The efficient algorithm, of the O(n 2 ) computational complexity class, for calculating the elementary symmetric functions in Equation (6), is given in Reference [5]. Now, it is possible to present the explicit form of the inverse GVM given by Reference [5] (p. 647).
Let us return to the objective of this chapter, i.e., construction of the efficient, recursive algorithm for inverting the generalized Vandermonde matrix. This issue can be formalized as follows: we know the GVM inverse for the root series c 1 , . . . , c n . We want to efficiently calculate the inverse for the root series c 1 , . . . , c n , c n+1 , making use of the known inverse. Let V (k) . . , c n+1 ); then, the theorem below enables recursively calculating the desired inverse.

Theorem of the Recursive Inverse
, corresponding to the root series c 1 , . . . , c n+1 , can be expressed by the following block matrix: where V (k) denotes the known GVM inverse for the roots c 1 , . . . , c n .

Proof.
To prove the matrix recursive identity in Equation (8), we make use of the block matrix algebra rules. A useful formula, expressing the block matrix inverse by the inverses of the respective sub-matrices, is: Thus, if we know the inverse of the sub-matrix A 1 and the inverse of B, we can directly obtain the inverse of the block matrix A by performing a few matrix multiplications. For different c 1 , c 2 , . . . , c n+1 , the GVM matrix is invertible and Equation (10) holds true; thus, the coefficient d given by Equation (9) is non-zero. Now, let us take into account the generalized Vandermonde matrix V (k) G (n + 1) for the n + 1 roots c 1 , . . . , c n+1 . It can be treated as a block matrix of the following form: Now, applying the block matrix identities in Equation (10) to the block matrix in Equation (11), we directly obtain the thesis in Equation (9).
Despite the explicit form of the block matrix inverse in Equation (9), its efficient algorithmic implementation is not obvious. The order in which we calculate the matrix term has a crucial influence on the final computational complexity of the algorithm. Therefore, let us analyze all three possible orders.
(A) Left-to-right order of multiplications.
One can notice that V  A detailed analysis leads also to the O(n 3 ) class.
(C) The order of the following form: In this case, at first, we perform the following two multiplications: • The multiplication V  Finally, all we have to do is to multiply these two last vectors, which obviously is an operation of the O(n 2 ) class.
Summarizing, the most efficient is the multiplication order ((C), giving a quadratic computational complexity. All other orders lead to the worse O(n 3 ) class algorithms. Combining the above results, we can give the algorithm which solves the incremental inverse problem, i.e., calculating the GVM inverse for the root series c 1 , . . . , c n , c n+1 on the basis of the known inverse for the root series c 1 , . . . , c n .

Algorithm 1
Using the incremental Algorithm 1, we can build the final, recursive algorithm for inverting the generalized Vandermonde matrix of the form in Equation (1).

5.
Calculate the coefficient d using Equation (9).  Finally, all we have to do is to multiply these two last vectors, which obviously is an operation of the O(n 2 ) class.
Summarizing, the most efficient is the multiplication order ((C), giving a quadratic computational complexity. All other orders lead to the worse O(n 3 ) class algorithms. Combining the above results, we can give the algorithm which solves the incremental inverse problem, i.e., calculating the GVM inverse for the root series

Algorithm 1
Using the incremental Algorithm 1, we can build the final, recursive algorithm for inverting the generalized Vandermonde matrix of the form in Equation (1). ( ) : 5. Calculate the coefficient d using Equation (9).

Build the desired matrix inverse
7. Output:

Computational Complexity
It is possible to note the following advantages of the computational complexity of inverting the GVM by recursive algorithms in comparison with the classical Equation (7), the complexity of which is O(n 3 ) (the classical Equation (7)

Computational Complexity
It is possible to note the following advantages of the computational complexity of inverting the GVM by recursive algorithms in comparison with the classical Equation (7), the complexity of which is O(n 3 ) (the classical Equation (7) requires calculating the elementary symmetric functions σ (n) i,j for i, j = 1, . . . , n. To this aim, Algorithm 2.1 p. 644 [5], with quadratic complexity, should be executed n times (Formula 2.5, p. 645): As we analyzed in the point (C), Section 4.2, the computational complexity of the incremental Algorithm 1, which is constructed on the basis of of Equation (12), is of the O(n 2 ) class with respect to the number of floating-point operations which have to be performed. This is possible thanks to the proper multiplication order in Equation (12). This way, we avoid the O(n 3 ) complexity while adding a new root. The computational complexity of the recursive Algorithm 2 is of the O(n 3 ) class.  Next i 6. Output: -V : real n×n -the inverse for the roots c 1 , . . . , c n .

End.
Last but not least, Equation (7) requires recalculating the desired inverse each time we add a new root. The main idea of the recursive algorithms we proposed is to make use of the already calculated inverse. This is how high efficiency was obtained. On the graphs below, we practically compare the efficiency of the recursive algorithms with the standard algorithms (in a non-recursive form, for matrices with arbitrary entries, contrary to the algorithms presented in this article, which are developed specially for the GVM) embedded in Matlab ® . On the left, we can see the execution time of the standard and recursive algorithms, and, on the right, we can see the relative performance gain (recursive algorithms vs. the standard ones for inversion and determinant calculation).
On Figures 1 and 2 we show a practical performance tests of the Algorithms 1 and 2.

Example
We show a practical application of the algorithms from this article using the same numerical example as in Reference [5]

Example
We show a practical application of the algorithms from this article using the same numerical example as in Reference [5]

Example
We show a practical application of the algorithms from this article using the same numerical example as in Reference [5] (p. 649), to enable easy comparison of the two opposite algorithms: classical and recursive. Let us consider the generalized Vandermonde matrix V  The generalized Vandermonde matrix of such parameters has the following form: The determinant of the matrix V (0.5) G (7) and its inverse have the following forms, respectively:

Objective
Our objective is to find the determinant and inverse of the generalized Vandermonde matrix

Recursive Determinant Calculation
We calculate the determinant value of the matrix V (0.5) G (8) using Equation (5) because the GVM in question has consecutive integer roots. In this case, the equality in Equation (5) leads to the following determinant value:

Recursive Inverse Finding
The task of calculating the inverse of the matrix V The last step of Algorithm 1 is building a block matrix in compliance with Equation (16). Combining the vectors v 1 in Equation (20) and v 2 in Equation (21), and the coefficient d in Equation (22) The last step of Algorithm 1 is building a block matrix in compliance with Equation (16). Combining the vectors 1 One can see that the incrementally received inverse ( )  is equivalent to the inverse obtained by the classical algorithms in Reference [5] (p. 649).

Summary of the Example
In this example, we recursively calculated the determinant and inverse of the

Research and Extensions
The following can be seen as the desired future research directions:  Construction of the parallel algorithm for the generalized Vandermonde matrices.  Adaptation of the algorithms to vector-oriented hardware units.  Combination of both.  Application on Graphics Hardware Unit architecture.
One can see that the incrementally received inverse V

Summary of the Example
In this example, we recursively calculated the determinant and inverse of the V (7) matrix, respectively. It is worth noting that, to perform this, there were merely eight scalar multiplications necessary for the determinant, and 3 · 7 + 2 · 7 2 scalar multiplications necessary for the inverse. This confirms the high efficiency of the recursive approach.

Research and Extensions
The following can be seen as the desired future research directions: Construction of the parallel algorithm for the generalized Vandermonde matrices. Adaptation of the algorithms to vector-oriented hardware units. Combination of both. Application on Graphics Hardware Unit architecture. Application of the results in new branches, like deep learning and artificial intelligence.
The proposed results could also be applied to other related applications which use Vandermonde or matrices of similar type, such as the following [19][20][21]: Total variation problems and optimization methods; Power systems networks; The numerical problem preconditioning; Fractional order differential equations.

Summary
In this paper, we derived recursive numerical recipes for calculating the determinant and inverse of the generalized Vandermonde matrix. The results presented in this article can be performed automatically using a numerical algorithm in any programming language. The computational complexity of the presented algorithms is better than the ordinary GVM determinant/inverse methods.
The presented results neatly combine the theory of algorithms, particularly the recursion programming paradigm and computational complexity analysis, with numerical recipes, which we consider as the right branch in constructing computational algorithms.
Considering software production, the recursion is not only a purely academical paradigm, as it was successfully used by programmers for decades.