<< maxplusaplus Min-Max-Plus And Petrinet maxplusctv >>

Min-Max-Plus And Petrinet >> Min-Max-Plus And Petrinet > maxplusccir

maxplusccir

Max-plus algebra critical circuit

Calling Sequence

[l,d,x] = maxplusccir(A)

Parameters

A
: square input matrix
l

: a scalar denotes maximum cycle mean

d

: a constan denotes the length of critical circuit

x

: output a matrix that the rows of this one denotes critical circuits

Description

The function only valid for a square matrix A with at least one finite entry per row, and returns an eigenvalue of A, critical circuits of A and the lengh of critical circuits of A.

Examples

A  = [2. -%inf 8. 2. 9.;
      6. -%inf -%inf 8. 8.;
      8. -%inf 6. 1. 5.;
      0. 2. 5. 3. 10.;
      7. 4. -%inf -%inf 6.] 
[l,d,x] = maxplusccir(A)
// critical circuits of matrix A
//  3 -> 1 -> 3
// Check the vector x is a critical circuit of graph G(A)
z = maxplusisccir(x,A,l)
B= [12. -%inf -%inf  19. 13.  5.  15. -%inf -%inf -%inf;   
     11.  10.   16.    9. -%inf  13.  6.  8.  5. 18.;  
     -%inf  8. -%inf -%inf  19. -%inf  8. -%inf  4. -%inf;   
     17. -%inf  16. -%inf  -%inf  5. -%inf 17. 16. 19.;  
     -%inf -%inf 4. -%inf  8. -%inf  20. -%inf  16. 14.;  
     6.  2. 7. -%inf -%inf -%inf -%inf -%inf 10. 19.;  
     -%inf 1. -%inf -%inf 9. -%inf 14. 5. -%inf 1.;   
     19. -%inf 9. 19. 4. 20. 18. 10. 16. 11.;  
     5. -%inf 13. 15. -%inf -%inf -%inf 20. 3. -%inf;   
     18.  15. -%inf -%inf 7. -%inf 13. 9. 15. 6.];
[l,d,x] = maxplusccir(B)
// critical circuits of matrix A
//  1 -> 10 -> 4 -> 1
// Check the vector x is a critical circuit of graph G(B)
z = maxplusisccir(x,B,l)

e=-%inf;
C=[e e 16 e e e e e e e;   
     14 15 18 e e e e e e e;  
     14 2 e 1 e e e e e e;   
     17 3 e 12 2 e 3 e e e;  
     12 e e 1 e e e e e e;  
     e e e e e 8 e e e e;  
     e e e e e e 7 19 e e;   
     e e e e e e e e 2 e;  
     e e e e e e e 13 e e;   
     e e e e e 10 7 12 2 5];
[l,d,x] = maxplusccir(C)
// critical circuits of matrix A
//  6->6, 1 -> 3 -> 1, 8 -> 9 -> 8
// Check the vector x is a critical circuit of graph G(C)
z = maxplusisccir(x,C,l)

Author

"Max-Plus Algebra And Petrinet Toolbox", ver. 1.1.0, February, 2013.

See Also


Report an issue
<< maxplusaplus Min-Max-Plus And Petrinet maxplusctv >>