Power of adjacency matrix

660 Views Asked by At

What does ij element of the k-th power of adjacency matrix for a directed graph, i.e. A^k represent: number of paths with exact k length or number of paths with length k or less than k from i to j?

2

There are 2 best solutions below

0
On BEST ANSWER

The issue here is the precise meaning of "path".

The standard definition (to the extent that there is a 'standard' one) is that a walk is any alternating sequence of vertices and edges, consecutive elements of which are incident, that begins and ends with a vertex. With that definition:

The number of walks of length $k$ between nodes $i$ and $j$ in a graph is precisely given by the $i,j$ element of $A^k$.

The standard definition of path is that it is a walk without repeated vertices. That was the definition used in the post to which you refer. With this definition of path, having a non-zero $i,j$ element means that you can get from $i$ to $j$ in $k$ steps but you may have repeated a vertex. In that case you know that there is a path from $i$ to $j$ (by shortening the walk of length $k$) but that it's length is less than $k$.

1
On

''number of paths with exact k length or number of paths with length k or less than k from i to j?''

Number of paths of length $k$ between nodes $i$ and $j$ in a graph given by its adjacency matrix.