Open Access
This article is
 freely available
 reusable
Algorithms 2015, 8(4), 982998; https://doi.org/10.3390/a8040982
Article
Some Matrix Iterations for Computing Generalized Inverses and Balancing Chemical Equations
^{1}
Department of Chemistry, Roudehen Branch, Islamic Azad University, 39731 Roudehen, Iran
^{2}
Faculty of Sciences and Mathematics, University of Niš, Višegradska 33, 18000 Niš, Serbia
^{3}
Department of Applied Mathematics, Ferdowsi University of Mashhad, 91779 Mashhad, Iran
^{*}
Author to whom correspondence should be addressed.
Academic Editors:
Alicia Cordero,
Juan R. Torregrosa
and
Francisco I. Chicharro
Received: 25 June 2015 / Accepted: 26 October 2015 / Published: 3 November 2015
Abstract
:An application of iterative methods for computing the Moore–Penrose inverse in balancing chemical equations is considered. With the aim to illustrate proposed algorithms, an improved high order hyperpower matrix iterative method for computing generalized inverses is introduced and applied. The improvements of the hyperpower iterative scheme are based on its proper factorization, as well as on the possibility to accelerate the iterations in the initial phase of the convergence. Although the effectiveness of our approach is confirmed on the basis of the theoretical point of view, some numerical comparisons in balancing chemical equations, as well as on randomlygenerated matrices are furnished.
Keywords:
generalized inverses; balancing chemical equations; hyperpower method; order of convergence; matrix inverse1. Introduction
A chemical equation is only a symbolic representation of a chemical reaction and represents an expression of atoms, elements, compounds or ions. Such expressions are generated based on balancing through reactant or product coefficients, as well as through reactant or product molar masses [1]. In fact, equilibrating the equations that represent the stoichiometry of a reacting system is a matter of mathematics, since it can be reduced to the problem of solving homogeneous linear systems.
Balancing chemical equations is an important application of generalized inverses. To discuss further, the reflexive ginverse of a matrix has been successfully used in solving a general problem of balancing chemical equations (see [2,3]). Continuing in the same direction, Krishnamurthy in [4] gave a mathematical method for balancing chemical equations founded by virtue of a generalized matrix inverse. The method used in [4] is based on the exact computation of reflexive generalized inverses by means of elementary matrix transformations and the finitefield residue arithmetic, as it was described in [5].
It is well known that the symbolic data processing, including both rational arithmetic and multiple modulus residue arithmetic, are time consuming, both for the implementation and for execution. On the other hand, the finitefield exact arithmetic is inapplicable to chemical reactions, which include atoms with fractional and/or integer oxidation numbers. This hard class of chemical reactions is investigated in [6].
Additionally, the balancing chemical equations problem can be readily resolved by computer algebra software, as was discussed in [7]. The approach used in [7] is based on the usage of the Gaussian elimination (also known as the Gauss–Jordan algorithm), while the approach that is exploited in [2] is based on singular value decomposition (SVD). On the other hand, it is widely known that Gaussian elimination, as well as SVD require a large amount of numerical operations [8]. Furthermore, small pivots that could appear in Gaussian elimination can lead to large multipliers [9], which can sometimes lead to the divergence of numerical algorithms. Two methods of balancing chemical equations, introduced in [10], are based on integer linear programming and integer nonlinear programming models, respectively. Notice that the linear Diophantine matrix method was proposed in [11]. The method is applicable in cases when the reaction matrices lead to infinite stoichiometricallyindependent solutions.
In the present paper, we consider the possibility of applying a new higher order iterative method for computing the Moore–Penrose inverse in the problem of balancing chemical equations. In general, our current research represents the first attempt to apply iterative methods in balancing chemical reactions.
A rapid numerical algorithm for computing matrixgeneralized inverses with a prescribed range and null space is developed in order to implement this global idea. The method is based on an appropriate modification of the hyperpower iterative method. Furthermore, some techniques for the acceleration of the method in the initial phase of its convergence is discussed. We also try to show the applicability of proposed iterative schemes in balancing chemical equations. Before a more detailed discussion, we briefly review some of the important backgrounds incorporated in our work.
The outer inverse with prescribed range T and null space S of a matrix $A\in {\mathsf{\u2102}}_{r}^{m\times n}$, denoted by ${A}_{T,S}^{\left(2\right)}$, satisfies the second Penrose matrix equation $XAX=X$ and two additional properties: $\mathcal{R}\left(X\right)=\phantom{\rule{3.33333pt}{0ex}}T$ and $\mathcal{N}\left(X\right)=S$. The significance of these inverses is reflected primarily in the fact that the most important generalized inverses are particular cases of outer inverses with a prescribed range and null space. For example, the Moore–Penrose inverse ${A}^{\u2020}$, the weighted Moore–Penrose inverse ${A}_{M,N}^{\u2020}$, the Drazin inverse ${A}^{D}$ and the group inverse ${A}^{\#}$ can be derived by means of the appropriate choices of subspaces T and S in what follows:
wherein ${A}^{\u266f}=MA{N}^{1}$ and $\mathrm{ind}\left(A\right)$ denotes the index of a square matrix A (see, e.g., [12]).
$$\begin{array}{c}{A}^{\u2020}={A}_{\mathcal{R}\left({A}^{*}\right),\mathcal{N}\left({A}^{*}\right)}^{\left(2\right)},\phantom{\rule{1.em}{0ex}}{A}_{M,N}^{\u2020}={A}_{\mathcal{R}\left({A}^{\u266f}\right),\mathcal{N}\left({A}^{\u266f}\right)}^{\left(2\right)}\hfill \\ {A}^{\mathrm{D}}={A}_{\mathcal{R}\left({A}^{k}\right),\mathcal{N}\left({A}^{k}\right)}^{\left(2\right)},\phantom{\rule{1.em}{0ex}}k\ge \mathrm{ind}\left(A\right),\phantom{\rule{1.em}{0ex}}{A}^{\#}={A}_{\mathcal{R}\left(A\right),\mathcal{N}\left(A\right)}^{\left(2\right)},\phantom{\rule{1.em}{0ex}}\mathrm{ind}\left(A\right)=1\hfill \end{array}$$
Although there are many approaches to calculate these inverses by means of direct methods, an alternative and very important approach is to use iterative methods. Among many such matrix iterative methods, the hyperpower iterative family has been introduced and investigated (see, for example, [13,14,15]). The hyperpower iteration of the order p is defined by the following scheme (see, for example, [13]):
$${X}_{k+1}={X}_{k}(I+{R}_{k}+\cdots +{R}_{k}^{p1})={X}_{k}\sum _{i=0}^{p1}{R}_{k}^{i},\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}{R}_{k}=IA{X}_{k}$$
The iteration Equation (2) requires p matrixmatrix multiplications (from now on denoted by mmm) to achieve the pth order of convergence. The adoption $p=2$ yields to the Schulz matrix iteration, originated in [16],
with the second rate of convergence. Further, choice $p=3$ gives the cubicallyconvergent method of Chebyshev [17], defined as follows:
$${X}_{k+1}={X}_{k}(2IA{X}_{k})$$
$${X}_{k+1}={X}_{k}(3IA{X}_{k}(3IA{X}_{k}))$$
For more details about the background of iterative methods for computing generalized inverses, please refer to [18].
The main motivation of the paper [19] was the observation that the inverse of the reaction matrix cannot always be obtained. For this purpose, the author used an approach based on rowreduced echelon forms of both the reaction matrix and its transpose. Since the Moore–Penrose inverse always exists, replacement of the ordinary inverse by the corresponding pseudoinverse resolves the drawback that the inverse of the reaction matrix does not always exist. Furthermore, two successive transformations into the corresponding rowreduced echelon forms are timeconsuming and badlyconditioned numerical processes, again based on Gaussian elimination. Our intention is to avoid the abovementioned drawbacks that appear in previouslyused approaches.
Here, we decide to develop an application of the Schulztype methods. The motivation is based on the following advantages arising from the use of these methods. Firstly, they are totally applicable on sparse matrices possessing sparse inverses. Secondly, the Schulztype methods are useful for providing approximate inverse preconditions. Thirdly, such schemes are parallelizable, while Gaussian elimination with partial pivoting is not suitable for the parallelism.
It is worth mentioning that an application of iterative methods in finding exact solutions that involve integers or rational entries requires an additional transformation of the solution and utilization of tools for symbolic data processing. To this end, we used the programming package Mathematica.
The rest of this paper is organized as follows. A new formulation of a very high order method is presented in Section 2. The method is fast and economical at the same time, which is confirmed by the fact that it attains a very high rate of convergence by using a relatively small number of mmm. Acceleration of the convergence via scaling the initial iterates is discussed, and some novel approaches in this trend are given in the same section. An application of iterative methods in balancing chemical equations is considered in Section 3. A comparison of numerical results obtained by applying the introduced method is shown against the results defined by using several similar methods. Some numerical experiments concerning the application of the new iterations in balancing chemical equations are presented in Section 4. Finally, some concluding remarks are drawn in the last section.
2. An Efficient Method and Its Acceleration
A Schulztype method of high order $p=31$ with two improvements is derived and chosen as one of the options for balancing chemical equations. The first improvement is based on a proper factorization, which reduces the number of mmm required in each cycle. The second straightening is based on a proper accelerating of initial iterations.
Toward this goal, we consider Equation (2) in the case $p=31$ as follows:
$${X}_{k+1}={X}_{k}\sum _{i=0}^{30}{R}_{k}^{i},\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}{R}_{k}=IA{X}_{k}$$
In its original form, the hyperpower iteration Equation (5) is of the order 31 and requires 31 mmm. It is necessary to remark that a kind of effectiveness of a computational iterative (fixed pointtype) method can be estimated by the real number (called the computational efficiency index) $EI={p}^{\frac{1}{\theta}}$, wherein θ and p stand for the whole computational cost and the rate of convergence per cycle, respectively. Here, the most important burden and cost per cycle is the number of matrixmatrix products.
Clearly, in Equation (5), this proportion between the order of convergence and the needed number of mmm is not suitable, since its efficiency index:
is relatively small. This shows that Equation (5) is not a useful iterative method. To improve the applicability of Equation (5) and, so, to derive a fast matrix iteration with a reduced number of mmm, i.e., to obtain an efficient method, we keep going as in the following subsection.
$$EI={31}^{\frac{1}{31}}\approx 1.1171$$
2.1. An Efficient Method
We rewrite Equation (5) as:
$$\begin{array}{cc}{X}_{k+1}={X}_{k}& (I+{R}_{k}(I+{R}_{k})(I{R}_{k}+{R}_{k}^{2})(I+{R}_{k}+{R}_{k}^{2})(I{R}_{k}+{R}_{k}^{2}{R}_{k}^{3}+{R}_{k}^{4})\\ & \times (I+{R}_{k}+{R}_{k}^{2}+{R}_{k}^{3}+{R}_{k}^{4})(I{R}_{k}+{R}_{k}^{3}{R}_{k}^{4}+{R}_{k}^{5}{R}_{k}^{7}+{R}_{k}^{8})\\ & \times (I+{R}_{k}{R}_{k}^{3}{R}_{k}^{4}{R}_{k}^{5}+{R}_{k}^{7}+{R}_{k}^{8}))\end{array}$$
Subsequently, Equation (7) results in the following formulation of Equation (5):
$${X}_{k+1}={X}_{k}\left(I+({R}_{k}+{R}_{k}^{2}+{R}_{k}^{3}+{R}_{k}^{4}+{R}_{k}^{5}+{R}_{k}^{6})\left(I+{R}_{k}^{6}+{R}_{k}^{12}+{R}_{k}^{18}+{R}_{k}^{24}\right)\right)$$
Now, we could deduce our final fast matrix iteration by simplifying Equation (8) more:
where only nine mmm are required. Therefore, the efficiency index of the proposed fast iterative method becomes:
$${X}_{k+1}={X}_{k}\left(I+({R}_{k}+{R}_{k}^{2})(I+{R}_{k}^{2}+{R}_{k}^{4})\left(I+({R}_{k}^{2}+{R}_{k}^{8})({R}_{k}^{4}+{R}_{k}^{16})\right)\right)$$
$$EI={31}^{\frac{1}{9}}\approx 1.4645$$
The efficiency index $1.4645$ of Equation (9) is higher than the efficiency index 1.4142 of Equation (3), higher than the efficiency index 1.4422 of Equation (4) and finally higher than the efficiency index 1.4592 of the 30th order method proposed recently by Sharifi et al. [20].
At this point, it would be useful to provide the following theorem regarding the convergence behavior of Equation (9).
Theorem 1. Let $A\in {\mathbb{C}}_{r}^{m\times n}$ be a given matrix of rank r and $G\in {\mathbb{C}}_{s}^{n\times m}$ be a given matrix of rank $0<s\le r$, which satisfy $\mathrm{rank}\left(GA\right)=\mathrm{rank}\left(G\right)$. Then, the sequence ${\left\{{X}_{k}\right\}}_{k=0}^{k=\infty}$ generated by the iterative method Equation (9) converges to ${A}_{R\left(G\right),N\left(G\right)}^{\left(2\right)}$ with 31storder if the initial approximation ${X}_{0}=\alpha G$ satisfies:
$$\parallel {F}_{0}\parallel =\parallel A{A}_{T,S}^{\left(2\right)}A{X}_{0}\parallel <1$$
Proof. The proof of this theorem would be similar to the ones in [21]. Hence, we skip it over and just include the following error bound:
wherein ${E}_{k}={A}_{R\left(G\right),N\left(G\right)}^{\left(2\right)}{X}_{k}$. ☐
$$\parallel {E}_{k+1}\parallel \le \parallel {A}_{R\left(G\right),N\left(G\right)}^{\left(2\right)}{\parallel \phantom{\rule{0.166667em}{0ex}}\parallel A\parallel}^{31}\phantom{\rule{0.166667em}{0ex}}{\parallel {E}_{k}\parallel}^{31}$$
The derived iterative method is very fast and effective, in contrast to the existing iterative Schulztype methods of the same type. However, as was pointed out by Soleimani et al. [22], such iterative methods are slow at the beginning of the iterative process, and the real convergence rate cannot be observed. An idea to remedy this disadvantage is to apply a multiple rootfinding algorithm on the matrix equation $F\left(X\right)\phantom{\rule{0.166667em}{0ex}}=\phantom{\rule{0.166667em}{0ex}}{X}^{1}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}A\phantom{\rule{0.166667em}{0ex}}=\phantom{\rule{0.166667em}{0ex}}0$ and to try to accelerate the hyperpower method in its initial iterations. Such a discussion about a scaled version of the hyperpower method is the main aim of the next subsection.
2.2. Accelerating the Initial Phase
Another useful motivation of the present paper is processed here. The iterative scheme:
was applied in [22] to achieve the convergence phase in the main (modified Householder) method much more rapidly and to accelerate the beginning of the process. In the second iteration phase, it is sufficient to apply the introduced fast and efficient modified Householder method, which then reaches its own full speed of convergence [22].
$${X}_{k+1}={X}_{k}\left((\beta +1)I\beta A{X}_{k}\right),\phantom{\rule{4pt}{0ex}}1\le \beta \le 2$$
In the same vein, the iterative expression Equation (13) can be rewritten in the following equivalent, but more practical form:
$${X}_{k+1}={X}_{k}\left((1\beta )I+\beta \sum _{i=0}^{1}{R}_{k}^{i}\right),\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}{R}_{k}=IA{X}_{k},\phantom{\rule{4pt}{0ex}}1\le \beta \le 2$$
One can now observe that Equation (14) is the particular case ($p=2$) of the following new scheme:
$$\begin{array}{cc}{X}_{k+1}& ={X}_{k}\left(I+\beta \left((p1)I+{\displaystyle \sum _{i=1}^{p1}}{(1)}^{i}\left(\genfrac{}{}{0pt}{}{p}{i+1}\right){\left(A{X}_{k}\right)}^{i}\right)\right)\\ & ={X}_{k}\left((1\beta )I+\beta \left({\displaystyle \sum _{i=0}^{p1}}{(1)}^{i}\left(\genfrac{}{}{0pt}{}{p}{i+1}\right){\left(A{X}_{k}\right)}^{i}\right)\right)\\ & ={X}_{k}\left((1\beta )I+\beta {\displaystyle \sum _{i=0}^{p1}}{R}_{k}^{i}\right),\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}{R}_{k}=IA{X}_{k},\phantom{\rule{4pt}{0ex}}1\le \beta \le 2\end{array}$$
Therefore, Equation (15) can be considered as an important acceleration of the Schulztype method Equation (2) in the initial phase, before the convergence rate is practically achievable. We note that such accelerations are useful for large matrices, whereas the iterative methods require too much iterations to converge. Particularly, by following Equation (15), one can immediately notice that the accelerating in the initial phase of iteration Equation (9) is of the form:
$${X}_{k+1}={X}_{k}\left((1\beta )I+\beta \left(I+({R}_{k}+{R}_{k}^{2})(I+{R}_{k}^{2}+{R}_{k}^{4})\left(I+({R}_{k}^{2}+{R}_{k}^{8})({R}_{k}^{4}+{R}_{k}^{16})\right)\right)\right)$$
Remark 1. The particular choice $\beta =1$ in Equation (15) reduces these iterations to the usual hyperpower family of the iterative methods possessing the order $p\ge 2$:
The choice $p=2$ in Equation (15) leads to the scaled Schulz matrix iteration considered recently in [23], and the choice $p=2$, $\beta =1$ produces the original Schulz matrix iteration, originated in [12].
$$\begin{array}{cc}{X}_{k+1}& ={X}_{k}\left(pI\left(\genfrac{}{}{0pt}{}{p}{2}\right)A{X}_{k}+\cdots +{(1)}^{p1}\left(\genfrac{}{}{0pt}{}{p}{p}\right){\left(A{X}_{k}\right)}^{p1}\right)\\ & ={X}_{k}\phantom{\rule{0.166667em}{0ex}}{\displaystyle \sum _{i=0}^{p1}}{R}_{k}^{i},\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}{R}_{k}=IA{X}_{k}\end{array}$$
Finally, a hybrid algorithm may be written now by incorporating Equations (9) and (16) as follows.
Algorithm 1 The new hybrid method for computing generalized inverses. 

