connectivity matrix
How many steps does it take to go between two vertices? And how many paths can you take to go between them in a certain number of steps?
Raise the connectivity matrix to a chosen power and read the answer in the matrix. You can examine and check the answer in the 3d view.