Let be an undirected unweighted connected graph. The diameter of is defined as:
Let be the adjacency matrix of .
Define graph on the same set of vertices with adjacency matrix , where
Which one of the following statements is true?
View worked solution
Answer: A
The adjacency matrix of the graph is defined such that if or (where ).
- means there is a path of length between vertices and in .
- means there is a path of length between vertices and in .
Thus, an edge exists between and in if and only if the shortest path distance between them in is at most .
Let and denote the shortest path distances between any two vertices and in and , respectively. If , we can traverse this path in by taking leaps of distance at each step. This requires at most steps. Therefore:
Taking the maximum over all pairs to find the diameter:
Hence, .
Free practice · Your answers on this page are not saved.
