GraphTheory - Maple Programming Help

Online Help

All Products    Maple    MapleSim


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

GraphTheory

  

Subdivide

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

Subdivide(G, E, r)

Parameters

G

-

graph

E

-

edge or arc or set (or list) of edges or arcs of the graph

r

-

positive integer

Description

• 

The Subdivide command subdivides the specified edges or arcs of a graph or digraph, by putting r new vertices on each specified edge or arc.

Examples

withGraphTheory:

GCompleteGraph2,3

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

(1)

EdgesG

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

(2)

SGSubdivideG,1,5,2,4

SGGraph 2: an undirected unweighted graph with 7 vertices and 8 edge(s)

(3)

EdgesSG

1,3,1,4,1,6,2,3,2,5,2,7,4,7,5,6

(4)

DGDigrapha,b,c,a,b,a,c

DGGraph 3: a directed unweighted graph with 3 vertices and 2 arc(s)

(5)

EdgesDG

a,b,a,c

(6)

SDGSubdivideDG,a,b,2

SDGGraph 4: a directed unweighted graph with 5 vertices and 4 arc(s)

(7)

EdgesSDG

1,2,2,b,a,1,a,c

(8)

See Also

Digraph

Edges

Graph