RandomGraph
A uniformly-chosen simple undirected Graph with n vertices and exactly m edges.
✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram Language
RandomGraph✓RandomGraph({n, m})n vertices, m edges, no self-loop or parallel edge; unevaluated if m exceeds C(n, 2).Typed signatures
| Type | Package | Applies |
|---|---|---|
(any) random -> value | combinatorics | always |
Details
- Drawn by a Fisher-Yates shuffle of the C(n, 2) possible edges, taking the first m -- from the SAME seeded stream RandomInteger uses (see list-frontier.ts), reseeded together by SeedRandom. NOT Wolfram's own generator or algorithm: only VertexCount / EdgeCount / simplicity are guaranteed to match, the same divergence RandomInteger's own reference entry documents.
Examples
About
| Examples | 1 |
|---|---|
| Checked against | Wolfram Language 1 agree |
| Crosswalk | Wolfram Language |
See also: RandomInteger, SeedRandom