# Tag Info

4

What does it mean to sample random graphs with certain properties? If the property applies to individual graphs, then "random" would mean that we assign the same probability to each graph that satisfies the property (and exclude the rest). Sampling from such a distribution is usually a difficult problem. It is literally a research-level problem for each ...

3

st[dist_, l1_, l2_] := Module[{rl1 = RandomVariate[dist, l1], rl2, t}, t = Tr@rl1; While[Tr[rl2 = RandomVariate[dist, l2]] != t]; {rl1, rl2}]; Usage: Create two lists of length 10 and 15 respectively from a Poisson distribution, such that sums of lists are same. {list1, list2} = st[PoissonDistribution, 10, 15]; {list1, list2} Tr/@% {{4,7,...

2

OK, stealing from my other answer here There's no need to immediately generate the complex numbers, so hold off. push[p1_, p2_] := If[p1 != p2, p1 + α (p1 - p2)/((p1 - p2).(p1 - p2))^β, p1]; spread[pts_] := Map[Normalize, (Outer[push[#1, #2] &, pts, pts, 1] // Transpose // Total)]; maxDot[pts_] := Map[Dot[#[], #[]] &, Permutations[pts, {2}]]...

Only top voted, non community-wiki answers of a minimum length are eligible