On the Maximal Solution of A Linear System over Tropical Semirings
Sedighe Jamshidvand, Shaban Ghalandarzadeh, Amirhossein Amiraslani, Fateme Olia
aa r X i v : . [ m a t h . A C ] J un On the Maximal Solution of A Linear System overTropical Semirings
Sedighe Jamshidvand a , Shaban Ghalandarzadeh a , Amirhossein Amiraslani b, a , Fateme Olia a a Faculty of Mathematics, K. N. Toosi University of Technology, Tehran, Iran b STEM Department, The University of Hawaii-Maui College, Kahului, Hawaii, USA
June 26, 2019
Abstract
In this paper, we present methods for solving a system of linear equations, AX = b , overtropical semirings. To this end, if possible, we first reduce the order of the system through somerow-column analysis, and obtain a new system with fewer equations and variables. We thenuse the pseudo-inverse of the system matrix to solve the system if solutions exist. Moreover, wepropose a new version of Cramer’s rule to determine the maximal solution of the system. Mapleprocedures for computing the pseudo-inverse are included as well. key words : Tropical semiring; System of linear equations; Cramer’s rule; Pseudo-inverse AMS Subject Classification:
Solving systems of linear equations is an important aspect of linear algebra. Considering solutiontechniques for systems of linear equations over rings and, as a special case, over fields, we intendto develop systematic methods to understand the behavior of linear systems and extend some well-known results over rings to tropical semirings. Systems of linear equations over tropical semiringsfind applications in various areas of engineering, computer science, optimization theory, controltheory, etc (see [1], [2], [4], [5], [6] ).Semirings are algebraic structures similar to rings, but subtraction and division can not necessar-ily be defined for them. The notion of a semiring was first introduced by Vandiver [12] in 1934.A semiring ( S, + , ., ,
1) is an algebraic structure in which ( S, +) is a commutative monoid with anidentity element 0 and ( S, . ) is a monoid with an identity element 1, connected by ring-like distribu-tivity. The additive identity 0 is multiplicatively absorbing, and 0 = 1. Note that for convenience,we mainly consider S = ( R ∪ {−∞} , max, + , −∞ , − plus algebra”, in this work. Other examples of tropical semirings, which are isomorphic to“max − plus algebra”, are “max − times algebra”, “min − times algebra ”and “min − plus algebra”.Suppose S is a tropical semiring. We want to solve the system of linear equations AX = b , where A ∈ M n ( S ) , b ∈ S n and X is an unknown vector. Sometimes, we can reduce the order of the system1o obtain a new system with fewer equations, which is called a reduced system. Furthermore, we findnecessary and sufficient conditions based on the “pseudo-inverse”, A − , of matrix A with determinant det ε ( A ) ∈ U ( S ) to solve the system, where U ( S ) is the set of the unit elements of S . This methodis not limited to square matrices, and can be extended to arbitrary matrices of size m × n as well.To this end, we must consider a square system of size min { m, n } corresponding to the non-squaresystem.Cramer’s rule is one of the most useful methods for solving a linear system of equations over ringsand fields. As an extension of this method, we will establish a new version of Cramer’s rule to obtainthe “maximal” solution of a system of linear equations over tropical semirings. In [7], Cramer’s ruleover max-plus algebra has been fairly exhaustively studied. In this work, we propose an approachthat is more aligned with Cramer’s rule in classic linear algebra. We derive clear cut conditionsbased on the entries of AA − on when the method is applicable and yields a solution. Additionally,the solution that is found here is guaranteed to be the maximal solution of the system.Through row-column analysis, we can remove linearly dependent rows and columns of the systemmatrix. As such, the reduced system is obtained with fewer equations and unknowns and it is provedthat the existence of solutions of the primary system and the corresponding reduced system dependon each other; see Section 3 for more details.In Section 4, assuming that det ε ( A ) ∈ U ( S ), we focus on methods for solving the square system AX = b . Finding necessary and sufficient conditions on the entries of matrix AA − , we obtain themaximal solution X ∗ of the system AX = b using two methods: by computing the pseudo-inverseof A , as A − b , and without computing the pseudo-inverse of A through Cramer’s rule. Additionally,for solving the non-square system AX = b , we construct a corresponding square system. If there arefewer equations than unknowns, then the solvability of the corresponding square system implies thatthe system AX = b should be solvable, too. If, however, there are more equations than unknowns,we can establish a square system simply by multiplying the transpose of the matrix A from left bythe non-square system AX = b . Note that in this case, the solution of the square system can notnecessarily be a solution of the system AX = b , unless it satisfies some conditions with regards tothe eigenvalues and eigenvectors of the associated square matrix.In the appendix of this paper, we give some Maple procedures as follows. Table 1 is a subroutinefor finding the determinant of a square matrix. Table 2 gives a code for calculating matrix mul-tiplications. Table 3 consists of a program for finding the pseudo-inverse of a square matrix andcomputing the multiplication of the matrix by its pseudo-inverse. These procedures are all writtenfor max-plus algebra. In this section, we give some definitions and preliminaries. For convenience, we use N and n todenote the set of all positive integers and the set { , , · · · , n } for n ∈ N , respectively. Definition 1.
A semiring ( S, + , ., , is an algebraic system consisting of a nonempty set S withtwo binary operations, addition and multiplication, such that the following conditions hold:1. ( S, +) is a commutative monoid with identity element ; . ( S, · ) is a monoid with identity element ;3. Multiplication distributes over addition from either side, that is a ( b + c ) = ab + ac and ( b + c ) a = ba + ca for all a, b ∈ S ;4. The neutral element of S is an absorbing element, that is a · · a for all a ∈ S ;5. = 0 .A semiring is called commutative if a · b = b · a for all a, b ∈ S . Definition 2.
A commutative semiring ( S, + , ., , is called a semifield if every nonzero elementof S is multiplicatively invetrible. In this work our main focus is on tropical semiring ( R ∪{−∞} , max , + , −∞ , R max , + ,that is called “max − plus algebra” whose additive and multiplicative identities are −∞ and 0,respectively. Moreover, the notation a − b in “max − plus algebra” is equivalent to a + ( − b ), where“ − ” , “ + ” and − b denote the usual real numbers subtraction, addition and the typical additivelyinverse of the element b , respectively. Note further that “max − plus algebra” is a commutativesemifield. Definition 3. (See [2]) Let S be a semiring. A left S -semimodule is a commutative monoid ( M , +) with identity element M for which we have a scalar multiplication function S × M −→ M , denotedby ( s, m ) sm , which satisfies the following conditions for all s, s ′ ∈ S and m, m ′ ∈ M :1. ( ss ′ ) m = s ( s ′ m ) ;2. s ( m + m ′ ) = sm + sm ′ ;3. ( s + s ′ ) m = sm + s ′ m ;4. S m = m ;5. s M = 0 M = 0 S m . Right semimodules over S are defined in an analogous manner. Definition 4.
A nonempty subset N of a left S -semimodule M is a subsemimodule of M if N isclosed under addition and scalar multiplication. Note that this implies M ∈ N . Subsemimodules ofright semimodules are defined analogously. Definition 5.
Let M be a left S -semimodule and {N i | i ∈ Ω } be a family of subsemimodules of M .Then \ i ∈ Ω N i is a subsemimodule of M which, indeed, is the largest subsemimodule of M contained ineach of the N i . In particular, if A is a subset of a left S -semimodule M , then the intersection of allsubsemimodules of M containing A is a subsemimodule of M , called the subsemimodule generatedby A . This subsemimodule is denoted by S A = Span ( A ) = { n X i =1 s i α i | s i ∈ S, α i ∈ A , i ∈ n, n ∈ N } . f A generates all of the semimodule M , then A is a set of generators for M . Any set of generatorsfor M contains a minimal set of generators. A left S -semimodule having a finite set of generatorsis finitely generated. Note that the expression n X i =1 s i α i is a linear combination of the elements of A . Definition 6. (See [10]) Let M be a left S -semimodule. A nonempty subset, A , of M is calledlinearly independent if α / ∈ Span ( A \ { α } ) for any α ∈ A . If A is not linearly independent, then itis called linearly dependent. Definition 7.
The rank of a left S -semimodule M is the smallest n for which there exists a set ofgenerators of M with cardinality n . It is clear that rank ( M ) exists for any finitely generated left S -semimodule M .This rank need not be the same as the cardinality of a minimal set of generators for M , as thefollowing example shows. Example 1.
Let S be a semiring and R = S × S be the Cartesian product of two copies of S . Then { (1 S , S ) } and { (1 S , S ) , (0 S , S ) } are both minimal sets of generators for R , considered as a leftsemimodule over itself with componentwise addition and multiplication. Hence, rank ( R ) = 1 . Let S be a commutative semiring. We denote the set of all m × n matrices over S by M m × n ( S ). For A ∈ M m × n ( S ), we denote by a ij and A T the ( i, j )-entry of A and the transpose of A , respectively.For any A, B ∈ M m × n ( S ), C ∈ M n × l ( S ) and λ ∈ S , we define: A + B = ( a ij + b ij ) m × n ,AC = ( n X k =1 a ik b kj ) m × l , and λA = ( λa ij ) m × n . Clearly, M m × n ( S ) equipped with matrix addition and matrix scalar multiplication is a left S -semimodule. It is easy to verify that M n ( S ) := M n × n ( S ) forms a semiring with respect to thematrix addition and the matrix multiplication.The above matrix operations over max − plus algebra can be considered as follows. A + B = (max( a ij , b ij )) m × n ,AC = ( n max k =1 ( a ik + b kj )) m × l , and λA = ( λ + a ij ) m × n . For convenience, we can denote the scalar multiplication λA by λ + A . Moreover, max − plus algebrais a commutative semiring which implies λ + A = A + λ . Definition 8.
Let
A, B ∈ M n ( S ) such that A = ( a ij ) and B = ( b ij ) . We say A ≤ B if and only if a ij ≤ b ij for every i ∈ m and j ∈ n . Let A ∈ M n ( S ), S n be the symmetric group of degree n ≥ A n be the alternating group on n such that 4 n = { σ | σ ∈ S n and σ is an even permutation } .The positive determinant, | A | + , and negative determinant, | A | − , of A are | A | + = X σ ∈A n n Y i =1 a iσ ( i ) , and | A | − = X σ ∈S n \A n n Y i =1 a iσ ( i ) . Clearly, if S is a commutative ring, then | A | = | A | + − | A | − . Definition 9.
Let S be a semiring. A bijection ε on S is called an ε -function of S if ε ( ε ( a )) = a , ε ( a + b ) = ε ( a ) + ε ( b ) , and ε ( ab ) = ε ( a ) b = aε ( b ) for all a, b ∈ S . Consequently, ε ( a ) ε ( b ) = ab and ε (0) = 0 .The identity mapping: a a is an ε -function of S that is called the identity ε -function. Remark 1.
Any semiring S has at least one ε -function since the identical mapping of S is an ε -function of S . If S is a ring, then the mapping : a
7→ − a , ( a ∈ S ) is an ε -function of S . Definition 10.
Let S be a commutative semiring with an ε -function, ε , and A ∈ M n ( S ) . The ε -determinant of A , denoted by det ε ( A ) , is defined by det ε ( A ) = X σ ∈S n ε τ ( σ ) ( a σ (1) a σ (2) · · · a nσ ( n ) ) where τ ( σ ) is the number of the inversions of the permutation σ , and ε ( k ) is defined by ε (0) ( a ) = a and ε ( k ) ( a ) = ε k − ( ε ( a )) for all positive integers k . Since ε (2) ( a ) = a , det ǫ ( A ) can be rewritten inthe form of det ǫ ( A ) = | A | + + ε ( | A | − ) .In particular, for S = R max , + with the identity ε -function, we have det ε ( A ) = max( | A | + , | A | − ) . Definition 11.
Let S be a commutative semiring with ε -function, ε , and A ∈ M n ( S ) . The ε -adjointmatrix A , written as adj ε ( A ) , is defined as follows. adj ε ( A ) = (( ε ( i + j ) det ε ( A ( i | j ))) n × n ) T ,where A ( i | j ) denotes the ( n − × ( n − submatrix of A obtained from A by removing the i -th rowand the j -th column. It is clear that if S is a commutative ring, ε is the mapping: a
7→ − a ; ( a ∈ S ) ,and A ∈ M n ( S ) , then adj ε ( A ) = adj ( A ) . heorem 1. (See [9]) Let A ∈ M n ( S ) . We have1. Aadj ε ( A ) = ( det ε ( A r ( i ⇒ j ))) n × n ,2. adj ε ( A ) A = ( det ε ( A c ( i ⇒ j ))) n × n ,where A r ( i ⇒ j ) ( A c ( i ⇒ j ) ) denotes the matrix obtained from A by replacing the j -th row (column)of A by the i -th row (column) of A . Definition 12. (See [13]) Let S be a semiring and A ∈ M m × n ( S ) . The column space of A is thefinitely generated right S -subsemimodule of M m × ( S ) generated by the columns of A : Col ( A ) = { Av | v ∈ M n × ( S ) } . The column rank of A is the rank of its column subsemimodule, which is denoted by colrank ( A ) . Definition 13. (See[13]) Let S be a semiring and A ∈ M m × n ( S ) . The row space of A is the finitelygenerated left S -subsemimodule of M × n ( S ) generated by the rows of A : Row ( A ) = { uA | u ∈ M × m ( S ) } . The row rank of A denoted by rowrank ( A ) is the rank of its row subsemimodule. The next example shows that the column rank and the row rank of a matrix over an arbitrarysemiring are not necessarily equal. If these two value coincide, their common value is called the rankof matrix A . Example 2.
Consider A ∈ M ( S ) where S = R max , + as follows. A = − −
24 1 6 . Clearly, rowrank ( A ) = 3 , but colrank ( A ) = 2 , since the third column of A is a linear combinationof its other columns: C = max( C + 2 , C + ( − . Next, we study and analyze the system of linear equations AX = b where A ∈ M m × n ( S ), b ∈ S m and X is an unknown column vector of size n over tropical semiring S = R max , + , whose i − thequation is max( a i + x , a i + x , · · · , a in + x n ) = b i . Sometimes, we can simplify the solution process of the system, AX = b , by turning that into a linearsystem of equations with fewer equations and variables. Definition 14.
Let A ∈ M m × n ( S ) . A reduced matrix is obtained from matrix A by removing itsdependent rows and columns which we denote by A . Definition 15.
A solution X ∗ of the system AX = b is called maximal if X ≤ X ∗ for any solution X . efinition 16. Let b ∈ S m . Then b is called a regular vector if b i = −∞ for any i ∈ m . Without loss of generality, we can assume that b is regular in the system AX = b . Otherwise, let b i = −∞ for some i ∈ n . Then in the i − th equation of the system, we have a ij + x j = −∞ forany j ∈ n . As such, x j = −∞ if a ij = −∞ . Consequently, the i − th equation can be removed fromthe system together with every column A j where a ij = −∞ , and the corresponding x j can be setto −∞ . Definition 17.
Let A ∈ M n ( S ) , λ ∈ S and x ∈ S n be a regular vector such that Ax = λx. Then λ is called an eigenvalue of A and x an eigenvector of A associated with eigenvalue λ . Notethat this definition allows an eigenvalue to be −∞ . Moreover, eigenvectors are allowed to containelements equal to −∞ . AX = b In this section, we reduce the order of the system AX = b , where A ∈ M m × n ( S ), b ∈ S m and X isan unknown column vector of size n , through a row-column analysis to obtain a new system withfewer equations and variables which is called a reduced system. AX = b Suppose that C , C , · · · , C n are the columns of matrix A . Without loss of generality, we can assumethat C , C , · · · , C k are linearly independent and the other columns are linearly dependent on them. h C C · · · C k C k +1 · · · C n i x x ... x k x k +1 ... x n = b b ... b m . We can rewrite the system as follows.max( C + x , C + x , · · · , C k + x k , C k +1 + x k +1 , · · · , C n + x n ) = b b ... b m . (3.1)7here exist scalars η ij ∈ S for every 1 ≤ i ≤ k and k + 1 ≤ j ≤ n such that C j = max( C + η j , C + η j , · · · , C k + η kj ) . (3.2)By replacing (3 .
2) in (3 .
1) we have:max( C + x , C + x , · · · , C k + x k , max( C + η k +1) , C + η k +1) , · · · , C k + η k ( k +1) ) + x k +1 , · · · , max( C + η n , C + η n , · · · , C k + η kn ) + x n ) = b b ... b m . Due to the distributivity of “ + ” over “ max ”, the following equality is obtained:max[ C + max( x , η k +1) + x k +1 , · · · , η n + x n ) , C + max( x , η k +1) + x k +1 , · · · , η n + x n ) , · · · , C k + max( x k , η k ( k +1) + x k +1 , · · · , η kn + x n )] = b b ... b m . Now, we can rewrite this system asmax( C + y , C + y , · · · , C k + y k ) = b b ... b m , where y i = max( x i , η i ( k +1) + x k +1 , · · · , η in + x n ) , (3.3)for every 1 ≤ i ≤ k . As such, the number of variables decreases from n to k . Next, we showthat the existence of solutions of the system AX = b depends on the row rank of A . Assume that Y ∗ = ( y ∗ i ) ki =1 is the maximal solution of the system: h C C · · · C k i y ∗ y ∗ ... y ∗ k = b b ... b m . Hence, the equalities (3 .
3) imply the system AX = b should have solutions x j ≤ min( y ∗ − η j , y ∗ − η j , · · · , y ∗ k − η kj ) for every k + 1 ≤ j ≤ n and x i = y ∗ i for every 1 ≤ i ≤ k .8 .2 Row analysis of the system AX = b Consider the system AX = b in the form of R R ... R h R h +1 ... R m x x ... x n = b b ... b h b h +1 ... b m , (3.4)where R i is the i -th row of the matrix A , for every 1 ≤ i ≤ m . Without loss of generality, we canassume that R , R , · · · , R h are linearly independent rows of A and the other rows R i , h + 1 ≤ i ≤ m are linear combinations of them. Consequently, there exist scalars ξ ij ∈ S for every 1 ≤ j ≤ h and h + 1 ≤ i ≤ m such that: R i = max( R + ξ i , R + ξ i , · · · , R h + ξ ih ) , (3.5)for every h + 1 ≤ i ≤ m . We can now rewrite the system of equations (3 .
4) as R i x x ... x n = b i , for any 1 ≤ i ≤ m ,which can become the h -equation system: R j x x ... x n = b j , for any 1 ≤ j ≤ h .We now obtain the row-reduced system with h equations.Note that in the process of reducing the system AX = b , it does not matter which of the row orcolumn analysis is first applied to the system.This argument leads us to investigate the existence of solutions of the linear system AX = b . Theorem 2.
Let A ∈ M m × n ( S ) . The system AX = b has solutions if and only if its reduced system, AY = b , has solutions.Proof. Let colrank ( A ) = k and rowrank ( A ) = h . By applying row-column analysis on the system AX = b and replacing (3 .
5) in the m -equation system (3 . i = R i x x ... x n = max( b + ξ i , b + ξ i , · · · , b h + ξ ih ) , (3.6)for every h + 1 ≤ i ≤ m . If the equalities (3 .
6) hold for every h + 1 ≤ i ≤ m , then we can reducethe system AX = b to the system AY = b , where A is the reduced h × k matrix obtained from A , Y is an unknown vector of size k , and b is the reduced vector obtained from b . Thus, the existenceof solution AX = b and AY = b depends on each other. Remark 2.
Note that if b is not a linear combination of any column of A , then the systems AX = b and AY = b have no solutions. In this section, we present methods for solving a linear system of equations.
Definition 18.
Let A ∈ M n ( S ) and det ε ( A ) ∈ U ( S ) . The pseudo-inverse of A , denoted by A − , isdefined as A − = det ε ( A ) − adj ε ( A ) .Especially, if S = R max, + , then A − = ( a − ij ) where a − ij = ( adj ε ( A )) ij − det ε ( A ) . Remark 3.
Let A ∈ M n ( S ) . Then AA − = (( AA − ) ij ) is a square matrix of size n , such that byTheorem 1, ( AA − ) ij = det ε ( A ) − Aadj ε ( A )) ij = det ε ( A ) − det ε ( A r ( i ⇒ j )) . In max-plus algebra, this becomes ( AA − ) ij = ( Aadj ε ( A )) ij − det ε ( A )= det ε ( A r ( i ⇒ j )) − det ε ( A ) . The matrix A − A is defined similarly. Note further that the diagonal entries of the matrices AA − and A − A are : ( AA − ) ii = ( Aadj ε ( A )) ii − det ε ( A )= det ε ( A r ( i ⇒ i )) − det ε ( A )= det ε ( A ) − det ε ( A )= 0 10 heorem 3. Let A ∈ M n ( S ) and b ∈ S n be a regular vector. Then ( AA − ) ij ≤ b i − b j for any i, j ∈ n if and only if the system AX = b has the maximal solution X ∗ = A − b where X ∗ = ( x ∗ i ) ni =1 .Proof. Suppose that ( AA − ) ij ≤ b i − b j for any i, j ∈ n . First, we show that the system AX = b hasthe solution X ∗ = A − b . Clearly, AX ∗ = AA − b , so for any i ∈ n :( AX ∗ ) i = ( AA − b ) i = n max j =1 (( AA − ) ij + b j )= max(( AA − ) ii + b i , max i = j (( AA − ) ij + b j )) . Since for any i, j ∈ n , ( AA − ) ij + b j ≤ b i , and ( AA − ) ii + b i = b i , we have ( AX ∗ ) i = b i . As such, X ∗ is a solution of the system AX = b .Now, we prove X ∗ is a maximal solution. AX ∗ = b , so A − AX ∗ = X ∗ . The k -th equation of thesystem A − AX ∗ = X ∗ is max (( A − A ) k + x ∗ , · · · , x ∗ k , · · · , ( A − A ) kn + x ∗ n ) = x ∗ k , that implies ( A − A ) kl ≤ x ∗ k − x ∗ l . (4.1)for any l = k . Now, suppose that Y = ( y i ) ni =1 is another solution of the system AX = b . This means AY = b , and ( A − A ) Y = X ∗ . Without loss of generality, we can assume there exists only j ∈ n suchthat y j = x ∗ j , i.e., y i = x ∗ i for any i = j . The j -th equation of the A − AY = X ∗ is max (( A − A ) j + x ∗ , · · · , ( A − A ) jj + y j , · · · , ( A − A ) jn + x ∗ n ) = x ∗ j .This means ( A − A ) jj + y j ≤ x ∗ j which implies y j < x ∗ j . Moreover, if all inequalities (4 .
1) for k = j are proper, then max (( A − A ) j + x ∗ , · · · , y j , · · · , ( A − A ) jn + x ∗ n ) < x ∗ j .Hence, Y is not the solution of the system AX = b . That leads to a contradiction.This happens if all inequalities in (4 .
1) are proper, so we can conclude that X ∗ is a unique solutionof the system AX = b . Otherwise, if some of the inequalities are not proper, i.e., ( A − A ) jl = x ∗ j − x ∗ l for some l = j , then Y is a solution of the system AX = b such that Y ≤ X ∗ . Consequently, X ∗ isa maximal solution.Conversely, suppose that X ∗ = A − b is a maximal solution of the system AX = b . Then AA − b = b .That implies ( AA − ) ij ≤ b i − b j for any i, j ∈ n .In the following example, we show that ( AA − ) ij ≤ b i − b j is a sufficient condition for the system AX = b to have the maximal solution X ∗ = A − b .11 xample 3. Let A ∈ M ( S ) . Consider the following system AX = b : − −
54 5 1 − − − − − x x x x = − , where det ε ( A ) = 14 . Due to Theorem 3, we must check the condition ( AA − ) ij ≤ b i − b j forany i, j ∈ { , · · · , } where ( AA − ) ij = ( Aadj ε ( A )) ij − det ε ( A ) = det ε ( A r ( i ⇒ j )) − det ε ( A ) (seeTheorem 1 ). As such, AA − is − − − − − − − − − − . Indeed, it is easier to check ( AA − ) ij ≤ b i − b j ≤ − ( AA − ) ji for any ≤ i ≤ j ≤ .Since these inequalities hold, for instance ( AA − ) ≤ − ≤ − ( AA − ) , the system AX = b hasthe maximal solution X ∗ = A − b : X ∗ = − − − − − − − − − − − − − − − − = − − . The next example shows that the condition of Theorem 3 is necessary.
Example 4.
Let A ∈ M ( S ) . Consider the following system AX = b : − x x x x = . Then the matrix AA − is as follows. AA − = − − − − − − . It can be checked that ( AA − ) ij ≤ b i − b j ≤ − ( AA − ) ji do not hold for i = 2 or j = 2 . Therefore, X ∗ = A − b cannot be the solution of the system AX = b , where X ∗ is X ∗ = − − − − − − − − − − − − − − = − − . If X ∗ is the solution of the system AX = b , then in the second equation of the system we encountera contradiction: max( a + x ∗ , a + x ∗ , a + x ∗ , a + x ∗ ) = 6 = b . .1.1 Extension of the method to non-square linear systems We are interested in studying the solution of a non-square linear system of equations as well. Let A ∈ M m × n ( S ) with m = n , and b ∈ S m be a regular vector. For solving the non-square system AX = b by Theorem 3, we must consider a square linear system of order min { m, n } corresponding toit. Without loss of generality, we can assume A is a reduced matrix, i.e. the number of independentrows(columns) is m(n), respectively. Since m = n , we have the following two cases:1. If m < n , then we consider the square linear system of order m corresponding to the system AX = b . Let X = A T Y where Y is an unknown vector of size m . Then the square linearsystem AA T Y = b is obtained from replacing X in AX = b . Suppose that the conditionsof Theorem 3 hold for the system AA T Y = b , so the system AA T Y = b has the maximalsolution Y ∗ = ( AA T ) − b . If so, the system AX = b has (at least) a solution in the formof X = A T Y ∗ = A T ( AA T ) − b , which is not necessarily maximal. The matrix A T ( AA T ) − ,denoted by A † , is called the semi-psuedo-inverse of matrix A . Hence, the system AX = b hasthe solution X = A † b .2. If n < m , then we consider the square linear system of size n corresponding to the system AX = b . Clearly, we have the square linear system A T AX = A T b of size n . Assume that theconditions of Theorem 3 hold for the system A T AX = A T b . If so, it has the maximal solution X ∗ = ( A T A ) − A T b . Note further that X ∗ = ( A T A ) − A T b is not necessarily the solution of thesystem AX = b unless b is an eigenvector of A ( A T A ) − A T corresponding to the eigenvalue 0,i.e.; AX ∗ = A ( A T A ) − A T b = b .In the next examples, we try to solve some non-square linear systems if possible. Example 5.
Let A ∈ M × ( S ) . Consider the following system AX = b : − − − − − − x x x x x = . Due to the extension method, the non-square system AX = b can be converted into the followingsquare system AA T Y = b , cosidering X = A T Y :
24 20 18 1520 16 14 1018 14 12 915 10 9 16 y y y y = . The conditions of Theorem 3 hold for the system AA T Y = b , that is (( AA T )( AA T ) − ) ij ≤ b i − b j forany i, j ∈ { , · · · , } , where ( AA T )( AA T ) − is the following matrix: − − − − − − − − − . s such, the system AA T Y = b has the maximal solution Y ∗ = ( AA T ) − b : Y ∗ = − − − − − − − − − − − − − − − − = − − − − . Hence, X = A T Y ∗ is a solution of the non-square system AX = b : X = − − − , which is not necessarily maximal solution. Example 6.
Let A ∈ M × ( S ) . Consider the following non-square system AX = b : −
21 4 37 8 10 1 4 x x x = . According to the second case of the extension method , the following square system A T AX = A T b isobtained from the non-square system AX = b :
14 15 815 16 98 9 8 x x x = . Since the conditions (( A T A )( A T A ) − ) ij ≤ ( A T b ) i − ( A T b ) j hold for any i, j ∈ { , , } , where ( A T A )( A T A ) − is the following matrix: − − − − − , by Theorem 3, the system A T AX = A T b has the maximal solution X ∗ = ( A T A ) − A T b : X ∗ = − − − − − − − − − = − − − , while X ∗ is not a solution of the system AX = b : AX ∗ = −
21 4 37 8 10 1 4 − − − = − = b In this manner, we actually solve the nearest square system corresponding to the system AX = b . .2 Extended Cramer’s rule for solving a linear system of equations In classic linear algebra, Cramer’s rule determines the unique solution of a linear system of equations, AX = b , when A is an invertible matrix. Furthermore, Tan shows that an invertible matrix A overa commutative semiring has the inverse A − = det ε ( A ) − adj ε ( A ) (see [11]).In [8], Sararnrakskul proves a square matrix A over a semifield is invertible if and only if everyrow and every column of A contains exactly one nonzero element. Moreover, in [11], Tan developsCramer’s rule for a system AX = b when A is an invertible matrix over a commutative semiring.Consequently, using Cramer’s rule for solving a system of linear equations over semifields and, as aspecial case, over tropical semirings, seems to be limited to matrices containing exactly one nonzeroelement in every row and every column.In the next theorem, we present an extended version of Cramer’s rule to determine the maximalsolution of the system AX = b by using the pseudo inverse of matrix A , where A is an arbitrarysquare matrix. Theorem 4.
Let A ∈ M n ( S ) , b ∈ S n be a regular vector, and det ε ( A ) ∈ U ( S ) . Then the system AX = b has the maximal solution X ∗ = ( d − d , d − d , · · · , d − d n ) T if and only if ( AA − ) ij ≤ b i − b j for every i, j ∈ n , where d = det ε ( A ) and d j = det ε ( A [ j ] ) for j ∈ n and A [ j ] is the matrix formed by replacing the j -th column of A by the column vector b .Proof. By theorem 3, the inequalities ( AA − ) ij ≤ b i − b j for every i, j ∈ n are equivalent to have themaximal solution X ∗ = A − b for the system AX = b , so X ∗ = A − b = det ε ( A ) − adj ε ( A ) b = det ε ( A ) − A · · · A n ... . . . ... A n · · · A nn b ... b n = det ε ( A ) − max( A + b , · · · , A n + b n )...max( A n + b , · · · , A nn + b n ) , where A ij = ( adj ε ( A )) ij = det ε ( A ( j | i )). The j -th component of X ∗ is: x ∗ j = det ε ( A ) − max( A j + b , · · · , A jn + b n )= det ε ( A ) − max( det ε ( A (1 | j )) + b , · · · , det ε ( A ( n | j )) + b n )= det ε ( A ) − det ε ( a · · · a j − b a j +1) · · · a n ... ... ... ... ... a n · · · a n ( j − b n a n ( j +1) · · · a nn ) (4.2)= det ε ( A ) − det ε ( A [ j ] )= d − d j , X ∗ = ( d − d , d − d , · · · , d − d n ) T . Note that the equality (4 .
2) is obtained from Laplace’stheorem for semirings (see Theorem 3.3 in [9]).
Remark 4.
In classic linear algebra, the unique solution of the system AX = b , when det ( A ) = 0 ,can be obtained from Cramer’s rule without calculating the inverse matrix of A . Similarly, in max-plus linear algebra, we can use the extended Cramer’s rule to get the maximal solution of the system AX = b , when ( AA − ) ij ≤ b i − b j for any i, j ∈ n , without computing A − (see Remark 3). Example 7.
Let A ∈ M ( S ) . Consider the following system AX = b : x x x = . Clearly, ( AA − ) ij ≤ b i − b j ≤ − ( AA − ) ji hold for any ≤ i ≤ j ≤ , where AA − is the followingmatrix: − − −
95 6 0
Due to Theorem 4, the system AX = b has the maximal solution X ∗ = ( x ∗ i ) i =1 where: x ∗ = det ε ( ) − det ε ( A ) = 20 −
20 = 0 ,x ∗ = det ε ( ) − det ε ( A ) = 23 −
20 = 3 ,x ∗ = det ε ( ) − det ε ( A ) = 19 −
20 = − . In this paper, we studied the order reduction of systems of linear equations through a row-columnanalysis technique over tropical semirings in order to simplify their solution process. Using thepseduo-inverse of the matrix of a linear system of equations, we also presented necessary and sufficientconditions for the system to have a maximal solution. We obtained this maximal solution througha new version of Cramer’s rule as well.
References [1] L. Aceto, Z. Esik, A. Ingolfsdottir,
Equational theories of tropical semirings.
Theoretical Com-puter Science (2003), 417–469. 162] J. S. Golan,
Semirings and their Applications.
Springer Science Business Media, 2013.[3] M. Gondran, M. Minoux,
Graphs, dioids and semirings new models and algorithms.
SpringerScience Business Media, 2008.[4] N. Krivulin,
Complete algebraic solution of multidimensional optimization problems in tropicalsemifield.
Journal of logical and algebraic methods in programming (2018), 26–40.[5] N. Krivulin, S. Sergeev, Tropical optimization techniques in multi-criteria decision making withAnalytical Hierarchy Process.
In 2017 European Modelling Symposium (EMS) (2017), 38–43.IEEE.[6] W. M. McEneaney,
Max-plus methods for nonlinear control and estimation.
Springer ScienceBusiness Media, 2006.[7] G. J. Olsder, C. Roos,
Cramer and Cayley-Hamilton in the max algebra.
Linear Algebra andits Applications (1988), 87–108.[8] R. I. Sararnrakskul, S. Sombatboriboon, P. Lertwichitsilp,
Invertible Matrices over semifields.
East-West Journal of Mathematics (2010).[9] Y. J. Tan,
Determinants of matrices over semirings.
Linear and Multilinear Algebra (2014), 498–517.[10] Y. J. Tan,
Inner products on semimodules over a commutative semiring.
Linear Algebra andits Applications. (2014), 151–173.[11] Y. J. Tan,
On invertible matrices over commutative semirings.
Linear and Multilinear Algebra (2013), 710–724.[12] H. S. Vandiver,
Note on a simple type of algebra in which the cancellation law of addition doesnot hold.
Bulletin of the American Mathematical Society. (1934), 914–920.[13] D. Wilding,
Linear algebra over semirings. (Doctoral dissertation, The University of Manchester(United Kingdom), 2015. 17 axPlusDet := proc (A::Matrix)local i, j, s, n, detA, ind, K, V;description "This program finds the determinant of a square matrix in max-plus.";Use LinearAlgebra inn := ColumnDimension(A);V := Matrix(n);ind := Vector(n);if n = 1 thenV := A[1, 1];detA := V;ind[1] := 1elif n = 2 thenV[1, 1] := A[1, 1]+ A[2, 2];V[1, 2] := A[1, 2]+ A[2, 1];V[2, 1] := A[1, 2]+ A[2, 1];V[2, 2] := A[1, 1]+ A[2, 2];detA := max(V);for s to 2 doK := V[s, 1 .. 2];ind[s] := max[index](K)end do;elsefor i to n dofor j to n doV[i, j] := A[i, j]+ op(1, MaxPlusDet(A[[1 .. i-1, i+1 .. n], [1 .. j-1, j+1 .. n]]));end do;detA := max(V);K := V[i, 1 .. n];ind[i] := max[index](K);end do;end if;end use:[detA, ind, V]end proc:
Table 1: Finding the determinant of a square matrix in max-plus18 atmul := proc (A::Matrix, B::Matrix)local i, j, m, n, p, q, C, L;description "This program finds the multiplication of two matrices in max-plus.";\\Use LinearAlgebra inm := RowDimension(A);n := ColumnDimension(A);p := RowDimension(B);q := ColumnDimension(B);C := Matrix(m, q);if n <> p thenprint(’impossible’);breakelsefor i to m dofor j to q doL := [seq(A[i, k]+B[k, j], k = 1 .. n)];C[i, j] := max(L)end doend doend if;end use:Cend proc:
Table 2: Calculation of matrix multiplication in max-plus19 inv := proc (A::Matrix)local n, d, H, V, B, C, E, G, Z, i, j;description "This program finds a pseudo-inverse of A in max-plus.";use LinearAlgebra inn := ColumnDimension(A);d := op(1, MaxPlusDet(A));H := Matrix(1 .. n, 1 .. n, d);Z := Matrix(1 .. n, 1 .. n);for i to n dofor j to n doif A[i, j] = (-1)*Float(infinity) thenZ[i, j] := Float(infinity);elseZ[i, j] := A[i, j];end if:end do:end do:V := op(3, MaxPlusDet(A));B := V-H-Z;G := Transpose(B);C := Matmul(A, G);E := Matmul(G, A);end use:G, Cend proc:
Table 3: Calculating the pseduo-inverse, A − , of a square matrix, A , as well as AA −−