GraphTheory
TreeHeight
compute tree height
Calling Sequence
Parameters
Description
Examples
Compatibility
TreeHeight(T, r)
T
-
tree
r
(optional) vertex
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.
The GraphTheory[TreeHeight] command was updated in Maple 2021.
See Also
Diameter
IsTree
SpanningTree
Download Help Document