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

Online Help

All Products    Maple    MapleSim


GraphTheory

A substantial effort was put into Graph Theory for Maple 2021, including new commands for graph computation and advances in visualization.

 

New commands

New functionality for existing commands

Performance improvements

Additions to SpecialGraphs

New commands

These commands are new for Maple 2021:

EgoGraph

GraphDensity

IdentifyGraph

IsSubgraphIsomorphic

LeafPower

Newick

PrueferCode

SpanningForest

 

Tree encodings: Newick and PrueferCode

The new Newick and PrueferCode offer alternate ways to encode a tree as a string or list of integers.

(1.1.1)

(1.1.2)

(1.1.3)

IdentifyGraph: find isomorphisms among named special graphs

IdentifyGraph tests a graph for isomorphism against many of the named special graphs known to GraphTheory.

In this example we begin by picking any edge  from the Hoffman-Singleton graph and deleting all vertices incident to  or .

(1.2.1)

(1.2.2)

(1.2.3)

With IdentifyGraph, we discover that this subgraph has a name: it is isomorphic to the Sylvester graph.

(1.2.4)

IsSubgraphIsomorphic: test for isomorphism against subgraphs of a graph

IsSubgraphIsomorphic tests whether a given graph is isomorphic to a subgraph of another given graph. This problem is strictly harder than the graph isomorphism problem.

Returning to the above example, here we show again that the Sylvester graph is isomorphic to a subgraph of the Hoffman-Singleton graph. Note however that we did not need to explicit construct the subgraph beforehand.

(1.3.1)

(1.3.2)

New functionality for existing commands

The BipartiteMatching command has been extended to support weighted graphs, on which it computes a minimum weight maximum matching using the Kuhn-Munkres algorithm, also known as the Hungarian algorithm.

We begin with a 7x7 matrix whose rows represent seven workers and whose columns represent seven tasks, in which entry  represents the cost for worker  to complete task . Our goal is to find an assignment of tasks to workers which minimizes the total cost.

We now transform  into a 14x14 block matrix which will be the weight matrix for a bipartite graph:

The 14 vertices of this graph will be the seven workers and seven tasks.

(2.1)

(2.2)

Here we see an optimal solution for this problem, assigning Task 1 to Person 7, Task 2 to Person 2, etc.

(2.3)

 

Here is constructed the bipartite graph explicitly, but we can optionally also simply provide the original 7x7 matrix  directly to BipartiteMatching to produce a similar result:

(2.4)

Performance improvements

The performance of the following GraphTheory commands has been substantially improved:

Command

Approximate Speedup Factor
(compared with Maple 2020)

AllPairsDistance (weighted)

3.1

Digraph

4.8

Graph

8.8

GraphPower

4.6

IsBipartite

200

RandomBipartiteGraph

18

RandomDigraph

18

RandomGraph

22

RandomTournament

35

ReverseGraph

18

TransitiveClosure (unweighted)

2.5

TransitiveClosure (weighted)

3.4

TransitiveReduction (unweighted)

7.6

TransitiveReduction (weighted)

3.4

UnderlyingGraph

4.0

Additions to SpecialGraphs

Maple 2021 provides support for 16 additional Special Graphs, bringing the total to 113.  

Banana Tree

Bidiakis Cube

Butterfly Graph

Crown Graph

Goldner-Harary Graph

Gosset Graph

King's Graph

Kittell Graph

Knight's Graph

Krackhardt Kite Graph

Ladder Graph

Markström Graph

Queen's Graph

Sousselier Graph

Walther Graph

Watkins Snark


Download Help Document