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).