GraphTheory - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Discrete Mathematics : Graph Theory : GraphTheory Package : GraphTheory/Reachable

GraphTheory

  

Reachable

  

determine all vertices reachable from a given vertex

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

Reachable(G, u)

Parameters

G

-

graph

u

-

vertex of the graph

Description

• 

Reachable returns a list of all vertices reachable from the vertex u in the graph G.

• 

A vertex v is said to be reachable from a vertex u if there exists a path in the graph from u to v.

• 

To produce an actual spanning tree of vertices reachable from u, see SpanningTree or MinimalSpanningTree.

Examples

withGraphTheory:

C6CycleGraph6

C6Graph 1: an undirected unweighted graph with 6 vertices and 6 edge(s)

(1)

ReachableC6,1

1,2,3,4,5,6

(2)

GGraph5,1,2,2,3,1,4,4,5

GGraph 2: a directed unweighted graph with 5 vertices and 6 arc(s)

(3)

ReachableG,2

2,3

(4)

Compatibility

• 

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