I would like to create one large graph with two communities that have high internal connectivity and very weak (though tunable) connectivity between them. I am attempting to create two fully connected graphs and then join them together with a specific number of new edges, which can be connected at random to vertices in each graph.
So far, I'm just able to create the two graphs
NN = 10;
SNsub1 = RandomGraph[{NN/2, Binomial[NN/2, 2]}];
SNsub2 = RandomGraph[{NN/2, Binomial[NN/2, 2]}];
and then fully join them to each other (all vertices in one get connected to all vertices in the other):
SNtest =
GraphComputation`GraphJoin[SNsub1, SNsub2, VertexLabels -> "Name",
ImagePadding -> 10, GraphLayout -> "MultipartiteEmbedding"]
Is there a way to do a `partial random join' between them?
Alternatively, is there some other way to achieve my real goal: a graph with two communities in which I can reliably tune the ratio of the intracommunity and intercommunity connectivities?