GraphTheory
Reachable
determine vertices reachable from a given vertex
Calling Sequence
Parameters
Description
Examples
Compatibility
Reachable(G, v)
G
-
graph
v
vertex of the graph
Reachable returns a list of all vertices reachable from the vertex v in the graph G.
A vertex w is said to be reachable from a vertex v if there exists a path in the graph from v to w.
To produce an actual spanning tree of vertices reachable from v, see SpanningTree or MinimalSpanningTree.
with⁡GraphTheory:
C6≔CycleGraph⁡6
C6≔Graph 1: an undirected unweighted graph with 6 vertices and 6 edge(s)
Reachable⁡C6,1
1,2,3,4,5,6
G≔Graph⁡5,1,2,2,3,1,4,4,5
G≔Graph 2: a directed unweighted graph with 5 vertices and 6 arc(s)
Reachable⁡G,2
2,3
The GraphTheory[Reachable] command was introduced in Maple 2018.
For more information on Maple 2018 changes, see Updates in Maple 2018.
See Also
IsReachable
MinimalSpanningTree
SpanningTree
Download Help Document
What kind of issue would you like to report? (Optional)