Let G = (V, E) be a graph. The distance d (u, v) between two vertices u and v is the length of the shortest path between them. The diameter of the graph is the length of the longest path of the shortest paths between any two graph vertices (u ,v) of a graph, . In this paper we propose algorithms for finding diameter of a hierarchy graph using DFS. Diameter of the hierarchy graph using DFS algoritm is four.
Copyrights © 2019