Macaulay2 » Documentation
Packages » AbstractSimplicialComplexes :: randomAbstractSimplicialComplex
next | previous | forward | backward | up | index | toc

randomAbstractSimplicialComplex -- create a random abstract simplicial complex

Description

Create a random abstract simplicial complex with vertices supported on a subset of $[n] = \{1,\dots ,n\}$.

i1 : K = randomAbstractSimplicialComplex(4)

o1 = AbstractSimplicialComplex{-1 => {{}}                                           }
                               0 => {{1}, {2}, {3}, {4}}
                               1 => {{1, 2}, {1, 3}, {1, 4}, {2, 3}, {2, 4}, {3, 4}}
                               2 => {{1, 2, 3}, {1, 2, 4}}

o1 : AbstractSimplicialComplex

Create a random simplicial complex on $[n]$ with dimension at most equal to r.

i2 : L = randomAbstractSimplicialComplex(6,3)

o2 = AbstractSimplicialComplex{-1 => {{}}                                                                                                                    }
                               0 => {{1}, {2}, {3}, {4}, {5}, {6}}
                               1 => {{1, 2}, {1, 3}, {1, 4}, {1, 5}, {1, 6}, {2, 3}, {2, 4}, {2, 5}, {2, 6}, {3, 4}, {3, 5}, {3, 6}, {4, 5}, {4, 6}, {5, 6}}
                               2 => {{1, 2, 3}, {1, 2, 5}, {1, 2, 6}, {1, 3, 4}, {1, 4, 6}, {2, 3, 6}, {2, 4, 6}, {2, 5, 6}, {3, 4, 5}, {3, 5, 6}, {4, 5, 6}}

o2 : AbstractSimplicialComplex

Create the random complex $Y_d(n,m)$ which has vertex set $[n]$ and $(d − 1)$-skeleton, and has $m$ $d$-dimensional faces, chosen at random from all $\binom{\binom{n}{d+1}{m}$ possibilities. Such random simplicial complexes appear in lots of different contexts including in the article Cohen-Lenstra heuristics for torsion in homology of random complexes by M. Kahle, F. H. Lutz, A. Newman, and K. Parsons [Exp. Math. vol. 29, no. 3 (2020)]. The output of the method may produce, in some cases, complexes which have fewer than $m$ faces of dimension $d$. Further, not all $d-1$ skeletons will be complete.

i3 : N = randomAbstractSimplicialComplex(6,3,2)

o3 = AbstractSimplicialComplex{-1 => {{}}                                           }
                               0 => {{2}, {4}, {5}, {6}}
                               1 => {{2, 4}, {2, 5}, {2, 6}, {4, 5}, {4, 6}, {5, 6}}
                               2 => {{2, 4, 5}, {2, 4, 6}, {4, 5, 6}}

o3 : AbstractSimplicialComplex

See also

Ways to use randomAbstractSimplicialComplex:

  • randomAbstractSimplicialComplex(ZZ)
  • randomAbstractSimplicialComplex(ZZ,ZZ)
  • randomAbstractSimplicialComplex(ZZ,ZZ,ZZ)

For the programmer

The object randomAbstractSimplicialComplex is a method function.


The source of this document is in AbstractSimplicialComplexes.m2:685:0.