construct kth leaf power
tree, arborescence, or anti-arborescence
LeafPower(T,k) returns the kth leaf power of a given tree T. This is a graph whose vertices are the leaves of T and in which two vertices are connected if there is a path of length at most k between them in the original tree.
The input graph T may be directed or undirected.
The kth leaf power of T is an induced subgraph of the kth graph power of T.
T≔Graph 1: a directed unweighted graph with 10 vertices and 9 arc(s)
LP3≔Graph 2: an undirected unweighted graph with 6 vertices and 9 edge(s)
The path graph on n nodes has only two leaves, the vertices 1 and n. The leaf power is empty unless k >= n-1.
PG≔Graph 3: an undirected unweighted graph with 5 vertices and 4 edge(s)
LP2≔Graph 4: an undirected unweighted graph with 2 vertices and 0 edge(s)
LP4≔Graph 5: an undirected unweighted graph with 2 vertices and 1 edge(s)
The GraphTheory[LeafPower] command was introduced in Maple 2021.
For more information on Maple 2021 changes, see Updates in Maple 2021.
Download Help Document
What kind of issue would you like to report? (Optional)