Instead of the hybrid Algorithm 1, based on the usage of Equation (16) in the initial phase and Equation (9) in the final stage, our third result here is to define a unique iterative method, which can be derived by applying variable acceleration parameter $\beta =1+{\beta}_{k}$, $0\le {\beta}_{k}\le 1$. This approach yields scaled hyperpower iterations of the general form:
where the initial approximation ${X}_{0}=\alpha G$ is chosen according to Equation (11).
$${X}_{0}=\alpha G$$
$$\begin{array}{cc}{X}_{k+1}& ={X}_{k}\left({\beta}_{k}I+(1+{\beta}_{k}){\displaystyle \sum _{i=0}^{p1}}{R}_{k}^{i}\right),\phantom{\rule{4pt}{0ex}}0\le {\beta}_{k}\le 1,\phantom{\rule{4pt}{0ex}}k\ge 0\\ & ={X}_{k}\left(I+(1+{\beta}_{k}){\displaystyle \sum _{i=1}^{p1}}{R}_{k}^{i}\right)\end{array}$$
Furthermore, it is possible to propose various modifications of ${\beta}_{k}$ in a manner that guarantees $1+{\beta}_{k}\to 1$. For example:
$${\beta}_{0}=1,\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}{\beta}_{k+1}=\frac{{\beta}_{k}}{2},\phantom{\rule{4pt}{0ex}}k\ge 0$$
3. Balancing Chemical Equations Using Iterations
In accordance with the intention that was motivated in the first section, in this section, we investigate the applicability of some iterations from the hyperpower family in balancing chemical equations. It is shown that the iterative methods can be applied successfully without any limitations.
It is assumed that a chemical system is modeled by a single reaction of the general form (see, for example, [2]):
$$\sum _{j=1}^{r}{x}_{j}\prod _{i=1}^{m}{\Psi}_{{a}_{ij}}^{i}\to \sum _{j=r+1}^{r+s}{x}_{j}\prod _{i=1}^{m}{\Omega}_{{b}_{ij}}^{i}$$
In Equation (20), ${x}_{j},j=1,\dots ,r$ (resp. ${x}_{j},j=r+1,\dots ,r+s$) are unknown rational coefficients of the reactants (resp. the products), ${\Psi}^{i},{\Omega}^{i}$, $i=1,\dots ,m$ are chemical elements in reactants and products, respectively, and ${a}_{ij},i=1,\dots ,m,j=1,\dots ,r$ and ${b}_{ij},i=1,\dots ,m,j=r+1,\dots ,r+s$ are the numbers of atoms ${\Psi}^{i}$ and ${\Omega}^{i}$, respectively, in the jth molecule.
3.1. Balancing Chemical Equations Using Iterative Methods
The coefficients ${x}_{i}$ are integers, rational or real numbers, which should be determined on the basis of three basic principles: (1) the law of conservation of mass; (2) the law of conservation of atoms; (3) the timeindependence of Equation (20), an assumption usually valid for stable/nonsensitive reactions. Let there be m distinct atoms involved in the chemical reaction Equation (20) and $n=r+s$ distinct reactants and products. It is necessary to form an $m\times n$ matrix A, called the reaction matrix, whose columns represent the reactants and products and the rows represent the distinct atoms in the chemical reaction. More precisely, the $(i,j)$th element of A, denoted by ${a}_{i,j}$, represents the number of atoms of type i in each compound/element (reactant or product). An arbitrary element ${a}_{i,j}$ is positive or negative according to whether it corresponds to a reactant or a product. Hence, the balancing chemical equation problem can be formulated as the homogeneous matrix equation:
with respect to the unknown vector $x\in {\mathbb{R}}^{n}$, where $A\in {\mathbb{R}}^{m\times n}$ denotes the reaction matrix and 0 denotes the null column vector of the order m. In this way, an arbitrary chemical reaction can be formulated as a matrix equation.
$$Ax=0$$
We would like to use the symbolic and numerical possibilities of the Mathematica computer algebra system in conjunction with the abovedefined iterative method(s) for computing generalized inverses to automatize the chemical reactions balancing process.
The general solution of the balancing problem in the matrix form Equation (21) is given by:
where c is the arbitrarilyselected ndimensional vector. Let us assume that the approximation of ${A}^{\u2020}$ generated by an arbitrary iterative method is given by $X:={X}_{k+1}$.
$$s=\left(I{A}^{\u2020}A\right)c$$
If the iterative method for computing X is performed in the floating point arithmetic, it is necessary to perform a transition from the solution whose coordinates are real numbers into an exact (integer and/or rational) solution. Thus, the iterative approach in balancing chemical equations assumes three general algorithmic steps, as is described in Algorithm 2.
Algorithm 2 General algorithm for balancing chemical equations by an iterative solver. 

