Macaulay2 » Documentation
Packages » EdgeIdeals :: randomUniformHyperGraph
next | previous | forward | backward | up | index | toc

randomUniformHyperGraph -- returns a random uniform hypergraph

Synopsis

Description

This function allows one to create a uniform hypergraph on an underlying vertex set with a given number of randomly chosen edges of given cardinality.

i1 : R = QQ[x_1..x_9];
i2 : randomUniformHyperGraph(R,3,4)

o2 = HyperGraph{"edges" => {{x , x , x }, {x , x , x }, {x , x , x }, {x , x , x }}}
                              5   6   9     2   6   8     4   7   8     3   5   7
                "ring" => R
                "vertices" => {x , x , x , x , x , x , x , x , x }
                                1   2   3   4   5   6   7   8   9

o2 : HyperGraph
i3 : randomUniformHyperGraph(R,4,2)

o3 = HyperGraph{"edges" => {{x , x , x , x }, {x , x , x , x }}   }
                              2   3   4   9     2   3   4   8
                "ring" => R
                "vertices" => {x , x , x , x , x , x , x , x , x }
                                1   2   3   4   5   6   7   8   9

o3 : HyperGraph

See also

Ways to use randomUniformHyperGraph :

For the programmer

The object randomUniformHyperGraph is a method function.