GraphTheory
Maple 2018 enhances the GraphTheory package with new functions, including:
CliquePolynomial
DistancePolynomial
FindClique
GraphIntersection
IndependencePolynomial
IsReachable
Reachable
The ChromaticNumber function includes a new heuristic for graph coloring.
The SpecialGraphs subpackage also includes commands for eight new graphs.
Examples
New Special Graphs
FindClique returns a list of vertices which comprise a clique in the graph G. The optional parameter size specifies a size for the clique.
withGraphTheory:
G≔GraphComplementCompleteGraph3,4
G≔Graph 1: an undirected unweighted graph with 7 vertices and 9 edge(s)
DrawGraphG
FindCliqueG,3
1,2,3
FindCliqueG,4
4,5,6,7
GraphIntersection returns a graph G which is the intersection of the graphs G1,...,Gs, such that
VerticesG=VerticesG1∪⋯∪VerticesGs
EdgesG=EdgesG1∩⋯∩EdgesGs
G1≔Graph5,1,2,1,3,1,4,1,5
G1≔Graph 2: an undirected unweighted graph with 5 vertices and 4 edge(s)
G2≔Graph5,1,2,1,3,1,4,1,5,2,3,2,5,3,4,4,5
G2≔Graph 3: an undirected unweighted graph with 5 vertices and 8 edge(s)
DrawGraphG1
DrawGraphG2
DrawGraphGraphIntersectionG1,G2
IndependencePolynomial returns the independence polynomial for the graph G in the variable x.
withSpecialGraphs:
P≔Graph1,2,2,3,3,4
P≔Graph 4: an undirected unweighted graph with 4 vertices and 3 edge(s)
IndependencePolynomialP,x
3x2+4x+1
C≔CycleGraph5
C≔Graph 5: an undirected unweighted graph with 5 vertices and 5 edge(s)
IndependencePolynomialC,x
5x2+5x+1
ChromaticNumber
ChromaticNumber returns the minimum number of colours necessary to colour the vertices of a graph so that no adjacent vertices are coloured the same. Maple 2018 includes a new heuristic, method=sat, which transforms the graph into an instance of the Boolean satisfiability problem which it then solves using the Logic[Satisfy] command. The new default heuristic, method=fastest, runs the two methods optimal and sat in parallel and returns the result of whichever method finishes first.
M≔MirzakhaniGraph
M≔Graph 1: an undirected unweighted graph with 63 vertices and 183 edge(s)
ChromaticNumberM,method=sat
3
The SpecialGraphs subpackage now includes built-in commands to generate the following special graphs:
Doyle Graph
Gear Graph
Gray Graph
Mirzakhani Graph
DrawGraphDoyleGraph5,style=spring
DrawGraphGearGraph8
DrawGraphGrayGraph
DrawGraph MirzakhaniGraph,style=spring
Nauru Graph
Poussin Graph
Turan Graph
Tutte Graph
DrawGraph NauruGraph5
DrawGraphPoussinGraph,style=spring
DrawGraphTuranGraph5,4,style=spring
DrawGraphTutteGraph,style=spring
Download Help Document