Darwin Help

Back to Index

RegularGraph

Function RegularGraph - generate a random regular graph

Calling Sequence  RegularGraph(n,e)
Parameters
NameTypeDescription

n integeroptional number of nodes/vertices
e integeroptional number of edges
Return Type  Graph
Synopsis Generate a random graph where each of the n vertices has the same degree e. The product n*e must be even.
Examples
> RegularGraph(5,2);
Graph(Edges(Edge(0,1,2),Edge(0,1,4),Edge(0,2,5),Edge(0,3,4),Edge(0,3,5)),Nodes(1,2,3,4,5))
See also BipartiteGraph,   Clique,   DrawGraph,   Edge,   EdgeComplement,   Edges,   FindConnectedComponents,   Graph,   Graph_Rand,   InduceGraph,   MaxCut,   MaxEdgeWeightClique,   MST,   Nodes,   Path,   ShortestPath,   TetrahedronGraph,   VertexCover