Math 455  •  27 April 2009

Alternate solution of Set 7 #3:
use the adjacency matrix A of (Subscript[K, 3,3])

Copyright © 2009 by Murray Eisenberg.  All rights reserved.

Needs["Combinatorica`"]

a = ToAdjacencyMatrix[CompleteGraph[3,3]]; a//MatrixForm

{MatrixPower[a,2]//MatrixForm,MatrixPower[a,4]//MatrixForm}

In row 1, column 4 of the matrix powers (A^2) and (A^4)there is a 0; this means there are 0 walks of length 2 from vertex 1 to  vertex 4.

MatrixPower[a,3]//MatrixForm

In row 1, column 4 of the matrix power (A^3) there is a 9; this means there are 9 walks of length 3 from vertex 1 to  vertex 4.

MatrixPower[a,5]//MatrixForm

In row 1, column 4 of the matrix power (A^5) there is an 81; this means there are 81 walks of length 3 from vertex 1  to vertex 4.