Cartwright, Dorwin; Gleason, Terry C. - 1966
An algorithm is presented for constructing from the adjacency matrix of a digraph the matrix of its simple n -sequences. In this matrix, the i, j entry, i ≠ j , gives the number of paths of length n from a point v i to a point v j ; the diagonal entry i, i gives the number of cycles of length...