<< intervalmatab Max-Plus Algebra maxplusaplus >>

Max-Plus Algebra >> Max-Plus Algebra > maxplusaltlinsol

maxplusaltlinsol

max-plus algebra alternating linear solution of A⊗x=B⊗y.

Calling Sequence

[x,y,x0,r] = maxplusaltlinsol(A,B)

Parameters

A
: an input matrix of size m by- p.
B
: an input matrix of size p by - n .

Description

Function returns a non unique solution x and y of equation A⊗x=B⊗y,

a random initial x0 and the number of iterating r.

If there exists solutions then r is finite and no solutions; 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.

Examples

A=[3 -%inf 0;1 1 0;-%inf 1 2];
B=[1 1;3 2;3 1];

[x,y,x0,r]=maxplusaltlinsol(A,B)
r  =

   1.  
x0  =

   1.  
   6.  
   7.  
y  =

   4.  
   5.  
x  =

   3.  
   6.  
   5.  
// Check that x and y solutions of A⊗x=B⊗y
maxplusotimes(A,x)==maxplusotimes(B,y)
 ans  =

  T  
  T  
  T 

// Another solutions of x and y of A⊗x=B⊗y
[x,y,x0,r]=maxplusaltlinsol(A,B)
r  =

   1.  
x0  =

   0.  
   5.  
   3.  
y  =

   2.  
   2.  
x  =

   0.  
   4.  
   3.  
// Check that x and y solutions of A⊗x=B⊗y
maxplusotimes(A,x)==maxplusotimes(B,y)
 ans  =

  T  
  T  
  T

Author

"Max-Plus Algebra Toolbox", ver. 1.01, April, 2009.

See Also


<< intervalmatab Max-Plus Algebra maxplusaplus >>