Max-plus algebra alternating linear solution to A⊗x=B⊗y.
[x,y,x0,r] = maxplusaltlinsol(A,B)
Function returns a non unique solution x and y to equation A⊗x=B⊗y,
a random initial x0 and the number of iterating r.
If there exists solution then r is finite and no solution; function returns r=1000, x=[], y=[]. For detailed, see : Cunninghame-Green, R.A., Butkovic, P.. (2003), "The equation A⊗x=B⊗y over (max,+)" , Theoretical Computer Science, vol.293, 3-12.
A=[3 -%inf 0;1 1 0;-%inf 1 2]; B=[1 1;3 2;3 1]; [x,y,x0,r]=maxplusaltlinsol(A,B) // Check that x and y solutions to A⊗x=B⊗y maxplusotimes(A,x)==maxplusotimes(B,y) // Another solutions of x and y to A⊗x=B⊗y [x,y,x0,r]=maxplusaltlinsol(A,B) // Check that x and y solutions to A⊗x=B⊗y maxplusotimes(A,x)==maxplusotimes(B,y) | ![]() | ![]() |