Max-plus algebra analysis solution to A⊗x=b.
[D,R,x] = maxplusdesc(A,b)
: an output matrix of size m by- n that is called reduced discrepancy matrix.
: an output matrix of size m by- n that is called discrepancy matrix.
The minimum each column of D is an elements of vector x .
Function returns analysis solutions x to equation A⊗x=b.
If there is a zero-row in matrix R, then there is no solution to the matrice equation
If there are more then one1 in at least one row of matrix R, then the matrice equation have infinite solutions
and if at each column of matrix R has a lone-none (1) , then the solution to the matrice equation is unique.
For detailed, see : Maria H. Andersen. (2002), "MAX-PLUS ALGEBRA: PROPERTIES AND APPLICATIONS" , Thesis of MASTER SCIENCE in MATHEMATICS.
A=[3 -%inf 0;1 1 0;-%inf 1 2]; A b=[2;2;3]; b [D,R,x] = maxplusdesc(A,b) // It is seen that every row of R contains only one element equals 1. // So, x is a unique solution to A⊗x=b. // Check that x a solution to A⊗x=b. maxplusotimes(A,x)==b // We can compute the solution x in min plus algebra sense // that is given by -A'⊗'b isequal(x,minplusotimes(-A',b)) // Another example by given new b b=[1;1;1] // and compute [D,R,x] = maxplusdesc(A,b) // It is seen that every row of R at least contains one element equals 1 // And there are two elements equals 1 in the third row of R // So, A⊗x=b has infinite solution. // Check that x a solution to A⊗x=b. maxplusotimes(A,x)==b // The other solutions are x=[-2;0;c], where c≤-1 // Let x=[-2;0;-5] x=[-2;0;-5] // Check that x the other solution to A⊗x=b. isequal(maxplusotimes(A,x),b) // So its true that A⊗x=b. // Now, take the last b=[3;2;1] b=[3;2;1] [D,R,x] = maxplusdesc(A,b) // It is seen that all elements in the second row of R equals zero. // Therefore, the equation A⊗x=b has no solution isequal(maxplusotimes(A,x),b) // But x satisfies A⊗x≤b maxplusotimes(A,x)<=b | ![]() | ![]() |