---
title: "Graphs"
canonical: "https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/index-graphs.html"
source: "https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/index-graphs.md"
part: "Combinatorics"
chapter: "Graphs"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Combinatorics", "source": "https://docs.magma-maths.org/v2.30-1/Combinatorics/index-combinatorics.md"}
prev: {"title": "Databases", "source": "https://docs.magma-maths.org/v2.30-1/Combinatorics/HadamardMatrices/hadamard-database.md"}
next: {"title": "Introduction", "source": "https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/introduction.md"}
---

<a id="graph"></a>
# Graphs

- [Introduction](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/introduction.md)
- [Construction of Graphs and Digraphs](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md)
  - [Bounds on the Graph Order](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#bounds-on-the-graph-order)
    - [`GraphSizeInBytes(n, m : parameters): RngIntElt, RngIntElt → RngIntElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#function-graphsizeinbytes-rngintelt-rngintelt)
    - [Example: Size Limit of a Dense Graph](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#example-ex-1d9be6)
  - [Construction of a General Graph](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#construction-of-a-general-graph)
    - [`Graph< n | edges : parameters>: RngIntElt, List → GrphUnd, GrphVertSet, GrphEdgeSet`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#constructor-constructor-graph-rngintelt-list-grphund-grphvertset-grphedgeset)
    - [`Graph< S | edges : parameters >: SetEnum, List → GrphUnd, GrphVertSet, GrphEdgeSet`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#constructor-constructor-graph-setenum-list-grphund-grphvertset-grphedgeset)
    - [`Graph< S | edges : parameters>: SetIndx, List → GrphUnd, GrphVertSet, GrphEdgeSet`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#constructor-constructor-graph-setindx-list-grphund-grphvertset-grphedgeset)
    - [`IncidenceGraph(A): ModMatRngElt → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#function-incidencegraph-modmatrngelt)
    - [Example: Constructing the Petersen Graph](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#example-ex-f07f4d)
    - [Example: Tutte's 8-Cage](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#example-ex-d2036c)
  - [Construction of a General Digraph](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#construction-of-a-general-digraph)
    - [`Digraph< n | edges : parameters>: RngIntElt, List → GrphDir`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#constructor-constructor-digraph-rngintelt-list-grphdir)
    - [`Digraph< S | edges : parameters>: SetEnum, List → GrphDir`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#constructor-constructor-digraph-setenum-list-grphdir)
    - [`Digraph< S | edges : parameters>: SetIndx, List → GrphDir`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#constructor-constructor-digraph-setindx-list-grphdir)
    - [`IncidenceDigraph(A): ModMatRngElt → GrphDir`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#function-incidencedigraph-modmatrngelt)
    - [Example: Constructing a Digraph](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#example-ex-fe5c22)
  - [Operations on the Support](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#operations-on-the-support)
    - [`Support(G): Grph → SetIndx`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#function-support-grph)
    - [`Support(V): GrphVertSet → SetIndx`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#function-support-grphvertset)
    - [`ChangeSupport(G, S): Grph, SetIndx → Grph, GrphVertSet, GrphEdgeSet`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#function-changesupport-grph-setindx)
    - [`ChangeSupport(~G, S): Grph, SetIndx`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#procedure-changesupport-grph-setindx-ref)
    - [`StandardGraph(G): Grph → Grph`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#function-standardgraph-grph)
    - [Example: Standard Graph of an Odd Graph](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#example-ex-ec4c86)
  - [Construction of a Standard Graph](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#construction-of-a-standard-graph)
    - [`BipartiteGraph(m, n): RngIntElt, RngIntElt → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#function-bipartitegraph-rngintelt-rngintelt)
    - [`CompleteGraph(n): RngIntElt → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#function-completegraph-rngintelt)
    - [`KCubeGraph(n : parameters): RngIntElt → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#function-kcubegraph-rngintelt)
    - [`MultipartiteGraph(Q): [RngIntElt] → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#function-multipartitegraph-rngintelt)
    - [`EmptyGraph(n : parameters): RngIntElt → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#function-emptygraph-rngintelt)
    - [`NullGraph( : parameters) → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#function-nullgraph)
    - [`PathGraph(n : parameters): RngIntElt → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#function-pathgraph-rngintelt)
    - [`PolygonGraph(n : parameters): RngIntElt → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#function-polygongraph-rngintelt)
    - [`RandomGraph(n, r : parameters): RngIntElt, FldReElt → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#function-randomgraph-rngintelt-fldreelt)
    - [`RandomTree(n : parameters): RngIntElt → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#function-randomtree-rngintelt)
  - [Construction of a Standard Digraph](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#construction-of-a-standard-digraph)
    - [`CompleteDigraph(n): RngIntElt → GrphDir`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#function-completedigraph-rngintelt)
    - [`EmptyDigraph(n : parameters): RngIntElt → GrphDir`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#function-emptydigraph-rngintelt)
    - [`RandomDigraph(n, r : parameters): RngIntElt, FldReElt → GrphDir`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#function-randomdigraph-rngintelt-fldreelt)
    - [Example: Complete and Random Digraphs](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-digraph.md#example-ex-d57426)
- [Graphs with a Sparse Representation](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/sparse-graphs.md)
  - [`HasSparseRep(G): Grph → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/sparse-graphs.md#function-hassparserep-grph)
  - [`HasDenseRep(G): Grph → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/sparse-graphs.md#function-hasdenserep-grph)
  - [`HasSparseRepOnly(G): Grph → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/sparse-graphs.md#function-hassparsereponly-grph)
  - [`HasDenseRepOnly(G): Grph → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/sparse-graphs.md#function-hasdensereponly-grph)
  - [`HasDenseAndSparseRep(G): Grph → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/sparse-graphs.md#function-hasdenseandsparserep-grph)
  - [Example: Dense and Sparse Representations](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/sparse-graphs.md#example-ex-b3b8b8)
- [The Vertex–Set and Edge–Set of a Graph](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md)
  - [Introduction](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#introduction)
  - [Creating Edges and Vertices](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#creating-edges-and-vertices)
    - [`EdgeSet(G): Grph → GrphEdgeSet`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#function-edgeset-grph)
    - [`Edges(G): Grph → {@ GrphEdge @}`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#function-edges-grph)
    - [`VertexSet(G): Grph → GrphVertSet`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#function-vertexset-grph)
    - [`Vertices(G): Grph → { GrphVert}`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#function-vertices-grph)
    - [`V ! v: GrphVertSet, . → GrphVert`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#operation-op-grphvertset)
    - [`V . i: GrphVertSet, RngIntElt → GrphVert`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#operation-operation-grphvertset-rngintelt-grphvert)
    - [`Index(v): GrphVert → RngIntElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#function-index-grphvert)
    - [`E ! { u, v}: GrphEdgeSet, { . } → GrphEdge`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#operation-op-grphedgeset)
    - [`E ! [u, v]: GrphEdgeSet, [ . ] → GrphEdge`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#operation-op-grphedgeset-2)
    - [`E . i: GrphEdgeSet, RngIntElt → GrphEdge`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#operation-operation-grphedgeset-rngintelt-grphedge)
    - [Example: Vertices and Edges of an Odd Graph](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#example-ex-e2c41e)
    - [Example: Coercing Vertices and Edges of a Digraph](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#example-ex-12cef7)
  - [Operations on Vertex-Sets and Edge-Sets](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#operations-on-vertex-sets-and-edge-sets)
    - [`# S: GrphVertSet → RngIntElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#operation-operation-grphvertset-rngintelt)
    - [`# S: GrphEdgeSet → RngIntElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#operation-operation-grphedgeset-rngintelt)
    - [`s in S: GrphVert, GrphVertSet → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#operation-op-in-grphvert-grphvertset)
    - [`s in S: GrphEdge, GrphEdgeSet → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#operation-op-in-grphedge-grphedgeset)
    - [`s notin S: GrphVert, GrphVertSet → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#operation-op-notin-grphvert-grphvertset)
    - [`s notin S: GrphEdge, GrphEdgeSet → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#operation-op-notin-grphedge-grphedgeset)
    - [`S subset T: GrphVertSet, GrphVertSet → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#operation-op-subset-grphvertset-grphvertset)
    - [`S subset T: GrphEdgeSet, GrphEdgeSet → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#operation-op-subset-grphedgeset-grphedgeset)
    - [`S notsubset T: GrphVertSet, GrphVertSet → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#operation-operation-notsubset-grphvertset-grphvertset-boolelt)
    - [`S notsubset T: GrphEdgeSet, GrphEdgeSet → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#operation-operation-notsubset-grphedgeset-grphedgeset-boolelt)
    - [`S eq T: GrphVertSet, GrphVertSet → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#operation-op-eq-grphvertset-grphvertset)
    - [`S eq T: GrphEdgeSet, GrphEdgeSet → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#operation-op-eq-grphedgeset-grphedgeset)
    - [`s eq t: GrphVert, GrphVert → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#operation-op-eq-grphvert-grphvert)
    - [`s eq t: GrphEdge, GrphEdge → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#operation-op-eq-grphedge-grphedge)
    - [`S ne T: GrphVertSet, GrphVertSet → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#operation-op-ne-grphvertset-grphvertset)
    - [`S ne T: GrphEdgeSet, GrphEdgeSet → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#operation-op-ne-grphedgeset-grphedgeset)
    - [`s ne t: GrphVert, GrphVert → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#operation-op-ne-grphvert-grphvert)
    - [`s ne t: GrphEdge, GrphEdge → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#operation-op-ne-grphedge-grphedge)
    - [`ParentGraph(S): GrphVertSet → Grph`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#function-parentgraph-grphvertset)
    - [`ParentGraph(S): GrphEdgeSet → Grph`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#function-parentgraph-grphedgeset)
    - [`ParentGraph(s): GrphVert → Grph`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#function-parentgraph-grphvert)
    - [`ParentGraph(s): GrphEdge → Grph`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#function-parentgraph-grphedge)
    - [`Random(S): GrphVertSet → GrphVert`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#function-random-grphvertset)
    - [`Random(S): GrphEdgeSet → GrphEdge`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#function-random-grphedgeset)
    - [`Representative(S): GrphVertSet → GrphVert`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#function-representative-grphvertset)
    - [`Rep(S): GrphVertSet → GrphVert`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#function-rep-grphvertset)
    - [`Representative(S): GrphEdgeSet → GrphEdge`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#function-representative-grphedgeset)
    - [`Rep(S): GrphEdgeSet → GrphEdge`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#function-rep-grphedgeset)
    - [`for x in S do ... end for;`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#literal-literal-for-for-x-in-s-do-end-for)
    - [`for random x in S do ... end for;`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#literal-literal-for-random-for-random-x-in-s-do-end-for)
  - [Operations on Edges and Vertices](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#operations-on-edges-and-vertices)
    - [`EndVertices(e): GrphEdge → { GrphVert}`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#function-endvertices-grphedge)
    - [`EndVertices(e): GrphEdge → [ GrphVert ]`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#function-endvertices-grphedge-2)
    - [`InitialVertex(e): GrphEdge → GrphVert`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#function-initialvertex-grphedge)
    - [`TerminalVertex(e): GrphEdge → GrphVert`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#function-terminalvertex-grphedge)
    - [`IncidentEdges(u): GrphVert → { GrphEdge}`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/vertex-edge-set.md#function-incidentedges-grphvert)
- [Labelled, Capacitated, and Weighted Graphs](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/labels.md)
- [Standard Constructions for Graphs](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md)
  - [Subgraphs and Quotient Graphs](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#subgraphs-and-quotient-graphs)
    - [`sub< G | list >: Grph, List → Grph, GrphVertSet, GrphEdgeSet`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#constructor-constructor-sub-grph-list-grph-grphvertset-grphedgeset)
    - [`quo< G | P >: Grph, {{ GrphVert}} → Grph, GrphVertSet, GrphEdgeSet`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#constructor-constructor-quo-grph-grphvert-grph-grphvertset-grphedgeset)
    - [Example: Mapping Vertices of a Subgraph](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#example-ex-8045cf)
    - [Example: Quotient of a Complete Graph](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#example-ex-c8df39)
  - [Incremental Construction of Graphs](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#incremental-construction-of-graphs)
    - [Adding Vertices](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#adding-vertices)
      - [`G + n: Grph, RngIntElt → Grph`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#operation-op-plus-grph-rngintelt)
      - [`G +:= n: Grph, RngIntElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#operation-operation-grph-rngintelt)
      - [`AddVertex(~G): Grph`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#procedure-addvertex-grph-ref)
      - [`AddVertices(~G, n): Grph, RngIntElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#procedure-addvertices-grph-rngintelt-ref)
      - [`AddVertex(~G, l): Grph, .`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#procedure-addvertex-grph-ref-2)
      - [`AddVertices(~G, n, L): Grph, RngIntElt, SeqEnum`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#procedure-addvertices-grph-rngintelt-seqenum-ref)
    - [Removing Vertices](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#removing-vertices)
      - [`G - v: Grph, GrphVert → Grph`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#operation-op-minus-grph-grphvert)
      - [`G - U: Grph, {  GrphVert } → Grph`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#operation-op-minus-grph-grphvert-2)
      - [`G -:= v: Grph, GrphVert`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#operation-operation-grph-grphvert)
      - [`G -:= U: Grph, {  GrphVert }`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#operation-operation-grph-grphvert-2)
      - [`RemoveVertex(~G, v): Grph, GrphVert`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#procedure-removevertex-grph-grphvert-ref)
      - [`RemoveVertices(~G, U): Grph, {  GrphVert }`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#procedure-removevertices-grph-grphvert-ref)
    - [Adding Edges](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#adding-edges)
      - [`G + { u, v }: GrphUnd, { GrphVert, GrphVert } → GrphUnd, GrphEdge`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#operation-op-plus-grphund-grphvert-grphvert)
      - [`G + [ u, v ]: GrphDir, [ GrphVert, GrphVert ] → GrphDir, GrphEdge`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#operation-op-plus-grphdir-grphvert-grphvert)
      - [`G + { { u, v } }: GrphUnd, { { GrphVert, GrphVert } } → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#operation-op-plus-grphund-grphvert-grphvert-2)
      - [`G + { [ u, v ] }: GrphDir, {  [ GrphVert, GrphVert ] } → GrphDir`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#operation-op-plus-grphdir-grphvert-grphvert-2)
      - [`G +:= { u, v }: GrphUnd, { GrphVert, GrphVert }`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#operation-operation-grphund-grphvert-grphvert)
      - [`G +:= [ u, v ]: GrphDir, [ GrphVert, GrphVert ]`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#operation-operation-grphdir-grphvert-grphvert)
      - [`G +:= { { u, v } }: GrphUnd, { {  GrphVert, GrphVert  } }`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#operation-operation-grphund-grphvert-grphvert-2)
      - [`G +:= { [ u, v ] }: GrphDir, {  [ GrphVert, GrphVert ] }`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#operation-operation-grphdir-grphvert-grphvert-2)
      - [`AddEdge(G, u, v): Grph, GrphVert, GrphVert → Grph, GrphEdge`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#function-addedge-grph-grphvert-grphvert)
      - [`AddEdge(G, u, v, l): Grph, GrphVert, GrphVert, . → Grph, GrphEdge`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#function-addedge-grph-grphvert-grphvert-2)
      - [`AddEdge(~G, u, v): Grph, GrphVert, GrphVert`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#procedure-addedge-grph-grphvert-grphvert-ref)
      - [`AddEdge(~G, u, v, l): Grph, GrphVert, GrphVert, .`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#procedure-addedge-grph-grphvert-grphvert-ref-2)
      - [`AddEdges(G, S): GrphUnd, { { GrphVert, GrphVert } } → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#function-addedges-grphund-grphvert-grphvert)
      - [`AddEdges(G, S): GrphDir, {  [  GrphVert, GrphVert ] } → GrphDir`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#function-addedges-grphdir-grphvert-grphvert)
      - [`AddEdges(G, S, L): Grph, SeqEnum, SeqEnum → Grph`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#function-addedges-grph-seqenum-seqenum)
      - [`AddEdges(~G, S): GrphUnd, { { GrphVert, GrphVert } }`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#procedure-addedges-grphund-grphvert-grphvert-ref)
      - [`AddEdges(~G, S): GrphDir, {  [  GrphVert, GrphVert ] }`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#procedure-addedges-grphdir-grphvert-grphvert-ref)
      - [`AddEdges(~G, S, L): Grph, SeqEnum, SeqEnum`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#procedure-addedges-grph-seqenum-seqenum-ref)
    - [Removing Edges](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#removing-edges)
      - [`G - e: Grph, GrphEdge → Grph`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#operation-op-minus-grph-grphedge)
      - [`G - { e }: Grph, {  GrphEdge } → Grph`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#operation-op-minus-grph-grphedge-2)
      - [`G - { { u, v } }: GrphUnd, { { GrphVert, GrphVert } } → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#operation-op-minus-grphund-grphvert-grphvert-rbrace)
      - [`G - { [u, v] }: GrphDir, {  [ GrphVert, GrphVert ] } → GrphDir`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#operation-op-minus-grphdir-grphvert-grphvert)
      - [`G -:= e: Grph, GrphEdge`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#operation-operation-grph-grphedge)
      - [`G -:= { e }: Grph, {  GrphEdge }`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#operation-operation-grph-grphedge-2)
      - [`G -:= { { u, v } }: GrphUnd, {  { GrphVert, GrphVert rbrace }`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#operation-operation-grphund-grphvert-grphvert-rbrace)
      - [`G -:= { [u, v] }: GrphDir, {  [ GrphVert, GrphVert ] }`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#operation-operation-grphdir-grphvert-grphvert-3)
      - [`RemoveEdge(~G, e): Grph, GrphEdge`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#procedure-removeedge-grph-grphedge-ref)
      - [`RemoveEdges(~G, S): Grph, {  GrphEdge }`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#procedure-removeedges-grph-grphedge-ref)
      - [`RemoveEdge(~G, u, v): Grph, GrphVert, GrphVert`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#procedure-removeedge-grph-grphvert-grphvert-ref)
      - [`RemoveEdges(~G, S): GrphDir, { {  GrphVert, GrphVert } }`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#procedure-removeedges-grphdir-grphvert-grphvert-ref)
      - [`RemoveEdges(~G, S): GrphDir, {  [  GrphVert, GrphVert ] }`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#procedure-removeedges-grphdir-grphvert-grphvert-ref-2)
  - [Constructing Complements, Line Graphs; Contraction, Switching](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#constructing-complements-line-graphs-contraction-switching)
    - [`Complement(G): Grph → Grph`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#function-complement-grph)
    - [`Contract(e): GrphEdge → Grph`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#function-contract-grphedge)
    - [`Contract(u, v): GrphVert, GrphVert → Grph`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#function-contract-grphvert-grphvert)
    - [`Contract(S): { GrphVert} → Grph`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#function-contract-grphvert)
    - [`InsertVertex(e): GrphEdge → Grph`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#function-insertvertex-grphedge)
    - [`InsertVertex(T): { GrphEdge} → Grph`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#function-insertvertex-grphedge-2)
    - [`LineGraph(G): Grph → Grph`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#function-linegraph-grph)
    - [`Switch(u): GrphVert → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#function-switch-grphvert)
    - [`Switch(S): { GrphVert} → Grph`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#function-switch-grphvert-2)
    - [Example: Constructing the Grotzsch Graph](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/operation.md#example-ex-be173e)
- [Unions and Products of Graphs](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/union-product.md)
  - [`Union(G, H): GrphUnd, GrphUnd → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/union-product.md#function-union-grphund-grphund)
  - [`Union(G, H): GrphDir, GrphDir → GrphDir`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/union-product.md#function-union-grphdir-grphdir)
  - [`G join H: GrphDir, GrphDir → GrphDir`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/union-product.md#operation-op-join-grphdir-grphdir)
  - [`G join H: GrphUnd, GrphUnd → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/union-product.md#operation-op-join-grphund-grphund)
  - [`EdgeUnion(G, H): GrphDir, GrphDir → GrphDir`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/union-product.md#function-edgeunion-grphdir-grphdir)
  - [`EdgeUnion(G, H): GrphUnd, GrphUnd → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/union-product.md#function-edgeunion-grphund-grphund)
  - [`CompleteUnion(G, H): GrphDir, GrphDir → GrphDir`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/union-product.md#function-completeunion-grphdir-grphdir)
  - [`CompleteUnion(G, H): GrphUnd, GrphUnd → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/union-product.md#function-completeunion-grphund-grphund)
  - [`CartesianProduct(G, H): GrphDir, GrphDir → GrphDir`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/union-product.md#function-cartesianproduct-grphdir-grphdir)
  - [`CartesianProduct(G, H): GrphUnd, GrphUnd → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/union-product.md#function-cartesianproduct-grphund-grphund)
  - [`LexProduct(G, H): GrphDir, GrphDir → GrphDir`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/union-product.md#function-lexproduct-grphdir-grphdir)
  - [`LexProduct(G, H): GrphUnd, GrphUnd → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/union-product.md#function-lexproduct-grphund-grphund)
  - [`TensorProduct(G, H): GrphDir, GrphDir → GrphDir`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/union-product.md#function-tensorproduct-grphdir-grphdir)
  - [`TensorProduct(G, H): GrphUnd, GrphUnd → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/union-product.md#function-tensorproduct-grphund-grphund)
  - [`G ^ n: GrphUnd, RngIntElt → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/union-product.md#operation-op-pow-grphund-rngintelt)
- [Converting between Graphs and Digraphs](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/conversion-graph-digraph.md)
  - [`OrientatedGraph(G): GrphUnd → GrphDir`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/conversion-graph-digraph.md#function-orientatedgraph-grphund)
  - [`UnderlyingGraph(D): Grph → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/conversion-graph-digraph.md#function-underlyinggraph-grph)
  - [`UnderlyingDigraph(G): Grph → GrphDir`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/conversion-graph-digraph.md#function-underlyingdigraph-grph)
- [Construction from Groups, Codes, and Designs](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/group-code-design.md)
  - [Graphs Constructed from Groups](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/group-code-design.md#graphs-constructed-from-groups)
    - [`CayleyGraph(A : parameter): Grp → Grph, GrphVertSet, GrphEdgeSet`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/group-code-design.md#function-cayleygraph-grp)
    - [`SchreierGraph(A, B): Grp, Grp → Grph, GrphVertSet, GrphEdgeSet`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/group-code-design.md#function-schreiergraph-grp-grp)
    - [`OrbitalGraph(P, u, T): GrpPerm, RngIntElt, { RngIntElt} → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/group-code-design.md#function-orbitalgraph-grpperm-rngintelt-rngintelt)
    - [`ClosureGraph(P, G): GrpPerm, GrphUnd → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/group-code-design.md#function-closuregraph-grpperm-grphund)
    - [`PaleyGraph(q): RngIntElt → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/group-code-design.md#function-paleygraph-rngintelt)
    - [`PaleyTournament(q): RngIntElt → GrphDir`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/group-code-design.md#function-paleytournament-rngintelt)
  - [Graphs Constructed from Designs](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/group-code-design.md#graphs-constructed-from-designs)
    - [`IncidenceGraph(D): Inc → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/group-code-design.md#function-incidencegraph-inc)
    - [`PointGraph(D): Inc → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/group-code-design.md#function-pointgraph-inc)
    - [`BlockGraph(D): Inc → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/group-code-design.md#function-blockgraph-inc)
    - [`IncidenceGraph(P): Plane → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/group-code-design.md#function-incidencegraph-plane)
    - [`PointGraph(P): Plane → GrphUnd;`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/group-code-design.md#function-pointgraph-plane)
    - [`LineGraph(P): Plane → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/group-code-design.md#function-linegraph-plane)
    - [`HadamardGraph(H : parameters): Mtrx → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/group-code-design.md#function-hadamardgraph-mtrx)
  - [Miscellaneous Graph Constructions](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/group-code-design.md#miscellaneous-graph-constructions)
    - [`Converse(G): GrphDir → GrphDir`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/group-code-design.md#function-converse-grphdir)
    - [`OddGraph(n): RngIntElt → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/group-code-design.md#function-oddgraph-rngintelt)
    - [`TriangularGraph(n): RngIntElt → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/group-code-design.md#function-triangulargraph-rngintelt)
    - [`SquareLatticeGraph(n): RngIntElt → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/group-code-design.md#function-squarelatticegraph-rngintelt)
    - [`ClebschGraph() → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/group-code-design.md#function-clebschgraph)
    - [`ShrikhandeGraph() → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/group-code-design.md#function-shrikhandegraph)
    - [`GewirtzGraph() → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/group-code-design.md#function-gewirtzgraph)
    - [`PetersenGraph() → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/group-code-design.md#function-petersengraph)
    - [`ChangGraphs() → [GrpUnd, GrpUnd, GrpUnd]`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/group-code-design.md#function-changgraphs)
- [Elementary Invariants of a Graph](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/invariant.md)
  - [`Order(G): Grph → RngIntElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/invariant.md#function-order-grph)
  - [`NumberOfVertices(G): Grph → RngIntElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/invariant.md#function-numberofvertices-grph)
  - [`Size(G): Grph → RngIntElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/invariant.md#function-size-grph)
  - [`NumberOfEdges(G): Grph → RngIntElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/invariant.md#function-numberofedges-grph)
  - [`CharacteristicPolynomial(G): GrphUnd → RngUPolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/invariant.md#function-characteristicpolynomial-grphund)
  - [`Spectrum(G): GrphUnd → SetEnum`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/invariant.md#function-spectrum-grphund)
- [Elementary Graph Predicates](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/Boolean.md)
  - [`u adj v: GrphVert, GrphVert → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/Boolean.md#operation-operation-adj-grphvert-grphvert-boolelt)
  - [`e adj f: GrphEdge, GrphEdge → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/Boolean.md#operation-operation-adj-grphedge-grphedge-boolelt)
  - [`u notadj v: GrphVert, GrphVert → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/Boolean.md#operation-operation-notadj-grphvert-grphvert-boolelt)
  - [`e notadj f: GrphEdge, GrphEdge → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/Boolean.md#operation-operation-notadj-grphedge-grphedge-boolelt)
  - [`u in e: GrphVert, GrphEdge → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/Boolean.md#operation-op-in-grphvert-grphedge)
  - [`u notin e: GrphVert, GrphEdge → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/Boolean.md#operation-op-notin-grphvert-grphedge)
  - [`G eq H: GrphDir, GrphDir → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/Boolean.md#operation-op-eq-grphdir-grphdir)
  - [`G eq H: GrphUnd, GrphUnd → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/Boolean.md#operation-op-eq-grphund-grphund)
  - [`IsSubgraph(G, H): Grph, Grph → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/Boolean.md#function-issubgraph-grph-grph)
  - [`IsBipartite(G): GrphUnd → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/Boolean.md#function-isbipartite-grphund)
  - [`IsComplete(G): Grph → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/Boolean.md#function-iscomplete-grph)
  - [`IsEulerian(G): Grph → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/Boolean.md#function-iseulerian-grph)
  - [`IsForest(G): GrphUnd → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/Boolean.md#function-isforest-grphund)
  - [`IsEmpty(G): Grph → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/Boolean.md#function-isempty-grph)
  - [`IsNull(G): Grph → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/Boolean.md#function-isnull-grph)
  - [`IsPath(G): Grph → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/Boolean.md#function-ispath-grph)
  - [`IsPolygon(G): Grph → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/Boolean.md#function-ispolygon-grph)
  - [`IsRegular(G): Grph → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/Boolean.md#function-isregular-grph)
  - [`IsTree(G): Grph → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/Boolean.md#function-istree-grph)
- [Adjacency and Degree](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md)
  - [Adjacency and Degree Functions for a Graph](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#adjacency-and-degree-functions-for-a-graph)
    - [`Degree(u): GrphVert → RngIntElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#function-degree-grphvert)
    - [`Alldeg(G, n): GrphUnd, RngIntElt → { GrphVert}`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#function-alldeg-grphund-rngintelt)
    - [`MaximumDegree(G): GrphUnd → RngIntElt, GrphVert`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#function-maximumdegree-grphund)
    - [`Maxdeg(G): GrphUnd → RngIntElt, GrphVert`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#function-maxdeg-grphund)
    - [`MinimumDegree(G): GrphUnd → RngIntElt, GrphVert`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#function-minimumdegree-grphund)
    - [`Mindeg(G): GrphUnd → RngIntElt, GrphVert`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#function-mindeg-grphund)
    - [`DegreeSequence(G): Grph → [ { GrphVert} ]`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#function-degreesequence-grph)
    - [`Valence(G): GrphUnd → RngIntElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#function-valence-grphund)
    - [`Neighbours(u): GrphVert → { GrphVert}`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#function-neighbours-grphvert)
    - [`Neighbors(u): GrphVert → { GrphVert}`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#function-neighbors-grphvert)
    - [`IncidentEdges(u): GrphVert → { GrphEdge}`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#function-incidentedges-grphvert-2)
    - [`Bipartition(G): GrphUnd → [ { GrphVert} ]`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#function-bipartition-grphund)
    - [`MinimumDominatingSet(G): GrphUnd → SetEnum`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#function-minimumdominatingset-grphund)
  - [Adjacency and Degree Functions for a Digraph](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#adjacency-and-degree-functions-for-a-digraph)
    - [`InDegree(u): GrphVert → RngIntElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#function-indegree-grphvert)
    - [`OutDegree(u): GrphVert → RngIntElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#function-outdegree-grphvert)
    - [`Degree(u): GrphVert → RngIntElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#function-degree-grphvert-2)
    - [`Alldeg(G, n): GrphDir, RngIntElt → { GrphVert}`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#function-alldeg-grphdir-rngintelt)
    - [`MaximumInDegree(G): GrphDir → RngIntElt, GrphVert`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#function-maximumindegree-grphdir)
    - [`Maxindeg(G): GrphDir → RngIntElt, GrphVert`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#function-maxindeg-grphdir)
    - [`MaximumOutDegree(G): GrphDir → RngIntElt, GrphVert`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#function-maximumoutdegree-grphdir)
    - [`Maxoutdeg(G): GrphDir → RngIntElt, GrphVert`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#function-maxoutdeg-grphdir)
    - [`MinimumInDegree(G): GrphDir → RngIntElt, GrphVert`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#function-minimumindegree-grphdir)
    - [`Minindeg(G): GrphDir → RngIntElt, GrphVert`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#function-minindeg-grphdir)
    - [`MinimumOutDegree(G): GrphDir → RngIntElt, GrphVert`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#function-minimumoutdegree-grphdir)
    - [`Minoutdeg(G): GrphDir → RngIntElt, GrphVert`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#function-minoutdeg-grphdir)
    - [`MaximumDegree(G): GrphDir → RngIntElt, GrphVert`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#function-maximumdegree-grphdir)
    - [`Maxdeg(G): GrphDir → RngIntElt, GrphVert`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#function-maxdeg-grphdir)
    - [`MinimumDegree(G): GrphDir → RngIntElt, GrphVert`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#function-minimumdegree-grphdir)
    - [`Mindeg(G): GrphDir → RngIntElt, GrphVert`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#function-mindeg-grphdir)
    - [`DegreeSequence(G): Grph → [ { GrphVert} ]`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#function-degreesequence-grph-2)
    - [`InNeighbours(u): GrphVert → { GrphVert}`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#function-inneighbours-grphvert)
    - [`InNeighbors(u): GrphVert → { GrphVert}`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#function-inneighbors-grphvert)
    - [`OutNeighbours(u): GrphVert → { GrphVert}`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#function-outneighbours-grphvert)
    - [`OutNeighbors(u): GrphVert → { GrphVert}`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#function-outneighbors-grphvert)
    - [`IncidentEdges(u): GrphVert → { GrphEdge}`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/adjacency-degree.md#function-incidentedges-grphvert-3)
- [Connectedness](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/connectedness-path-circuit.md)
  - [Connectedness in a Graph](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/connectedness-path-circuit.md#connectedness-in-a-graph)
    - [`IsConnected(G): GrphUnd → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/connectedness-path-circuit.md#function-isconnected-grphund)
    - [`Components(G): GrphUnd → [ { GrphVert} ]`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/connectedness-path-circuit.md#function-components-grphund)
    - [`Component(u): GrphVert → Grph`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/connectedness-path-circuit.md#function-component-grphvert)
    - [`IsSeparable(G): GrphUnd → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/connectedness-path-circuit.md#function-isseparable-grphund)
    - [`IsBiconnected(G): GrphUnd → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/connectedness-path-circuit.md#function-isbiconnected-grphund)
    - [`CutVertices(G): Grph → { GrphVert}`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/connectedness-path-circuit.md#function-cutvertices-grph)
    - [`Bicomponents(G): GrphUnd → [GrphUnd]`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/connectedness-path-circuit.md#function-bicomponents-grphund)
  - [Connectedness in a Digraph](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/connectedness-path-circuit.md#connectedness-in-a-digraph)
    - [`IsStronglyConnected(G): GrphDir → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/connectedness-path-circuit.md#function-isstronglyconnected-grphdir)
    - [`IsWeaklyConnected(G): GrphDir → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/connectedness-path-circuit.md#function-isweaklyconnected-grphdir)
    - [`StronglyConnectedComponents(G): GrphDir → [ { GrphVert} ]`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/connectedness-path-circuit.md#function-stronglyconnectedcomponents-grphdir)
    - [`Component(u): GrphVert → Grph`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/connectedness-path-circuit.md#function-component-grphvert-2)
  - [Graph Triconnectivity](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/connectedness-path-circuit.md#graph-triconnectivity)
    - [`IsTriconnected(G): GrphUnd → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/connectedness-path-circuit.md#function-istriconnected-grphund)
    - [`Splitcomponents(G): GrphUnd → [ { GrphVert } ], [ [ GrphVert ]]`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/connectedness-path-circuit.md#function-splitcomponents-grphund)
    - [`SeparationVertices(G): GrphUnd → [ [ GrphVert ]], [ { GrphVert} ]`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/connectedness-path-circuit.md#function-separationvertices-grphund)
    - [Example: Triconnectivity of a Graph](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/connectedness-path-circuit.md#example-ex-1455c3)
  - [Maximum Matching in Bipartite Graphs](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/connectedness-path-circuit.md#maximum-matching-in-bipartite-graphs)
    - [`MaximumMatching(G): GrphUnd → [ { GrphEdge} ]`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/connectedness-path-circuit.md#function-graph-maximummatching)
    - [Example: Maximum Matching in a Bipartite Graph](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/connectedness-path-circuit.md#example-ex-251f2b)
  - [General Vertex and Edge Connectivity in Graphs and Digraphs](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/connectedness-path-circuit.md#general-vertex-and-edge-connectivity-in-graphs-and-digraphs)
    - [`VertexSeparator(G): Grph → [ GrphVert ]`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/connectedness-path-circuit.md#function-vertexseparator-grph)
    - [`VertexConnectivity(G): Grph → RngIntElt, [ GrphVert ]`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/connectedness-path-circuit.md#function-vertexconnectivity-grph)
    - [`IsKVertexConnected(G, k): Grph, RngIntElt → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/connectedness-path-circuit.md#function-iskvertexconnected-grph-rngintelt)
    - [`EdgeSeparator(G): Grph → [ GrphEdge ]`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/connectedness-path-circuit.md#function-edgeseparator-grph)
    - [`EdgeConnectivity(G): Grph → RngIntElt, [ GrphEdge ]`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/connectedness-path-circuit.md#function-edgeconnectivity-grph)
    - [`IsKEdgeConnected(G, k): Grph, RngIntElt → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/connectedness-path-circuit.md#function-iskedgeconnected-grph-rngintelt)
    - [Example: Vertex and Edge Connectivity](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/connectedness-path-circuit.md#example-ex-c02f9d)
- [Distances, Paths, and Circuits in a Graph](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/path-circuit-graph.md)
  - [Distances, Paths, and Circuits in a Possibly Weighted Graph](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/path-circuit-graph.md#distances-paths-and-circuits-in-a-possibly-weighted-graph)
    - [`Reachable(u, v): GrphVert, GrphVert → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/path-circuit-graph.md#function-reachable-grphvert-grphvert)
    - [`Distance(u, v): GrphVert, GrphVert → RngIntElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/path-circuit-graph.md#function-distance-grphvert-grphvert)
    - [`Geodesic(u, v): GrphVert, GrphVert → [GrphVert]`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/path-circuit-graph.md#function-geodesic-grphvert-grphvert)
  - [Distances, Paths, and Circuits in a Non-Weighted Graph](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/path-circuit-graph.md#distances-paths-and-circuits-in-a-non-weighted-graph)
    - [`Diameter(G): Grph → RngIntElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/path-circuit-graph.md#function-diameter-grph)
    - [`DiameterPath(G): Grph → [GrphVert]`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/path-circuit-graph.md#function-diameterpath-grph)
    - [`Ball(u, n): GrphVert, RngIntElt → { GrphVert}`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/path-circuit-graph.md#function-ball-grphvert-rngintelt)
    - [`Sphere(u, n): GrphVert, RngIntElt → { GrphVert}`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/path-circuit-graph.md#function-sphere-grphvert-rngintelt)
    - [`DistancePartition(u): GrphVert → [ { GrphVert} ]`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/path-circuit-graph.md#function-distancepartition-grphvert)
    - [`IsEquitable(G, P): GrphUnd, { { GrphVert}} → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/path-circuit-graph.md#function-isequitable-grphund-grphvert)
    - [`IsEquitable(G, P): GrphUnd, { { RngIntElt}} → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/path-circuit-graph.md#function-isequitable-grphund-rngintelt)
    - [`EquitablePartition(P, G): { { GrphVert}}, GrphUnd → { { GrphVert}}`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/path-circuit-graph.md#function-equitablepartition-grphvert-grphund)
    - [`EquitablePartition(P, G): { { RngIntElt}}, GrphUnd → { { GrphVert}}`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/path-circuit-graph.md#function-equitablepartition-rngintelt-grphund)
    - [`Girth(G): GrphUnd → RngIntElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/path-circuit-graph.md#function-girth-grphund)
    - [`GirthCycle(G): GrphUnd → [GrphVert]`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/path-circuit-graph.md#function-girthcycle-grphund)
- [Maximum Flow, Minimum Cut, and Shortest Paths](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/flow.md)
- [Matrices and Vector Spaces Associated with a Graph or Digraph](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/matrix-vector-space.md)
  - [`AdjacencyMatrix(G): Grph → AlgMatElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/matrix-vector-space.md#function-adjacencymatrix-grph)
  - [`DistanceMatrix(G): Grph → AlgMatElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/matrix-vector-space.md#function-distancematrix-grph)
  - [`IncidenceMatrix(G): Grph → ModHomElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/matrix-vector-space.md#function-incidencematrix-grph)
  - [`IntersectionMatrix(G, P): GrphUnd, { { GrphVert}} → AlgMatElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/matrix-vector-space.md#function-intersectionmatrix-grphund-grphvert)
  - [`IntersectionMatrix(G, P): GrphUnd, { { RngIntElt}} → AlgMatElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/matrix-vector-space.md#function-intersectionmatrix-grphund-rngintelt)
- [Spanning Trees of a Graph or Digraph](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/spanning-tree.md)
  - [`SpanningTree(G): GrphUnd → Grph, GrphVertSet, GrphEdgeSet`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/spanning-tree.md#function-spanningtree-grphund)
  - [`SpanningForest(G): Grph → Grph, GrphVertSet, GrphEdgeSet`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/spanning-tree.md#function-spanningforest-grph)
  - [`BreadthFirstSearchTree(u): GrphVert → Grph, GrphVertSet, GrphEdgeSet`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/spanning-tree.md#function-breadthfirstsearchtree-grphvert)
  - [`BFSTree(u): GrphVert → Grph`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/spanning-tree.md#function-bfstree-grphvert)
  - [`DepthFirstSearchTree(u): GrphVert → Grph, GrphVertSet, GrphEdgeSet, SeqEnum`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/spanning-tree.md#function-depthfirstsearchtree-grphvert)
  - [`DFSTree(u): GrphVert → Grph, GrphVertSet, GrphEdgeSet, SeqEnum`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/spanning-tree.md#function-dfstree-grphvert)
- [Directed Trees](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/directed-tree.md)
  - [`IsRootedTree(G): GrphDir → BoolElt, GrphVert`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/directed-tree.md#function-isrootedtree-grphdir)
  - [`Root(G): GrphDir → GrphVert`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/directed-tree.md#function-root-grphdir)
  - [`IsRoot(v): GrphVert → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/directed-tree.md#function-isroot-grphvert)
  - [`RootSide(v): GrphVert → GrphVert`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/directed-tree.md#function-rootside-grphvert)
  - [`VertexPath(u,v): GrphVert, GrphVert → SeqEnum`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/directed-tree.md#function-vertexpath-grphvert-grphvert)
  - [`BranchVertexPath(u,v): GrphVert, GrphVert → SeqEnum`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/directed-tree.md#function-branchvertexpath-grphvert-grphvert)
- [Colourings](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/colouring.md)
  - [`ChromaticNumber(G): GrphUnd → RngIntElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/colouring.md#function-chromaticnumber-grphund)
  - [`OptimalVertexColouring(G): GrphUnd → SeqEnum`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/colouring.md#function-optimalvertexcolouring-grphund)
  - [`ChromaticIndex(G): GrphUnd → RngIntElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/colouring.md#function-chromaticindex-grphund)
  - [`OptimalEdgeColouring(G): GrphUnd → SeqEnum`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/colouring.md#function-optimaledgecolouring-grphund)
  - [`ChromaticPolynomial(G): GrphUnd → RngUPolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/colouring.md#function-chromaticpolynomial-grphund)
  - [Example: Chromatic Number](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/colouring.md#example-ex-8c2867)
- [Cliques, Independent Sets](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/clique-independent-set.md)
  - [`HasClique(G, k): GrphUnd, RngIntElt → BoolElt, { GrphVert }`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/clique-independent-set.md#function-hasclique-grphund-rngintelt)
  - [`HasClique(G, k, m : parameters): GrphUnd, RngIntElt, BoolElt → BoolElt, { GrphVert }`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/clique-independent-set.md#function-hasclique-grphund-rngintelt-boolelt)
  - [`HasClique(G, k, m, f : parameters): GrphUnd, RngIntElt, BoolElt, RngIntElt → BoolElt, { GrphVert }`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/clique-independent-set.md#function-hasclique-grphund-rngintelt-boolelt-rngintelt)
  - [`MaximumClique(G : parameters): GrphUnd → { GrphVert }`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/clique-independent-set.md#function-maximumclique-grphund)
  - [`CliqueNumber(G : parameters): GrphUnd → RngIntElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/clique-independent-set.md#function-cliquenumber-grphund)
  - [`AllCliques(G : parameters): GrphUnd → SeqEnum`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/clique-independent-set.md#function-allcliques-grphund)
  - [`AllCliques(G, k : parameters): GrphUnd, RngIntElt → SeqEnum`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/clique-independent-set.md#function-allcliques-grphund-rngintelt)
  - [`AllCliques(G, k, m : parameters): GrphUnd, RngIntElt, BoolElt → SeqEnum`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/clique-independent-set.md#function-allcliques-grphund-rngintelt-boolelt)
  - [`MaximumIndependentSet(G: parameters): GrphUnd → { GrphVert }`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/clique-independent-set.md#function-maximumindependentset-grphund)
  - [`IndependenceNumber(G: parameters): GrphUnd → RngIntElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/clique-independent-set.md#function-independencenumber-grphund)
  - [Example: Cliques of a Graph](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/clique-independent-set.md#example-ex-8cd121)
- [Planar Graphs](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/planarity.md)
  - [`IsPlanar(G): GrphUnd → BoolElt, GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/planarity.md#function-isplanar-grphund)
  - [`Obstruction(G): GrphUnd → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/planarity.md#function-obstruction-grphund)
  - [`IsHomeomorphic(G : parameters): GrphUnd → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/planarity.md#function-ishomeomorphic-grphund)
  - [`Faces(G): GrphUnd → SeqEnum[GrphVert]`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/planarity.md#function-faces-grphund)
  - [`Face(u, v): GrphVert, GrphVert → SeqEnum`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/planarity.md#function-face-grphvert-grphvert)
  - [`Face(e): GrphEdge → SeqEnum`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/planarity.md#function-face-grphedge)
  - [`NFaces(G): GrphUnd → RngIntElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/planarity.md#function-nfaces-grphund)
  - [`NumberOfFaces(G): GrphUnd → RngIntElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/planarity.md#function-numberoffaces-grphund)
  - [`Embedding(G): GrphUnd → SeqEnum`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/planarity.md#function-embedding-grphund)
  - [`Embedding(v): GrphVert → SeqEnum`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/planarity.md#function-embedding-grphvert)
  - [`PlanarDual(G): GrphUnd → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/planarity.md#function-planardual-grphund)
  - [Example: Faces of a Planar Graph](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/planarity.md#example-ex-df235a)
- [Automorphism Group of a Graph or Digraph](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/automorphism-group-graph.md)
  - [The Automorphism Group Function](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/automorphism-group-graph.md#the-automorphism-group-function)
    - [`AutomorphismGroup(G : parameters): Grph → GrpPerm, GSet, GSet, PowMap, Map, Grph`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/automorphism-group-graph.md#function-graph-automorphismgroup)
  - [nauty Invariants](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/automorphism-group-graph.md#nauty-invariants)
    - [`IsPartitionRefined(G: parameters): Grph → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/automorphism-group-graph.md#function-ispartitionrefined-grph)
  - [Graph Colouring and Automorphism Group](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/automorphism-group-graph.md#graph-colouring-and-automorphism-group)
  - [Variants of Automorphism Group](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/automorphism-group-graph.md#variants-of-automorphism-group)
    - [`CanonicalGraph(G): Grph → Grph`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/automorphism-group-graph.md#function-canonicalgraph-grph)
    - [`EdgeGroup(G): Grph → GrpPerm, GSet`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/automorphism-group-graph.md#function-edgegroup-grph)
    - [`IsIsomorphic(G, H : parameters ): GrphDir, GrphDir → BoolElt, Map`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/automorphism-group-graph.md#function-isisomorphic-grphdir-grphdir)
    - [`IsIsomorphic(G, H : parameters ): GrphUnd, GrphUnd → BoolElt, Map`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/automorphism-group-graph.md#function-isisomorphic-grphund-grphund)
    - [Example: Automorphism Group and Canonical Graph](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/automorphism-group-graph.md#example-ex-bda3f8)
    - [Example: Isomorphism of Coloured Graphs](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/automorphism-group-graph.md#example-ex-4bd4fd)
  - [Action of Automorphisms](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/automorphism-group-graph.md#action-of-automorphisms)
    - [`Image(a, Y, y): GrpPermElt, GSet, Elt → Elt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/automorphism-group-graph.md#function-image-grppermelt-gset-elt)
    - [`Orbit(A, Y, y): GrpPerm, GSet, Elt → GSet`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/automorphism-group-graph.md#function-orbit-grpperm-gset-elt)
    - [`Orbits(A, Y): GrpPerm, GSet → [ GSet ]`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/automorphism-group-graph.md#function-orbits-grpperm-gset)
    - [`Stabilizer(A, Y, y): GrpPerm, GSet, Elt → GrpPerm`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/automorphism-group-graph.md#function-stabilizer-grpperm-gset-elt)
    - [`Action(A, Y): GrpPerm, GSet → Hom(Grp), GrpPerm, GrpPerm`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/automorphism-group-graph.md#function-action-grpperm-gset)
    - [`ActionImage(A, Y): GrpPerm, GSet → GrpPerm`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/automorphism-group-graph.md#function-actionimage-grpperm-gset)
    - [`ActionKernel(A, Y): GrpPerm, GSet → GrpPerm`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/automorphism-group-graph.md#function-actionkernel-grpperm-gset)
    - [Example: Automorphisms of the Clebsch Graph](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/automorphism-group-graph.md#example-ex-ec7c11)
- [Symmetry and Regularity Properties of Graphs](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/symmetry-regularity.md)
  - [`IsTransitive(G): GrphUnd → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/symmetry-regularity.md#function-graph-istransitive)
  - [`IsVertexTransitive(G): GrphUnd → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/symmetry-regularity.md#function-isvertextransitive-grphund)
  - [`IsEdgeTransitive(G): GrphUnd → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/symmetry-regularity.md#function-isedgetransitive-grphund)
  - [`OrbitsPartition(G): GrphUnd → [ { GrphVert} ]`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/symmetry-regularity.md#function-orbitspartition-grphund)
  - [`IsPrimitive(G): GrphUnd → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/symmetry-regularity.md#function-isprimitive-grphund)
  - [`IsSymmetric(G): GrphUnd → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/symmetry-regularity.md#function-issymmetric-grphund)
  - [`IsDistanceTransitive(G): GrphUnd → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/symmetry-regularity.md#function-isdistancetransitive-grphund)
  - [`IsDistanceRegular(G): GrphUnd → BoolElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/symmetry-regularity.md#function-isdistanceregular-grphund)
  - [`IntersectionArray(G): GrphUnd → [RngIntElt]`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/symmetry-regularity.md#function-intersectionarray-grphund)
  - [Example: Symmetry of the 8-Cube Graph](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/symmetry-regularity.md#example-ex-2c631b)
- [Graph Databases and Graph Generation](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-databases.md)
  - [Strongly Regular Graphs](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-databases.md#strongly-regular-graphs)
    - [`StronglyRegularGraphsDatabase() → DB`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-databases.md#function-stronglyregulargraphsdatabase)
    - [`Classes(D): DB → SeqEnum`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-databases.md#function-classes-db)
    - [`NumberOfClasses(D): DB → RngIntElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-databases.md#function-numberofclasses-db)
    - [`NumberOfGraphs(D): DB → RngIntElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-databases.md#function-numberofgraphs-db)
    - [`NumberOfGraphs(D, S): DB, SeqEnum → RngIntElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-databases.md#function-numberofgraphs-db-seqenum)
    - [`Graphs(D, S): DB, SeqEnum → SeqEnum`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-databases.md#function-graphs-db-seqenum)
    - [`Graph(D, S, i): DB, SeqEnum, RngIntElt → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-databases.md#function-graph-db-seqenum-rngintelt)
    - [`RandomGraph(D): DB → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-databases.md#function-randomgraph-db)
    - [`RandomGraph(D, S): DB, SeqEnum → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-databases.md#function-randomgraph-db-seqenum)
    - [`for G in D do ... end for;`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-databases.md#literal-literal-for-for-g-in-d-do-end-for)
    - [Example: Database of Strongly Regular Graphs](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-databases.md#example-ex-a88364)
  - [Small Graphs](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-databases.md#small-graphs)
    - [Creation of Small Graph Databases](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-databases.md#creation-of-small-graph-databases)
      - [`SmallGraphDatabase(n : parameters): RngIntElt → DB`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-databases.md#function-smallgraphdatabase-rngintelt)
      - [`EulerianGraphDatabase(n : parameters): RngIntElt → DB`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-databases.md#function-euleriangraphdatabase-rngintelt)
      - [`PlanarGraphDatabase(n): RngIntElt → DB`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-databases.md#function-planargraphdatabase-rngintelt)
      - [`SelfComplementaryGraphDatabase(n): RngIntElt → DB`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-databases.md#function-selfcomplementarygraphdatabase-rngintelt)
    - [Access functions](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-databases.md#access-functions)
      - [`# D: DB → RngIntElt`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-databases.md#operation-operation-db-rngintelt)
      - [`Graph(D, i): DB, RngIntElt → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-databases.md#function-graph-db-rngintelt)
      - [`Random(D): DB → GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-databases.md#function-random-db)
      - [`for G in D do ... end for;`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-databases.md#literal-literal-for-for-g-in-d-do-end-for-2)
  - [Generating Graphs](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-databases.md#generating-graphs)
    - [`GenerateGraphs(n : parameters): RngIntElt → IO`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-databases.md#function-generategraphs-rngintelt)
    - [`NextGraph(I: parameters): IO → BoolElt, GrphUnd`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-databases.md#function-graph-nextgraph)
    - [Example: Graph Generation](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-databases.md#example-ex-56c803)
  - [A General Facility](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-databases.md#a-general-facility)
    - [`OpenGraphFile(s, f, p): MonStgElt, RngIntElt, RngIntElt → IO`](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-databases.md#function-opengraphfile-monstgelt-rngintelt-rngintelt)
    - [Example: Reading a Graph File](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/graph-databases.md#example-ex-49cbde)
- [Bibliography](https://docs.magma-maths.org/v2.30-1/Combinatorics/Graphs/bibliography.md)
