This method is not guaranteed to return a HyperGraph, even if one exists with the given edge sizes. This method searches for a hypergraph with the given edge sizes using a random recursive algorithm. Limits can be placed on the both number of recursive steps taken (see
BranchLimit) and on the time taken (see
TimeLimit). The method will return null if it cannot find a hypergraph within the branch and time limits.
i1 : R = QQ[x_1..x_5];
|
i2 : randomHyperGraph(R,{3,2,4})
o2 = HyperGraph{edges => {{x , x , x }, {x , x }, {x , x , x , x }}}
5 3 4 3 1 4 1 5 2
ring => R
vertices => {x , x , x , x , x }
1 2 3 4 5
o2 : HyperGraph
|
i3 : randomHyperGraph(R,{3,2,4})
o3 = HyperGraph{edges => {{x , x , x }, {x , x }, {x , x , x , x }}}
2 1 3 3 5 5 4 2 1
ring => R
vertices => {x , x , x , x , x }
1 2 3 4 5
o3 : HyperGraph
|
i4 : randomHyperGraph(R,{3,2,4})
o4 = HyperGraph{edges => {{x , x , x }, {x , x }, {x , x , x , x }}}
5 4 1 5 2 1 2 4 3
ring => R
vertices => {x , x , x , x , x }
1 2 3 4 5
o4 : HyperGraph
|
i5 : randomHyperGraph(R,{4,4,2,2}) -- impossible, returns null when time/branch limit reached
|