contract subgraph to single vertex
set or list of vertices, or a subgraph of G
The ContractSubgraph command returns a new graph with all the vertices in S merged into a single vertex. The neighborhood of the new vertex will be the union of the neighborhoods of all of merged vertices.
If S is given as a subgraph of G, all the vertices of S will be contracted.
To contract a single edge, use the Contract command.
C6≔Graph 1: an undirected unweighted graph with 6 vertices and 6 edge(s)
H≔Graph 2: an undirected unweighted graph with 4 vertices and 4 edge(s)
P≔Graph 3: an undirected unweighted graph with 10 vertices and 15 edge(s)
H≔Graph 4: an undirected unweighted graph with 5 vertices and 7 edge(s)
The GraphTheory[ContractSubgraph] command was introduced in Maple 2020.
For more information on Maple 2020 changes, see Updates in Maple 2020.
Download Help Document
What kind of issue would you like to report? (Optional)