Adjacency matrices and graphs
Figure 3: An undirected graph with n = 5 vertices.
For a given undirected graph with no self-loops and at most one edge between any pair of nodes (i.e., a simple graph), as in Figure 3, we associate an n x n matrix A, such that if there is an edge between node i and node j, Aij = 1; otherwise, Aij = 0.
This matrix is called the adjacency matrix of the graph. The graph in Figure 3 has an adjacency matrix.
1. (2 points) Prove the following result: for a positive integer k, the matrix has an interesting interpretation: the entry in the row and column gives the number of walks of length k (i.e., a collection of k edges) leading from vertex i to vertex j. Hint: prove this by induction on k, and look at the matrix-matrix product Ak-1A.