construct graph by subdividing edges
Subdivide(G, E, r)
(optional) edge or arc or set (or list) of edges or arcs of the graph
(optional) positive integer
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.
If r is not specified, a default value of 1 is used.
G ≔ CompleteGraph⁡2,3
G≔Graph 1: an undirected graph with 5 vertices and 6 edge(s)
SG ≔ Subdivide⁡G,1,5,2,4
SG≔Graph 2: an undirected graph with 7 vertices and 8 edge(s)
DG ≔ Digraph⁡a,b,c,a,b,a,c
DG≔Graph 3: a directed graph with 3 vertices and 2 arc(s)
SDG ≔ Subdivide⁡DG,a,b,2
SDG≔Graph 4: a directed graph with 5 vertices and 4 arc(s)
Download Help Document