Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
GraphTheory[RandomGraphs][RandomRegularGraph]
Calling Sequence
RandomRegularGraph(n,d)
RandomRegularGraph(n,d,connected)
Parameters
n
-
positive integer or list of vertices
d
nonnegative integer
connected
(literal) flag to indicate that the generated graph should be connected.
Description
RandomRegularGraph(n,d) creates a d-regular undirected unweighted graph on n vertices. n and d cannot both be odd and d must satisfy d < n.
If the option connected is specified, the graph created will be connected. n and d must then satisfy n = 1 and d = 0, or n = 2 and d = 1, or n > 2 and d > 1 as well as the above.
For RandomRegularGraph(n,d,connected), a random tree with maximum degree <= d is first created.
For generating weighted graphs use weights = f and see AssignEdgeWeights for details about f.
The random number generator used can be seeded using the randomize function.
Examples
f := proc() local x; x := U(); if x=1 then 1 else 2 fi end:
See Also
AssignEdgeWeights, GraphTheory[IsConnected], GraphTheory[WeightMatrix], RandomBipartiteGraph, RandomDigraph, RandomGraph, RandomNetwork, RandomTournament, RandomTree
Download Help Document