Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

Hypergraph

Guides

  • Hypergraph Functionality

Tech Notes

  • Hypergraph Rewriting

Symbols

  • AdjacencyHypergraph
  • AdjacencyTensor
  • CanonicalHypergraph
  • CanonicalHypergraphRule
  • ConnectedHypergraphQ
  • CyclicEdge
  • EdgeListTagged
  • EdgeMultiplicity
  • EdgeSymmetry
  • EnumerateHypergraphRules
  • EnumerateHypergraphs
  • EnumerateOrderedHypergraphs
  • EnumerateWolframModelRules
  • HighlightRule
  • HyperedgeList
  • Hyperedge
  • Hyperedges
  • HyperedgesQ
  • Hypergraph3D
  • HypergraphArityReduce
  • HypergraphDraw
  • HypergraphEmbedding
  • HypergraphHadamardProduct
  • HypergraphIncidenceMatrix
  • HypergraphIncidence
  • HypergraphInsertionBracketDegree
  • HypergraphInsertionBracket
  • HypergraphInsertion
  • HypergraphLargeQ
  • Hypergraph
  • HypergraphQ
  • HypergraphRuleDraw
  • HypergraphRule
  • HypergraphRuleQ
  • HypergraphToGraph
  • HypergraphTransitionMatrix
  • HypergraphUnion
  • HypermatrixGraph
  • Hypermatrix
  • HypermatrixQ
  • IncidenceHypergraph
  • IsomorphicHypergraphQ
  • KoszulSign
  • LinkedHypergraph
  • OrderedHypergraphToGraph
  • RandomAllHypergraph
  • RandomConnectedHypergraph
  • RandomHypergraph
  • RandomHypergraphRule
  • SetHypergraphSummaryThresholds
  • SimpleHypergraph
  • SimpleHypergraphPlot3D
  • SimpleHypergraphPlot
  • SimpleHypergraphQ
  • ToLabeledEdges
  • ToLabeledPatternEdges
  • ToOrderedHypergraph
  • ToPatternRules
WolframInstitute`Hypergraph`
RandomConnectedHypergraph
​
RandomConnectedHypergraph
[{n,{{
m
1
,
a
1
},{
m
2
,
a
2
},…}}]
gives a pseudorandom connected hypergraph on at most n atoms with
𝑚
1
hyperedges of arity
𝑎
1
,
𝑚
2
hyperedges of arity
𝑎
2
, etc.
​
​
RandomConnectedHypergraph
[{
Automatic
,{{
m
1
,
a
1
},…}}]
picks n uniformly at random, up to the largest atom count a connected hypergraph of that signature can use.
​
Details and Options
▪
Unlike
RandomHypergraph
, the atom count and the signature are bundled into a single list argument
{n,sig}
, and
RandomConnectedHypergraph
takes no options.
▪
RandomConnectedHypergraph
returns a bare list of hyperedges over the atoms 0 through n - 1, not a
Hypergraph
object; wrap the result in
Hypergraph
to get one.
▪
The construction is direct, not rejection sampling: it draws the hyperedges, then repeatedly merges any disconnected pieces by identifying a random atom from one piece with a random atom from another, so the result is connected by construction.
▪
With
Automatic
, n is a random integer between 1 and
Total[Times@@@sig]-Total[sig〚All,1〛]+1
, the largest atom count for which a connected hypergraph of the signature is possible (one shared atom per extra hyperedge).
▪
Use
SeedRandom
to get a reproducible result.
​
Examples  
(6)
Basic Examples  
(1)
Generate a pseudorandom connected hypergraph on at most five atoms with three binary hyperedges:
In[1]:=
SeedRandom[1];
RandomConnectedHypergraph
[{5,{{3,2}}}]
Out[1]=
{{1,2},{1,0},{1,4}}
Scope  
(1)

Properties & Relations  
(3)

Possible Issues  
(1)

SeeAlso
RandomAllHypergraph
 
▪
RandomHypergraph
 
▪
Hypergraph
 
▪
ConnectedHypergraphQ
RelatedGuides
▪
HypergraphFunctionality
""

© 2026 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com