## Cycle Finding Software## M. Victor Wickerhauser |

I used a logical arithmetic method to find the maximal cycles in zero-one matrices. Denote the original 0,1-matrix by M. The eventual connection matrix C derived from M has a `1' at row i, column j if some power of M is nonzero at row i, column j. That `1' means that there is a directed path from vertex j to vertex i. cycles.c is a short computer program to compute C from an ASCII file containing M in machine-readable text form. The eventual connection matrix finds maximal cycles; the eigenvector of the largest eigenvalue of C has a 1 at every vertex that is part of the maximal cycle, and the eigenvalue is the number of vertices in that maximal cycle. One can use MatLab to compute the eigenvalues and eigenvectors.

- Sources to compute cycles in flow matrices.
- Example matrices M1, M2, and M3 in a form suitable for the above program.
- Example outputs C1, C2, and C3 including connectivity matrices and eigenvectors showing longest cycles.

Questions? Return to M. Victor Wickerhauser's home page for contact information.