next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
RandomIdeals :: randomAddition

randomAddition -- Adds a random facet to a shellable complex

Synopsis

Description

This function randomly chooses a facet of size m+1 and checks whether the facet can be shellably added to the shelling. If it can be shellably added to the shelling, it is added to the shelling and the new shelling is returned. Otherwise, the process repeats up to 20 times.

This function can be used to randomly construct non-pure shellable complexes. A new m-simplex can only be glued to previous simplices of dimension at least m. If all previous simplices are smaller, then the addition will fail.

i1 : P={{1,2,3}}

o1 = {{1, 2, 3}}

o1 : List
i2 : P=randomAddition(6,2,P)

o2 = {{1, 2, 3}, {0, 1, 2}}

o2 : List
i3 : P=randomAddition(6,1,P)

o3 = {{1, 2, 3}, {0, 1, 2}, {0, 1}}

o3 : List

Caveat

If the input is not a shellable simplicial complex, the new complex will not be shellable. The function does not check whether the input is shellable.

See also

Ways to use randomAddition :