A graph is a finite set of objects called nodes together wit
Solution
Answer for Question1.
The (6,3) entry of A2 indicated that there are two paths of length two from node 6 to node 3. The expression for (6,3) justifies this as follows.
i.e., a61a13 + a62a23 + a63a33 + a64a43 + a65a53 + a66a63
= (0)(0) + (1)(1) + (0)(0) + (1)(1) + (1)(0) + (0)(0) = 2.
Here, {a61a13 , a63a33 , a66a63 } = (0)(0) means there is no path (intermediate node 1, 3, 6 respectively) from node 6 to node 3.
Here, a62a23 = (1)(1) means there is a path from node 6 to node 2 and node 2 to node 3.
Here, a64a43 = (1)(1) means there is a path from node 6 to node 4 and node 4 to node 3.
Here, a65a53 = (1)(0) means there is a path from node 6 to node 5 and but no path from node 5 to node 3.
Answer for Question2.
The adjacency matrix A is as follows.
The A2 matrix can be calculated by multiplying matrix A with matrix A. The A2 matrix is as follows in the table.
In this A2 matrix, the value of each field represents the number of path in between a pair of nodes with one intermediate node.
The A3 matrix can be calculated by multiplying matrix A with matrix A2. The resulted A3 matrix is as follows in the table.
In this A3 matrix, the value of each field represents the number of path in between a pair of nodes with two intermediate nodes.
| 0 | 1 | 0 | 0 | 0 | 0 |
| 1 | 0 | 1 | 0 | 0 | 1 |
| 0 | 1 | 0 | 1 | 0 | 0 |
| 0 | 0 | 1 | 0 | 1 | 1 |
| 0 | 0 | 0 | 1 | 0 | 1 |
| 0 | 1 | 0 | 1 | 1 | 0 |