-
Notifications
You must be signed in to change notification settings - Fork 4
Graph Constructors
Ed Scheinerman edited this page Mar 1, 2023
·
12 revisions
The SimpleGraph
module provides functions to create a wide variety of graphs.
-
Complete(n)
: complete graph with vertex set{1,2,...,n}
. -
Complete(n,m)
: complete bipartite graph. -
Complete([n1,n2,n3,...,nk])
: complete multipartite graph.
-
Path(n)
: path graph with vertices{1,2,...,n}
. AlsoPath(list)
. -
Cycle(n)
: cycle graph with vertices{1,2,...,n}
. -
Wheel(n)
: wheel graph withn
vertices. -
Grid(n,m)
:n
-by-m
grid graph. -
Cube(n)
: hypercube with2^n
vertices.
-
Dodecahedron()
: 1-skeleton of a dodecahedron. -
Icosahedron()
: 1-skeleton of an icosahedron. -
Octahedron()
: 1-skeleton of an octahedron. -
Tetrahedron()
: Same asComplete(4)
. -
Spindle()
: Moser's spindle graph. -
Golomb()
: Golomb's graph. -
- Note: The function
is_unit_distance
determines if the (embedded) graph is a unit distance graph.
- Note: The function
-
BuckyBall()
: molecular graph of Buckminsterfullerene (soccer ball).
-
Petersen()
: Petersen's graph. -
Kneser(n,k)
: Kneser graph. -
Johnson(n,k)
: Johnson graph. -
Knight(n,m)
: Knight's move graph onn
-by-m
chess board. -
Paley(p)
: Paley graph for primes congruent to 1 mod 4.
-
RandomGraph(n,p=0.5)
: Erdos-Renyi random graph. -
RandomTree(n)
: random tree withn
vertices. See alsoprufer_code
andprufer_restore
. -
RandomRegular(n,d)
: randomd
-regular graph withn
vertices. -
RandomSBM(...)
: random stochastic block model graph (various calling conventions).
-
Doyle()
: Doyle/Holt graph. -
Hoffman()
: Hoffman graph. -
HoffmanSingleton()
: Hoffman-Singleton graph. -
Tutte()
: Tutte graph (planar, 3-connected, 3-regular, non-Hamiltonian).