Adjacency Matrix and Shortest Path MATH2031501A02
Part I:
Construct a graph based on the adjacency matrix that appears below. Label all nodes with indices consistent with the placement of numbers within the matrix.
⌈0 6 0 5 0⌉
| 6 0 1 0 3 |
| 0 1 0 4 8 |
| 5 0 4 0 0 |
⌊0 3 8 0 0⌋
This graph is an undirected graph, it features five nodes and six edges.
This graph is undirected because of the symmetry of the adjacency matrix about its main diagonal.
Path between node I to node J has the same length either way, therefore the edges are shown being undirected edges.
The length of the path between node I and J corresponds with the value in the ith row and jth column of the adjacency matrix.
This graph is not connected since the graph contains cycles.
There are four simple paths between vertex 1 and vertex 5.
The shortest path is 1 → 2 → 5.
Part II: Since there is one simple path between any pair of nodes the graph is a tree. The root node of the tree is the president. The number of leaves in the tree would be equal to 4 more than the number of faculty members.
The tree is not a binary tree because some nodes have more than two children. If a direct link between the college president and the head of alumni relations is added to the graph, then it would not be a tree because the graph would contain a cycle for the president, vice president and the head of alumni relations.