Trail - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


GraphTheory

  

Trail

  

construct a trail through a graph

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

Trail(vseq)

Parameters

vseq

-

list or sequence of vertices

Description

• 

The Trail inert function is used as a short form description of edges in a graph passing through a vertex sequence/list in the given order. For example, Trail(1,2,3,4) or Trail([1,2,3,4]) are short forms to specify a trail through the vertices that generates the edges 1,2, 2,3 and 3,4.

• 

The Trail function is only understood by the functions that construct graphs (Graph and Digraph) as well as functions that add edges to a graph or remove edges from a graph (AddEdge, DeleteEdge, AddArc, and DeleteArc). It is also used as a return value for a specified path (IsEulerian).

Examples

withGraphTheory:

GGraph4,Trail1,2,3,4,1

GGraph 1: an undirected graph with 4 vertices and 4 edge(s)

(1)

EdgesG

1,2,1,4,2,3,3,4

(2)

GDigraph4,Trail1,2,3,4,1

GGraph 2: a directed graph with 4 vertices and 4 arc(s)

(3)

EdgesG

1,2,2,3,3,4,4,1

(4)

GGraph4

GGraph 3: an undirected graph with 4 vertices and 0 edge(s)

(5)

AddEdgeG,Trail1,2,3,4,1,inplace=true

Graph 3: an undirected graph with 4 vertices and 4 edge(s)

(6)

EdgesG

1,2,1,4,2,3,3,4

(7)

IsEulerianG,T

true

(8)

T

Trail1,2,3,4,1

(9)

GDigraph4

GGraph 4: a directed graph with 4 vertices and 0 arc(s)

(10)

AddArcG,Trail4,3,2,1,4,inplace=true

Graph 4: a directed graph with 4 vertices and 4 arc(s)

(11)

EdgesG

1,4,2,1,3,2,4,3

(12)

See Also

AddArc

AddEdge

DeleteArc

DeleteEdge

Digraph

Graph