Quantcast
Channel: User Rodrigo de Azevedo - MathOverflow
Viewing all articles
Browse latest Browse all 198

Answer by Rodrigo de Azevedo for Large power of an adjacency matrix

$
0
0

Since the adjacency matrix $\mathrm A$ is not symmetric, we have a directed graph.

enter image description here

Given a positive integer $k$, the $(i,j)$-th entry of $\mathrm A^k$ gives us the number of directed walks of length $k$ from $i$ to $j$. Given the cycle $1 \to 2 \to 3 \to 1$, the entry $(\mathrm A^k)_{11}$ should be $1$ when $k$ is a multiple of $3$ and $0$ when $k$ is not a multiple of $3$. Using SymPy, we can verify this:

>>> A = Matrix([[0,1,0,0,0],                [0,0,1,0,0],                [1,0,0,1,1],                [0,0,0,0,0],                [0,0,0,0,0]])>>> A**2[0  0  1  0  0][             ][1  0  0  1  1][             ][0  1  0  0  0][             ][0  0  0  0  0][             ][0  0  0  0  0]>>> A**3[1  0  0  1  1][             ][0  1  0  0  0][             ][0  0  1  0  0][             ][0  0  0  0  0][             ][0  0  0  0  0]>>> A**4[0  1  0  0  0][             ][0  0  1  0  0][             ][1  0  0  1  1][             ][0  0  0  0  0][             ][0  0  0  0  0]>>> A**5[0  0  1  0  0][             ][1  0  0  1  1][             ][0  1  0  0  0][             ][0  0  0  0  0][             ][0  0  0  0  0]>>> A**6[1  0  0  1  1][             ][0  1  0  0  0][             ][0  0  1  0  0][             ][0  0  0  0  0][             ][0  0  0  0  0]

Note that $9999$ is a multiple of $3$, whereas $33334$ is not.


Viewing all articles
Browse latest Browse all 198

Trending Articles