Macaulay2 » Documentation
Packages » AbstractSimplicialComplexes :: Calculations with random simplicial complexes
next | previous | forward | backward | up | index | toc

# Calculations with random simplicial complexes -- homological calculations on random simplicial complexes

In what follows we illustrate a collection of homological calculations that can be performed on random simplicial complexes.

Create a random abstract simplicial complex with vertices supported on a subset of $[n] = \{1,...,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

    i2 : prune HH simplicialChainComplex K

           1       1
    o2 = ZZ  <-- ZZ

         0       1

    o2 : Complex

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

    i3 : L = randomAbstractSimplicialComplex(6,3)

    o3 = 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}}

    o3 : AbstractSimplicialComplex

    i4 : prune HH simplicialChainComplex L

           1             1
    o4 = ZZ  <-- 0 <-- ZZ

         0       1     2

    o4 : Complex

Create the random simplicial complex $Y_d(n,m)$ which has vertex set $[n]$ and complete $(d − 1)$-skeleton, and has $m$ dimension $d$ faces, chosen at random from all $\binom{\binom{n}{d+1}}{m}$ possibilities.

    i5 : M = randomAbstractSimplicialComplex(6,3,2)

    o5 = 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 => {{2, 3, 4}, {3, 5, 6}, {4, 5, 6}}

    o5 : AbstractSimplicialComplex

    i6 : prune HH simplicialChainComplex M

           1       7
    o6 = ZZ  <-- ZZ

         0       1

    o6 : Complex

    i7 : N = randomAbstractSimplicialComplex(6,3,2,Verify => true)

    o7 = 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, 5}, {1, 3, 6}, {2, 4, 5}}

    o7 : AbstractSimplicialComplex

Creates a random subsimplicial complex of a given simplicial complex.

    i8 : K = randomAbstractSimplicialComplex(4)

    o8 = 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}, {1, 3, 4}, {2, 3, 4}}
                                   3 => {{1, 2, 3, 4}}

    o8 : AbstractSimplicialComplex

    i9 : J = randomSubSimplicialComplex(K)

    o9 = AbstractSimplicialComplex{-1 => {{}}     }
                                   0 => {{2}, {3}}
                                   1 => {{2, 3}}

    o9 : AbstractSimplicialComplex

    i10 : inducedSimplicialChainComplexMap(K,J)

                4                2
    o10 = 0 : ZZ  <----------- ZZ  : 0
                     | 0 0 |
                     | 1 0 |
                     | 0 1 |
                     | 0 0 |

                6              1
          1 : ZZ  <--------- ZZ  : 1
                     | 0 |
                     | 0 |
                     | 0 |
                     | 1 |
                     | 0 |
                     | 0 |

    o10 : ComplexMap

## See also

- randomAbstractSimplicialComplex -- create a random abstract simplicial complex
- randomSubSimplicialComplex -- create a random subsimplicial complex
- random -- get a random object
- RandomIdeals -- A package to construct various sorts of random ideals

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/AbstractSimplicialComplexes.m2:582:0.