<< maxpluspwrbig MaxPlusAndPetrinet maxplussprand >>

MaxPlusAndPetrinet >> MaxPlusAndPetrinet > maxplusscg

maxplusscg

Max-plus algebra strongly connected graph

Calling Sequence

[s] = maxplusscg(A)

Parameters

A
: square input matrix
s
: boolean output, that is %T or %F

Description

This function used to check whether graph G(A) is strongly connected. This function returns %T if the graph G(A) is strongly connected and %F if graph G(A) is not strongly connected. The matrix A must be a square matrix.

Examples

A = sprand(5,5,0.3);
k = find(A == 0);
A(k) = -%inf;
A = round(10*A);
A = full(A)
sA = maxplusscg(A)

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.];
sB = maxplusscg(B)
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];
sC = maxplusscg(C)

Author

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

See Also


Report an issue
<< maxpluspwrbig MaxPlusAndPetrinet maxplussprand >>