Graphs
- Introduction
- Construction of Graphs and Digraphs
- Graphs with a Sparse Representation
- The Vertex–Set and Edge–Set of a Graph
- Introduction
- Creating Edges and Vertices
- Operations on Vertex-Sets and Edge-Sets
# S: GrphVertSet → RngIntElt
# S: GrphEdgeSet → RngIntElt
s in S: GrphVert, GrphVertSet → BoolElt
s in S: GrphEdge, GrphEdgeSet → BoolElt
s notin S: GrphVert, GrphVertSet → BoolElt
s notin S: GrphEdge, GrphEdgeSet → BoolElt
S subset T: GrphVertSet, GrphVertSet → BoolElt
S subset T: GrphEdgeSet, GrphEdgeSet → BoolElt
S notsubset T: GrphVertSet, GrphVertSet → BoolElt
S notsubset T: GrphEdgeSet, GrphEdgeSet → BoolElt
S eq T: GrphVertSet, GrphVertSet → BoolElt
S eq T: GrphEdgeSet, GrphEdgeSet → BoolElt
s eq t: GrphVert, GrphVert → BoolElt
s eq t: GrphEdge, GrphEdge → BoolElt
S ne T: GrphVertSet, GrphVertSet → BoolElt
S ne T: GrphEdgeSet, GrphEdgeSet → BoolElt
s ne t: GrphVert, GrphVert → BoolElt
s ne t: GrphEdge, GrphEdge → BoolElt
ParentGraph(S): GrphVertSet → Grph
ParentGraph(S): GrphEdgeSet → Grph
ParentGraph(s): GrphVert → Grph
ParentGraph(s): GrphEdge → Grph
Random(S): GrphVertSet → GrphVert
Random(S): GrphEdgeSet → GrphEdge
Representative(S): GrphVertSet → GrphVert
Rep(S): GrphVertSet → GrphVert
Representative(S): GrphEdgeSet → GrphEdge
Rep(S): GrphEdgeSet → GrphEdge
for x in S do ... end for;
for random x in S do ... end for;
- Operations on Edges and Vertices
- Labelled, Capacitated and Weighted Graphs
- Standard Constructions for Graphs
- Subgraphs and Quotient Graphs
- Incremental Construction of Graphs
- Adding Vertices
G + n: Grph, RngIntElt → Grph
G +:= n: Grph, RngIntElt
AddVertex(~G): Grph
AddVertices(~G, n): Grph, RngIntElt
AddVertex(~G, l): Grph, .
AddVertices(~G, n, L): Grph, RngIntElt, SeqEnum
- Removing Vertices
- Adding Edges
G + { u, v }: GrphUnd, { GrphVert, GrphVert } → GrphUnd, GrphEdge
G + [ u, v ]: GrphDir, [ GrphVert, GrphVert ] → GrphDir, GrphEdge
G + { { u, v } }: GrphUnd, { { GrphVert, GrphVert } } → GrphUnd
G + { [ u, v ] }: GrphDir, { [ GrphVert, GrphVert ] } → GrphDir
G +:= { u, v }: GrphUnd, { GrphVert, GrphVert }
G +:= [ u, v ]: GrphDir, [ GrphVert, GrphVert ]
G +:= { { u, v } }: GrphUnd, { { GrphVert, GrphVert } }
G +:= { [ u, v ] }: GrphDir, { [ GrphVert, GrphVert ] }
AddEdge(G, u, v): Grph, GrphVert, GrphVert → Grph, GrphEdge
AddEdge(G, u, v, l): Grph, GrphVert, GrphVert, . → Grph, GrphEdge
AddEdge(~G, u, v): Grph, GrphVert, GrphVert
AddEdge(~G, u, v, l): Grph, GrphVert, GrphVert, .
AddEdges(G, S): GrphUnd, { { GrphVert, GrphVert } } → GrphUnd
AddEdges(G, S): GrphDir, { [ GrphVert, GrphVert ] } → GrphDir
AddEdges(G, S, L): Grph, SeqEnum, SeqEnum → Grph
AddEdges(~G, S): GrphUnd, { { GrphVert, GrphVert } }
AddEdges(~G, S): GrphDir, { [ GrphVert, GrphVert ] }
AddEdges(~G, S, L): Grph, SeqEnum, SeqEnum
- Removing Edges
G - e: Grph, GrphEdge → Grph
G - { e }: Grph, { GrphEdge } → Grph
G - { { u, v } }: GrphUnd, { { GrphVert, GrphVert rbrace } → GrphUnd
G - { [u, v] }: GrphDir, { [ GrphVert, GrphVert ] } → GrphDir
G -:= e: Grph, GrphEdge
G -:= { e }: Grph, { GrphEdge }
G -:= { { u, v } }: GrphUnd, { { GrphVert, GrphVert rbrace }
G -:= { [u, v] }: GrphDir, { [ GrphVert, GrphVert ] }
RemoveEdge(~G, e): Grph, GrphEdge
RemoveEdges(~G, S): Grph, { GrphEdge }
RemoveEdge(~G, u, v): Grph, GrphVert, GrphVert
RemoveEdges(~G, S): GrphDir, { { GrphVert, GrphVert } }
RemoveEdges(~G, S): GrphDir, { [ GrphVert, GrphVert ] }
- Constructing Complements, Line Graphs; Contraction, Switching
- Unions and Products of Graphs
Union(G, H): GrphUnd, GrphUnd → GrphUnd
Union(G, H): GrphDir, GrphDir → GrphDir
G join H: GrphDir, GrphDir → GrphDir
G join H: GrphUnd, GrphUnd → GrphUnd
EdgeUnion(G, H): GrphDir, GrphDir → GrphDir
EdgeUnion(G, H): GrphUnd, GrphUnd → GrphUnd
CompleteUnion(G, H): GrphDir, GrphDir → GrphDir
CompleteUnion(G, H): GrphUnd, GrphUnd → GrphUnd
CartesianProduct(G, H): GrphDir, GrphDir → GrphDir
CartesianProduct(G, H): GrphUnd, GrphUnd → GrphUnd
LexProduct(G, H): GrphDir, GrphDir → GrphDir
LexProduct(G, H): GrphUnd, GrphUnd → GrphUnd
TensorProduct(G, H): GrphDir, GrphDir → GrphDir
TensorProduct(G, H): GrphUnd, GrphUnd → GrphUnd
G ^ n: GrphUnd, RngIntElt → GrphUnd
- Converting between Graphs and Digraphs
- Construction from Groups, Codes and Designs
- Graphs Constructed from Groups
CayleyGraph(A : parameter): Grp → Grph, GrphVertSet, GrphEdgeSet
SchreierGraph(A, B): Grp, Grp → Grph, GrphVertSet, GrphEdgeSet
OrbitalGraph(P, u, T): GrpPerm, RngIntElt, { RngIntElt} → GrphUnd
ClosureGraph(P, G): GrpPerm, GrphUnd → GrphUnd
PaleyGraph(q): RngIntElt → GrphUnd
PaleyTournament(q): RngIntElt → GrphDir
- Graphs Constructed from Designs
- Miscellaneous Graph Constructions
- Elementary Invariants of a Graph
- Elementary Graph Predicates
u adj v: GrphVert, GrphVert → BoolElt
e adj f: GrphEdge, GrphEdge → BoolElt
u notadj v: GrphVert, GrphVert → BoolElt
e notadj f: GrphEdge, GrphEdge → BoolElt
u in e: GrphVert, GrphEdge → BoolElt
u notin e: GrphVert, GrphEdge → BoolElt
G eq H: GrphDir, GrphDir → BoolElt
G eq H: GrphUnd, GrphUnd → BoolElt
IsSubgraph(G, H): Grph, Grph → BoolElt
IsBipartite(G): GrphUnd → BoolElt
IsComplete(G): Grph → BoolElt
IsEulerian(G): Grph → BoolElt
IsForest(G): GrphUnd → BoolElt
IsEmpty(G): Grph → BoolElt
IsNull(G): Grph → BoolElt
IsPath(G): Grph → BoolElt
IsPolygon(G): Grph → BoolElt
IsRegular(G): Grph → BoolElt
IsTree(G): Grph → BoolElt
- Adjacency and Degree
- Adjacency and Degree Functions for a Graph
- Adjacency and Degree Functions for a Digraph
InDegree(u): GrphVert → RngIntElt
OutDegree(u): GrphVert → RngIntElt
Degree(u): GrphVert → RngIntElt
Alldeg(G, n): GrphDir, RngIntElt → { GrphVert}
MaximumInDegree(G): GrphDir → RngIntElt, GrphVert
Maxindeg(G): GrphDir → RngIntElt, GrphVert
MaximumOutDegree(G): GrphDir → RngIntElt, GrphVert
Maxoutdeg(G): GrphDir → RngIntElt, GrphVert
MinimumInDegree(G): GrphDir → RngIntElt, GrphVert
Minindeg(G): GrphDir → RngIntElt, GrphVert
MinimumOutDegree(G): GrphDir → RngIntElt, GrphVert
Minoutdeg(G): GrphDir → RngIntElt, GrphVert
MaximumDegree(G): GrphDir → RngIntElt, GrphVert
Maxdeg(G): GrphDir → RngIntElt, GrphVert
MinimumDegree(G): GrphDir → RngIntElt, GrphVert
Mindeg(G): GrphDir → RngIntElt, GrphVert
DegreeSequence(G): Grph → [ { GrphVert} ]
InNeighbours(u): GrphVert → { GrphVert}
InNeighbors(u): GrphVert → { GrphVert}
OutNeighbours(u): GrphVert → { GrphVert}
OutNeighbors(u): GrphVert → { GrphVert}
IncidentEdges(u): GrphVert → { GrphEdge}
- Connectedness
- Distances, Paths and Circuits in a Graph
- Distances, Paths and Circuits in a Possibly Weighted Graph
- Distances, Paths and Circuits in a Non-Weighted Graph
Diameter(G): Grph → RngIntElt
DiameterPath(G): Grph → [GrphVert]
Ball(u, n): GrphVert, RngIntElt → { GrphVert}
Sphere(u, n): GrphVert, RngIntElt → { GrphVert}
DistancePartition(u): GrphVert → [ { GrphVert} ]
IsEquitable(G, P): GrphUnd, { { GrphVert}} → BoolElt
IsEquitable(G, P): GrphUnd, { { RngIntElt}} → BoolElt
EquitablePartition(P, G): { { GrphVert}}, GrphUnd → { { GrphVert}}
EquitablePartition(P, G): { { RngIntElt}}, GrphUnd → { { GrphVert}}
Girth(G): GrphUnd → RngIntElt
GirthCycle(G): GrphUnd → [GrphVert]
- Maximum Flow, Minimum Cut, and Shortest Paths
- Matrices and Vector Spaces Associated with a Graph or Digraph
- Spanning Trees of a Graph or Digraph
SpanningTree(G): GrphUnd → Grph, GrphVertSet, GrphEdgeSet
SpanningForest(G): Grph → Grph, GrphVertSet, GrphEdgeSet
BreadthFirstSearchTree(u): GrphVert → Grph, GrphVertSet, GrphEdgeSet
BFSTree(u): GrphVert → Grph
DepthFirstSearchTree(u): GrphVert → Grph, GrphVertSet, GrphEdgeSet, SeqEnum
DFSTree(u): GrphVert → Grph, GrphVertSet, GrphEdgeSet, SeqEnum
- Directed Trees
- Colourings
- Cliques, Independent Sets
HasClique(G, k): GrphUnd, RngIntElt → BoolElt, { GrphVert }
HasClique(G, k, m : parameters): GrphUnd, RngIntElt, BoolElt → BoolElt, { GrphVert }
HasClique(G, k, m, f : parameters): GrphUnd, RngIntElt, BoolElt, RngIntElt → BoolElt, { GrphVert }
MaximumClique(G : parameters): GrphUnd → { GrphVert }
CliqueNumber(G : parameters): GrphUnd → RngIntElt
AllCliques(G : parameters): GrphUnd → SeqEnum
AllCliques(G, k : parameters): GrphUnd, RngIntElt → SeqEnum
AllCliques(G, k, m : parameters): GrphUnd, RngIntElt, BoolElt → SeqEnum
MaximumIndependentSet(G: parameters): GrphUnd → { GrphVert }
IndependenceNumber(G: parameters): GrphUnd → RngIntElt
Example: Cliques
- Planar Graphs
- Automorphism Group of a Graph or Digraph
- The Automorphism Group Function
- nauty Invariants
- Graph Colouring and Automorphism Group
- Variants of Automorphism Group
- Action of Automorphisms
Image(a, Y, y): GrpPermElt, GSet, Elt → Elt
Orbit(A, Y, y): GrpPerm, GSet, Elt → GSet
Orbits(A, Y): GrpPerm, GSet → [ GSet ]
Stabilizer(A, Y, y): GrpPerm, GSet, Elt → GrpPerm
Action(A, Y): GrpPerm, GSet → Hom(Grp), GrpPerm, GrpPerm
ActionImage(A, Y): GrpPerm, GSet → GrpPerm
ActionKernel(A, Y): GrpPerm, GSet → GrpPerm
Example: Automorphism Action
- Symmetry and Regularity Properties of Graphs
- Graph Databases and Graph Generation
- Strongly Regular Graphs
StronglyRegularGraphsDatabase() → DB
Classes(D): DB → SeqEnum
NumberOfClasses(D): DB → RngIntElt
NumberOfGraphs(D): DB → RngIntElt
NumberOfGraphs(D, S): DB, SeqEnum → RngIntElt
Graphs(D, S): DB, SeqEnum → SeqEnum
Graph(D, S, i): DB, SeqEnum, RngIntElt → GrphUnd
RandomGraph(D): DB → GrphUnd
RandomGraph(D, S): DB, SeqEnum → GrphUnd
for G in D do ... end for;
Example: Strongly Regular Graphs
- Small Graphs
- Generating Graphs
- A General Facility