A clear observation about Algorithms 2 is the following:
 
 Steps 1 and 2 require usage of real arithmetic (with very high precision);
 
 Step 3 requires usage of symbolic processing and exact arithmetic capabilities to deal with rational numbers.
As a result, in order to apply iterative methods to the problem of balancing chemical equations, it is necessary to use a software that meets two diametricallyopposite criteria: the ability to carry out numerical calculations (with very high precision) and the ability to apply the exact arithmetic and symbolic calculations. The programming language Mathematica possesses both of these properties. More details about this programming language can be found in [24].
The following (sample) Mathematica code can be used to determine the exact solution using real values contained in the vector s (defined in Equation (22)).
Id = IdentityMatrix[n]; s = (Id  X.A).ConstantArray[1, n];
s = Rationalize[s, 10^(300)]; c = s*LCM @@ Denominator /@ s;
(* Multiply s by the Least Common Multiple of denominators in s *)
s = c/Min @@ Numerator /@ c
(* Divide c by the Minimum of numerators in c *)
The standard Mathematica function Rationalize[x,dx] yields the rational number with the smallest denominator within a given tolerance $dx$ of x. Sometimes, to avoid the influence of roundoff errors and possible errors caused by the usage of the function Rationalize, it is necessary to perform iterative steps with a very high precision.
An improvement of the vector s can be attained as follows. It is possible to propose an amplification of the vector $s=\left(I{A}^{\u2020}A\right)c$, where c is an ndimensional column vector. The improvement can be obtained using $s=\left(I{A}^{\u2020}A\right)\left(\left(I{A}^{\u2020}A\right)c\right)$. In the practical implementation, it is necessary to replace the expression s = (Id  X.A).ConstantArray[1, n] by s = (Id  X.A).((Id  X.A).ConstantArray[1, n]).
This replacement can be explained by the fact that $A(I{A}^{\u2020}A)s$ is closer to the zero vector zero than $As$.
3.2. Balancing Chemical Equations in Symbolic Form
As was explained in [6], balancing ℵ chemical reactions that possess atoms with fractional oxidation numbers and nonunique coefficients is an extremely hard problem in chemistry. The case when the system Equation (21) is not uniquely determined can be resolved using the Mathematica function Reduce. If a ℵ chemical reaction includes n reaction molecules and m reaction elements, then the reaction matrix A is of the order $m\times n$. In the case $n>m$, the reaction has $\left(\genfrac{}{}{0pt}{}{n}{m}\right)$ general solutions. All of them can be found applying the following expression:
where the zero vector in the righthand side is of the length m and $\{xk1,xk2,...,xkm\}$ is the list of dependent variables.
Reduce[A.{{x1}, {x2}, ..., {xn}} == {0, 0,...,0},{xk1, xk2,...,xkm}]
4. Experimental Results
Let us denote the iterations Equation (3) by NM (Newton’s Method), the iterations Equation (4) by CM (Chebyshev’s Method) and Equation (9) by PM (Proposed Method). Here, we apply different methods in the Mathematica 10 environment to compute some generalized inverses and to show the superiority of our scheme(s). We also denote the hybrid algorithm given in [22] by HAL (Householder Algorithm) and our Algorithm 1 is denoted by APM (Accelerated Proposed Method). Throughout the paper the computer characteristics are Microsoft Windows XP Intel(R), Pentium(R) 4 CPU, 3.20 GHz with 4 GB of RAM, unless stated otherwise (as in the end of Example 1).
4.1. Numerical Experiments on RandomlyGenerated Matrices
Example 1. [22] In this numerical experiment, we compute the Moore–Penrose inverse of a dense, randomlygenerated $m\times n=800\times 810$ matrix, which is defined as follows:
m = 800; n = 810; SeedRandom[12345]; A = RandomReal[{10, 10}, {m, n}];
The numerical results corresponding to the number of iterations and the CPU time are illustrated in Table 1, wherein IT denotes the number of iterative steps. It shows that APM with $m=2$ and five inner loops, while $p=2$, is superior to the other existing methods. We employed HAL with $m=2$ and eight inner loops. Note that the initial matrix is chosen as ${X}_{0}=\frac{2}{{\parallel A\parallel}_{F}^{2}}{A}^{*}$, while the stopping criterion is defined by $\frac{\left\right{X}_{k+1}{X}_{k}{\left\right}_{\infty}}{\left\right{X}_{k+1}{\left\right}_{\infty}}<{10}^{300}$. Here, ${\parallel \xb7\parallel}_{F}$ stands for the Frobenius norm (Hilbert–Schmidt norm), which is for an $m\times n$ matrix A defined as:
where ${A}^{*}$ denotes the conjugate transpose of A, ${\sigma}_{i}$ are the singular values of A and the trace function is used.
$${\parallel A\parallel}_{F}=\sqrt{\sum _{i=1}^{m}\sum _{j=1}^{n}{\left{a}_{ij}\right}^{2}}=\sqrt{trace\left({A}^{{}^{*}}A\right)}=\sqrt{\sum _{i=1}^{min\{m,\phantom{\rule{0.166667em}{0ex}}n\}}{\sigma}_{i}^{2}}$$
Table 1.
The results corresponding to the Moore–Penrose inverse of a randomlygenerated matrix. IT, number of iterative steps.
Methods  NM  CM  HAL  APM 

