GraphTheory
Reachable
determine vertices reachable from a given vertex
Calling Sequence
Parameters
Options
Description
Definition
Examples
Compatibility
Reachable(G, v)
Reachable(G, v, opts)
G
-
graph
v
vertex of the graph
opts
(optional) one or more options as specified below
output=one of graph or list
Specifies whether the result should be a list of vertices reachable from v or the subgraph induced by the vertices reachable from v. The default is list.
Reachable returns a list of all vertices reachable from the vertex v in the graph G.
To produce an actual spanning tree of vertices reachable from v, see SpanningTree or MinimalSpanningTree.
If G is an undirected graph, a vertex w is said to be reachable from a vertex v if there exists a path in G between v and w.
If G is a directed graph, a vertex w is said to be reachable from a vertex v if there exists a directed path in G from v to w.
with⁡GraphTheory:
C6≔CycleGraph⁡6
C6≔Graph 1: an undirected 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 graph with 5 vertices and 6 arc(s)
Reachable⁡G,2
2,3
Reachable⁡G,2,output=graph
Graph 3: a directed graph with 2 vertices and 1 arc(s)
The GraphTheory[Reachable] command was introduced in Maple 2018.
For more information on Maple 2018 changes, see Updates in Maple 2018.
The GraphTheory[Reachable] command was updated in Maple 2022.
The output option was introduced in Maple 2022.
For more information on Maple 2022 changes, see Updates in Maple 2022.
See Also
IsReachable
MinimalSpanningTree
SpanningTree
Download Help Document