compute tree height
TreeHeight returns the height of the tree T with the vertex r as root. In other words it returns the maximum distance of the vertices of T from r.
If the root r is omitted, TreeHeight returns the diameter of G.
T ≔ Graph⁡1,2,2,3,2,4,4,5
T≔Graph 1: an undirected graph with 5 vertices and 4 edge(s)
The GraphTheory[TreeHeight] command was updated in Maple 2021.
Download Help Document
What kind of issue would you like to report? (Optional)