GraphTheory
IsArborescence
test if a graph is an arborescence
IsAntiArborescence
test if a graph is an anti-arborescence
Calling Sequence
Parameters
Options
Description
Details
Examples
Compatibility
IsArborescence(G,opts)
IsAntiArborescence(G,opts)
G
-
a directed graph
opts
: (optional) root=true or root=false
root : keyword option of the form root=true or root=false. This specifies whether the root vertex should be returned when the check is positive. The default is false.
The IsArborescence function returns true if the input graph is an arborescence, and false otherwise.
The IsAntiArborescence function returns true if the input graph is an anti-arborescence, and false otherwise.
A directed graph G is an arborescence if there is a single vertex u called the root such that for any other vertex v, there is exactly one path from u to v.
A directed graph G is an anti-arborescence if there is a single vertex v called the root such that for any other vertex u, there is exactly one path from u to v. An anti-arborescence is a graph whose reverse is an arborescence.
Confirm that a directed path is both an arborescence and an anti-arborescence.
with⁡GraphTheory:
T≔Graph⁡1,2,2,3
T≔Graph 1: a directed graph with 3 vertices and 2 arc(s)
IsArborescence⁡T
true
IsAntiArborescence⁡T
Confirm that a directed cycle is neither an arborescence nor an anti-arborescence.
C≔Graph⁡1,2,2,3,3,1
C≔Graph 2: a directed graph with 3 vertices and 3 arc(s)
IsArborescence⁡C
false
IsAntiArborescence⁡C
Check whether a graph is an arborescence and display its root vertex.
G≔Graph⁡1,2,1,5,2,3,2,4
G≔Graph 3: a directed graph with 5 vertices and 4 arc(s)
IsArborescence⁡G
IsArborescence⁡G,root
true,1
IsAntiArborescence⁡G
Check whether a graph is an anti-arborescence and display its root vertex.
A≔Graph⁡1,3,2,3
A≔Graph 4: a directed graph with 3 vertices and 2 arc(s)
IsArborescence⁡A
IsAntiArborescence⁡A,root
true,3
IsAntiArborescence⁡A
The GraphTheory[IsArborescence] and GraphTheory[IsAntiArborescence] commands were introduced in Maple 2016.
For more information on Maple 2016 changes, see Updates in Maple 2016.
The GraphTheory[IsArborescence] and GraphTheory[IsAntiArborescence] commands were updated in Maple 2019.
The root option was introduced in Maple 2019.
For more information on Maple 2019 changes, see Updates in Maple 2019.
See Also
IsAcyclic
IsConnected
IsForest
IsTree
NumberOfEdges
NumberOfVertices
Download Help Document