IT  28  18  14  9 
Time  15.7656250  15.0000000  14.0156250  13.4687500 
It is important to emphasize that the computational time is directly initiated by computer and software specifications. To clarify this, we execute our implemented algorithms/methods from Example 1 on a more recentlyfeatured computer, whose characteristics are Windows 7 Ultimate, Intel(R) Core(TM) i54400 CPU 3.10 GHz with 8 GB of RAM and 64 Operating System. The results corresponding to this hardware/software configuration are given in Table 2 in terms of the elapsed CPU time. Furthermore, we reran Example 1 for an $m\times n=1010\times 1000$ matrix, which was randomly generated by the code:
to show that our schemes can also simply be applied on matrices satisfying $m\ge n$. The results generated by these values are arranged in Table 3, where $m=3$ inner loops are considered for APM.
m = 1010; n = 1000; SeedRandom[12345]; A = RandomReal[{10, 10}, {m, n}];
Table 2.
The results corresponding to the Moore–Penrose inverse of randomlygenerated matrices with a better equipped computer.
Methods  NM  CM  HAL  APM 

Time  1.620093  1.570090  1.363078  1.279073 
Table 3.
The results corresponding to the Moore–Penrose inverse of the randomlygenerated matrix ${A}_{1010\times 1000}$.
Methods  NM  CM  HAL  APM 

