GraphTheory
IsRegular
Calling Sequence
Parameters
Description
Examples
IsRegular(G)
IsRegular(G, d)
G
-
graph
d
(optional) name
An undirected graph G is regular if each vertex has the same degree. For example, CycleGraph(4) is a regular graph of degree 2.
The IsRegular command returns true if the graph is regular and false otherwise. If a name d is specified, then this name is assigned the degree of the graph. If the graph is not regular and a name is specified, then the name is assigned FAIL.
with⁡GraphTheory:
with⁡SpecialGraphs:
G≔Graph⁡1,2,1,3,2,3,3,4
G≔Graph 1: an undirected graph with 4 vertices and 4 edge(s)
DegreeSequence⁡G
2,2,3,1
IsRegular⁡G
false
P≔PetersenGraph⁡
P≔Graph 2: an undirected graph with 10 vertices and 15 edge(s)
DegreeSequence⁡P
3,3,3,3,3,3,3,3,3,3
IsRegular⁡P,r
true
r
3
DrawGraph⁡P
C≔ClebschGraph⁡
C≔Graph 3: an undirected graph with 16 vertices and 40 edge(s)
IsRegular⁡C,r
5
DrawGraph⁡C
See Also
Degree
DegreeSequence
IsStronglyRegular
MaximumDegree
MinimumDegree
Download Help Document