§ Number of paths in a DAG


Given the adjacency matrix AA of a DAG, this must be nilpotent. This is because Ak[i][j]A^k[i][j] will tell us the number of paths from ii to jj with kk edges in the path. In a DAG, since there are no cycles, there is an upper bound on the number of edges a path can have: the longest path is V1|V| - 1, when the DAG is a straight line. Thus, we must have that AV=0A^|V| = 0.