IT  28  18  14  8 
Time  2.714405  2.605205  2.371204  2.293204 
The numerical example illustrates the theoretical results presented in Section 2. It can be observed from the results included in Table 1, Table 2 and Table 3 that, firstly, like the existing methods, the presented method shows a stable behavior along with a fast convergence. Additionally, according to results contained in Table 1, Table 2 and Table 3, it is clear that the number of iterations required in the APM method during numerical approximations of the Moore–Penrose inverse is smaller than the number of approximations generated by the classical methods. This observation is in accordance with the fact that the efficiency index is clearly the largest in the case of the APM method. In general, APM is superior among all of the existing famous hyperpower iterative schemes. This superiority is in accordance with the theory of efficiency analysis discussed before.
In fact, it can be observed that increasing the efficiency index by a proper factorization of the hyperpower method is a kind of nice strategy that gives promising results in terms of both the number of iterations and the computational time on different computers.
Here, it is also worth noting that Schulztype solvers are the best choice for sparse matrices possessing sparse inverses. Since, in such cases, the usual SVD technique in the software, such as Mathematica or MATLAB, ruins the sparsity pattern and requires much more time, hence such iterative methods and the SVDtype (direct) schemes are both competitive, but have their own fields of applications.
4.2. Numerical Experiments in Balancing Chemical Equations
In this subsection, we present some clear examples indicating the applicability of our approach in the balancing chemical equations. We also apply the following initial matrix ${X}_{0}=\frac{1}{{\sigma}_{1}^{2}}{A}^{*}$.
Example 2. Consider a specific skeletal chemical equation from [10]:
where the lefthand side of the arrow consists of compounds/elements called reactants, while the righthand side comprises compounds/elements called the products. Hence, Equation (24) is formulated as the homogeneous equation $Ax=0$, wherein 0 denotes the null column vector and:
$${x}_{1}{\mathrm{KNO}}_{3}+{x}_{2}\mathrm{C}\to {x}_{3}{\mathrm{K}}_{2}{\mathrm{CO}}_{3}+{x}_{4}\mathrm{CO}+{x}_{5}{\mathrm{N}}_{2}$$
$$A=\left(\begin{array}{ccccc}1\hfill & 0\hfill & 2\hfill & 0\hfill & 0\hfill \\ 1\hfill & 0\hfill & 0\hfill & 0\hfill & 2\hfill \\ 3\hfill & 0\hfill & 3\hfill & 1\hfill & 0\hfill \\ 0\hfill & 1\hfill & 1\hfill & 1\hfill & 0\hfill \end{array}\right)$$
The results generated after the comparison of numerical results derived in Example 2 are given in Table 4, using 300 precision digits, being large enough to minimize roundoff errors, as well as to clearly observe the computed asymptotic error constants in the convergence phase. Although in all practical problems, the machine precision (double precision) is enough (just like Example (1)), here, our focus is to find very accurate coefficients for the chemical equation, since a very accurate tolerance, such as $\parallel {X}_{k}{A}^{\u2020}{\parallel}_{\infty}\le {10}^{150}$, must be incorporated.
The final exact coefficients are defined as ${({x}_{1},{x}_{2},{x}_{3},{x}_{4},{x}_{5})}^{\mathrm{T}}={(2,4,1,3,1)}^{\mathrm{T}}$. Thus,
$$2{\mathrm{KNO}}_{3}+4\mathrm{C}\to {\mathrm{K}}_{2}{\mathrm{CO}}_{3}+3\mathrm{CO}+{\mathrm{N}}_{2}$$
Experimental results clearly show that PM is the most efficient method for this purpose. In addition, we remark that since we use iterative methods in floating point arithmetic to obtain the coefficient, we must use the command $\mathtt{Round}\left[\right]$ in the last lines of our written Mathematica code, so as to attain the coefficients in exact arithmetic.
Table 4.
The results corresponding to balancing Equation (24).
Methods  NM  CM  PM 

IT  14  9  3 
$\parallel {X}_{k+1}{A}^{\u2020}\parallel $  $2.59961\times {10}^{161}$  $1.1697\times {10}^{193}$  $9.09312\times {10}^{293}$ 
In order to support the improvement described in Section 3, it is worth mentioning that (using Mathematica notations):
and $\mathtt{A}.(\mathtt{Id}\mathtt{X}.\mathtt{A})((\mathtt{Id}\mathtt{X}.\mathtt{A}).\mathtt{ConstantArray}[\mathtt{1},\mathtt{n}])=\{\mathtt{0}.*{\mathtt{10}}^{\mathtt{295}},\mathtt{0}.*{\mathtt{10}}^{\mathtt{295}},\mathtt{0}.*{\mathtt{10}}^{\mathtt{295}},\mathtt{0}.*{\mathtt{10}}^{\mathtt{295}}\}.$
$$\mathtt{A}.(\mathtt{Id}\mathtt{X}.\mathtt{A}).\mathtt{ConstantArray}[\mathtt{1},\mathtt{n}]=\{\mathtt{3}.\mathtt{9}*{\mathtt{10}}^{\mathtt{293}},\mathtt{5}.\mathtt{0}*{\mathtt{10}}^{\mathtt{294}},\mathtt{2}.\mathtt{0}*{\mathtt{10}}^{\mathtt{293}},\mathtt{0}.\mathtt{0}*{\mathtt{10}}^{\mathtt{295}}\}$$
Example 3. Now, we solve the following skeletal chemical equation from [10]:
$$\begin{array}{c}\hfill {x}_{1}{\mathrm{H}}_{3}{\mathrm{PO}}_{4}+{x}_{2}{\mathrm{MgSiO}}_{3}+{x}_{3}{\mathrm{CF}}_{2}{\mathrm{Cl}}_{2}+{x}_{4}{\mathrm{NaAlF}}_{4}+{x}_{5}\mathrm{KI}+{x}_{6}{\mathrm{PbCrO}}_{4}+{x}_{7}{\mathrm{FeSO}}_{4}\\ \hfill +{x}_{8}\mathrm{BrCl}+{x}_{9}\mathrm{Ca}{\left(\mathrm{CN}\right)}_{2}+{x}_{10}{\mathrm{SO}}_{2}+{x}_{11}{\mathrm{H}}_{2},\\ \hfill \to {x}_{12}{\mathrm{PI}}_{3}+{x}_{13}{\mathrm{MgCO}}_{3}+{x}_{14}{\mathrm{Na}}_{2}{\mathrm{SiO}}_{3}+{x}_{15}{\mathrm{PbBr}}_{2}\\ \hfill +{x}_{16}{\mathrm{CrCl}}_{3}+{x}_{17}\mathrm{KAl}{\left(\mathrm{OH}\right)}_{4}+{x}_{18}\mathrm{Fe}{\left(\mathrm{SCN}\right)}_{3}+{x}_{19}{\mathrm{CaF}}_{2}+{x}_{20}{\mathrm{H}}_{2}\mathrm{O}\end{array}$$
Equation (27) is formulated as a homogeneous system of linear equations with the following coefficient matrix:
$${A}_{19\times 20}=\left(\begin{array}{cccccccccccccccccccc}3\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 2\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 4\hfill & 0\hfill & 0\hfill & 0\hfill & 2\hfill \\ 1\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 1\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill \\ 4\hfill & 3\hfill & 0\hfill & 0\hfill & 0\hfill & 4\hfill & 4\hfill & 0\hfill & 0\hfill & 2\hfill & 0\hfill & 0\hfill & 3\hfill & 3\hfill & 0\hfill & 0\hfill & 4\hfill & 0\hfill & 0\hfill & 1\hfill \\ 0\hfill & 1\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 1\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill \\ 0\hfill & 1\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 1\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill \\ 0\hfill & 0\hfill & 1\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 2\hfill & 0\hfill & 0\hfill & 0\hfill & 1\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 3\hfill & 0\hfill & 0\hfill \\ 0\hfill & 0\hfill & 2\hfill & 4\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 2\hfill & 0\hfill \\ 0\hfill & 0\hfill & 2\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 1\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 3\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill \\ 0\hfill & 0\hfill & 0\hfill & 1\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 2\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill \\ 0\hfill & 0\hfill & 0\hfill & 1\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 1\hfill & 0\hfill & 0\hfill & 0\hfill \\ 0\hfill & 0\hfill & 0\hfill & 0\hfill & 1\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 1\hfill & 0\hfill & 0\hfill & 0\hfill \\ 0\hfill & 0\hfill & 0\hfill & 0\hfill & 1\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 3\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill \\ 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 1\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 1\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill \\ 0\hfill & 0\hfill & 0\hfill & 0\hfill & 1\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 1\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill \\ 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 1\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 1\hfill & 0\hfill & 0\hfill \\ 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 1\hfill & 0\hfill & 0\hfill & 1\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 3\hfill & 0\hfill & 0\hfill \\ 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 1\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 2\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill \\ 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 1\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 1\hfill & 0\hfill \\ 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 2\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 3\hfill & 0\hfill & 0\hfill \end{array}\right)$$
The results of this experiment generated by using the ordinary double precision arithmetic and the stopping termination $\parallel {X}_{k}{A}^{\u2020}{\parallel}_{\infty}\le {10}^{10}$ are illustrated in Figure 1. Note that the final coefficients obtained in exact arithmetic are equal to ${({x}_{1},\dots ,{x}_{20})}^{\mathrm{T}}={(2,3,3,6,6,6,10,12,15,20,88,2,3,3,6,6,6,10,15,79)}^{\mathrm{T}}$. The results once again show that PM is the best iterative process.
Example 4. Consider the following example from [19]:
$${x}_{1}\mathrm{Mn}{\mathrm{O}}_{4}^{}+{x}_{2}{\mathrm{H}}^{+}+{x}_{3}{\mathrm{Fe}}^{2+}\to {x}_{4}{\mathrm{Mn}}^{2+}+{x}_{5}{\mathrm{H}}_{2}\mathrm{O}+{x}_{6}{\mathrm{Fe}}^{3+}$$
The reaction matrix A can be derived by taking into account both the law of conservation of atoms and the law of electrical neutrality, and it is equal to (see [19]):
$$A=\left(\begin{array}{cccccc}1\hfill & 0\hfill & 0\hfill & 1\hfill & 0\hfill & 0\hfill \\ 4\hfill & 0\hfill & 0\hfill & 0\hfill & 1\hfill & 0\hfill \\ 0\hfill & 1\hfill & 0\hfill & 0\hfill & 2\hfill & 0\hfill \\ 0\hfill & 0\hfill & 1\hfill & 0\hfill & 0\hfill & 1\hfill \\ 1\hfill & 1\hfill & 2\hfill & 2\hfill & 0\hfill & 3\hfill \end{array}\right)$$
As in the previous examples, let us denote by X the result derived by the iterative method Equation (9). The rational approximation of $s=\mathtt{A}.(\mathtt{Id}\mathtt{XA})\left(\right(\mathtt{Id}\mathtt{X}.\mathtt{A}).\mathtt{ConstantArray}[\mathtt{1},\mathtt{n}\left]\right)$ is equal to $\left\{\frac{2}{11},\frac{16}{11},\frac{10}{11},\frac{2}{11},\frac{8}{11},\frac{10}{11}\right\}$, and the exact solution coincides with the result given in [19]: $\{1,8,5,1,4,5\}$.
Example 5. In this example, it is shown that our iterative method is capable of producing the solution in the case when the real coefficients are used and the reaction is not unique within relative proportions. Let us consider Reaction 1 with one arbitrary element from [6]:
$${x}_{1}\mathrm{X}+{x}_{2}{\mathrm{O}}_{2}\to {x}_{3}{\mathrm{X}}_{0.987}\mathrm{O}+{x}_{4}{\mathrm{X}}_{2}{\mathrm{O}}_{3}+{x}_{5}{\mathrm{X}}_{3}{\mathrm{O}}_{4}$$
The reaction matrix of the homogeneous system Equation (21) is given by $A\phantom{\rule{0.166667em}{0ex}}=\phantom{\rule{0.166667em}{0ex}}\left\{\right\{1,0,0.987,2,3\},\{0,2,1,3,4\left\}\right\}$. The iterative method Equation (9) converges quickly, since the list of consecutive errors $\parallel {X}_{k}{A}^{\u2020}{\parallel}_{\infty}$ is given by $\{0.163381,2.220446049250313\times {10}^{16}$, $2.7755575615628914\times {10}^{16}\}.$ The approximate solution $s=\mathtt{A}.(\mathtt{Id}\mathtt{X}.\mathtt{A})\left(\right(\mathtt{Id}\mathtt{X}.\mathtt{A}).\mathtt{ConstantArray}[\mathtt{1},\mathtt{n}\left]\right)$ is equal to:
and its fractional approximation is:
$$s=\{1.40225926604,0.890820221049,0.657559993896,0.35925113635,0.0115817597876\}$$
$$c=\left\{\frac{44517366795613798}{367684821979411},\frac{103259812167103006}{1342504707428259},\frac{67799434016501962}{1194167476431641},\frac{56436772606792756}{1819443496152855},1\right\}.$$
Example 6. All possible solutions of the problem considered in Example 5 with respect to $x1$ and $x2$ can be generated using the Mathematica function Reduce:
Reduce[A.{{x1}, {x2}, {x3}, {x4}, {x5}} == {0, 0}, {x1, x2}
All solutions in the symbolic form are given as follows (using Mathematica notations):
wherein $x3,x4,x5$ are arbitrary real quantities. All possible solutions with respect to $x1$ and $x3$ can be generated using:
$$\mathrm{x}1=\mathtt{0}.\mathtt{987}\mathrm{x}3+\mathtt{2}.\mathtt{0}\mathrm{x}4+\mathtt{3}.\mathtt{0}\mathrm{x}5+\mathtt{0}.\mathtt{0}\wedge \mathrm{x}2=\mathtt{0}.\mathtt{5}\mathrm{x}3+\mathtt{1}.\mathtt{5}\mathrm{x}4+\mathtt{2}.\mathtt{0}\mathrm{x}5+\mathtt{0}$$
Reduce[A.{{x1}, {x2}, {x3}, {x4}, {x5}} == {0, 0}, {x1, x3}]
All possible $\left(\genfrac{}{}{0pt}{}{5}{2}\right)=10$ cases can be solved in the same way.
Example 7. As the last experiment and to show that the proposed iteration could preserve the sparsity pattern of the inverses if the inverses are sparse in nature, the following $4000\times 4000$ matrix $\mathtt{A}=\mathtt{ExampleData}\left[\u201c\mathtt{Matrix}\u201d,\u201c\mathtt{Bai}/\mathtt{tols}\mathtt{4000}\u201d\right]$ has been taken from Matrix Market database with the stopping termination $\frac{\parallel {X}_{k+1}{X}_{k}{\parallel}_{\infty}}{\parallel {X}_{k+1}{\parallel}_{\infty}}\le {10}^{10}$. The new scheme Equation (9) converges in twelve iterations. The matrix plots of the approximate inverse for this case are brought forward in Figure 2.
Figure 2.
The sparsity pattern for the approximate inverses: ${X}_{1}$ (top left); ${X}_{2}$ (top right); ${X}_{11}$ (bottom left); and ${X}_{12}$ (bottom right).
5. Conclusions
In this paper, we have developed a matrix iterative method for computing generalized inverses. The derived scheme has been constructed based on the hyperpower iteration. We have shown that this scheme achieves the order of convergence equal to 31 by using only nine mmm, which hits a very high computational efficiency index.
We also provided further schemes by extending some of the known results so as to accelerate the initial phase of convergence. Furthermore, we applied our iterative schemes to balancing chemical equations as an important applicationoriented area. The derived numerical results clearly upheld our theoretical findings to a great extent.
Further discussions and generalizations can be considered for future works to provide much more robust, reliable and fast hybrid algorithms for computing generalized inverses with potential applications, for example as in [25].
Acknowledgments
The research of the first author (Farahnaz Soleimani) is financially supported by Roudehen Branch, Islamic Azad University, Roudehen, Iran. Furthermore, the second author (Predrag S. Stanimirović) gratefully acknowledges support from the Research Project 174013 of the Serbian Ministry of Science. Interested readers may contact the corresponding author to obtain the Mathematica programs used in the paper.
Author Contributions
The contributions of all of the authors have been similar. All of them have worked together to develop the present manuscript.
Conflicts of Interest
The authors declare no conflict of interest.
References
 Phillips, J.C. Algebraic constructs for the graphical and computational solution to balancing chemical equations. Comput. Chem. 1998, 22, 295–308. [Google Scholar] [CrossRef]
 Risteski, I.B. A new generalized matrix inverse method for balancing chemical equations and their stability. Bol. Soc. Qum. Mex. 2008, 2, 104–115. [Google Scholar]
 Risteski, I.B. A new pseudoinverse matrix method for balancing chemical equations and their stability. J. Korean Chem. Soc. 2008, 52, 223–238. [Google Scholar]
 Krishnamurthy, E.V. Generalized matrix inverse approach for automatic balancing of chemical equations. Int. J. Math. Educ. Sci. Technol. 1978, 9, 323–328. [Google Scholar] [CrossRef]
 Mahadeva, R.T.; Subramanian, K.; Krishnamurthy, E.V. Residue arithmetic algorithms for exact computation of ginverses of matrices. SIAM J. Numer. Anal. 1976, 13, 155–171. [Google Scholar]
 Risteski, I.B. A new generalized algebra for the balancing of ℵ chemical reactions. Mater. Technol. 2014, 48, 215–219. [Google Scholar]
 Smith, W.R.; Missen, R.W. Using Mathematica and Maple to obtain chemical equations. J. Chem. Educ. 1997, 74, 1369–1371. [Google Scholar] [CrossRef]
 Xia, Y. A novel iterative method for computing generalized inverse. Neural Comput. 2014, 26, 449–465. [Google Scholar] [CrossRef] [PubMed]
 Higham, N.J. Gaussian elimination. WIREs Comp. Stat. 2011, 332–334, 230–238. [Google Scholar] [CrossRef]
 Sen, S.K.; Agarwal, H.; Sen, S. Chemical equation balancing: An integer programming approach. Math. Comput. Model. 2006, 44, 678–691. [Google Scholar] [CrossRef]
 Balasubramanian, K. Linear variational Diophantine techniques in mass balance of chemical reactions. J. Math. Chem. 2001, 30, 219–225. [Google Scholar] [CrossRef]
 BenIsrael, A. An iterative method for computing the generalized inverse of an arbitrary matrix. Math. Comput. 1965, 19, 452–455. [Google Scholar] [CrossRef]
 Climent, J.J.; Thome, N.; Wei, Y. A geometrical approach on generalized inverses by Neumanntype series. Linear Algebra Appl. 2001, 332–334, 533–540. [Google Scholar] [CrossRef]
 Liu, X.; Jin, H.; Yu, Y. Higherorder convergent iterative method for computing the generalized inverse and its application to Toeplitz matrices. Linear Algebra Appl. 2013, 439, 1635–1650. [Google Scholar] [CrossRef]
 Soleymani, F.; Stanimirovic, P.S.; Haghani, F.K. On hyperpower family of iterations for computing outer inverses possessing high efficiencies. Linear Algebra Appl. 2015, 484, 477–495. [Google Scholar] [CrossRef]
 Schulz, G. Iterative Berechnung der Reziproken matrix. Z. Angew. Math. Mech. 1933, 13, 57–59. [Google Scholar] [CrossRef]
 Soleymani, F.; Salmani, H.; Rasouli, M. Finding the Moore–Penrose inverse by a new matrix iteration. J. Appl. Math. Comput. 2015, 47, 33–48. [Google Scholar] [CrossRef]
 Soleymani, F. An efficient and stable Newtontype iterative method for computing generalized inverse ${A}_{T,S}^{\left(2\right)}$. Numer. Algorithms 2015, 69, 569–578. [Google Scholar] [CrossRef]
 Ramasami, P. A concise description of an old problem: Application of matrices to obtain the balancing coefficients of chemical equations. J. Math. Chem. 2003, 34, 123–129. [Google Scholar] [CrossRef]
 Sharifi, M.; Arab, M.; Khaksar Haghani, F. Finding generalized inverses by a fast and efficient numerical method. J. Comput. Appl. Math. 2015, 279, 187–191. [Google Scholar] [CrossRef]
 Stanimirović, P.S.; Soleymani, F. A class of numerical algorithms for computing outer inverses. J. Comput. Appl. Math. 2014, 263, 236–245. [Google Scholar] [CrossRef]
 Soleimani, F.; Soleymani, F.; Cordero, A.; Torregrosa, J.R. On the extension of Householder’s method for weighted Moore–Penrose inverse. Appl. Math. Comput. 2014, 231, 407–413. [Google Scholar] [CrossRef]
 Petković, M.D.; Stanimirović, P.S. Two improvements of the iterative method for computing Moore–Penrose inverse based on Penrose equations. J. Comput. Appl. Math. 2014, 267, 61–71. [Google Scholar] [CrossRef]
 Wolfram, S. The Mathematica Book, 5th ed.; Wolfram Media: Champaign, IL, USA, 2003. [Google Scholar]
 Soleymani, F.; Sharifi, M.; Karimi Vanani, S.; Khaksar Haghani, F. An inversionfree method for finding positive definite solution of a rational matrix equation. Sci. World J. 2014, 2014, 560931. [Google Scholar] [CrossRef] [PubMed]
© 2015 by the authors; licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution license (http://creativecommons.org/licenses/by/4.0/).