next | previous | forward | backward | up | top | index | toc | Macaulay2 website
SimplicialComplexes :: fVector

fVector -- the f-vector of a simplicial complex

Synopsis

Description

The pentagonal bipyramid has 7 vertices, 15 edges and 10 triangles.
i1 : R = ZZ[a..g];
i2 : bipyramid = simplicialComplex monomialIdeal(
           a*g, b*d, b*e, c*e, c*f, d*f)

o2 = | efg bfg deg cdg bcg aef abf ade acd abc |

o2 : SimplicialComplex
i3 : f = fVector bipyramid

o3 = HashTable{-1 => 1}
               0 => 7
               1 => 15
               2 => 10

o3 : HashTable
i4 : f#0

o4 = 7
i5 : f#1

o5 = 15
i6 : f#2

o6 = 10
Every simplicial complex other than the void complex has a unique face of dimension -1.
i7 : void = simplicialComplex monomialIdeal 1_R

o7 = 0

o7 : SimplicialComplex
i8 : fVector void

o8 = HashTable{-1 => 0}

o8 : HashTable
For a larger examp;le we consider the polarization of an artinian monomial ideal from section 3.2 in Miller-Sturmfels, Combinatorial Commutative Algebra.
i9 : S = ZZ[x_1..x_4, y_1..y_4, z_1..z_4];
i10 : I = monomialIdeal(x_1*x_2*x_3*x_4,
                 y_1*y_2*y_3*y_4,
                 z_1*z_2*z_3*z_4,
                 x_1*x_2*x_3*y_1*y_2*z_1,
                 x_1*y_1*y_2*y_3*z_1*z_2,
                 x_1*x_2*y_1*z_1*z_2*z_3);

o10 : MonomialIdeal of S
i11 : D = simplicialComplex I;
i12 : fVector D

o12 = HashTable{-1 => 1 }
                0 => 12
                1 => 66
                2 => 220
                3 => 492
                4 => 768
                5 => 837
                6 => 609
                7 => 264
                8 => 51

o12 : HashTable
The boundary of the 3-dimensional cross-polytope is 3-colorable. If we define this simplicial complex over a Z^3-graded ring we can ask for its flag f-vector.
i13 : grading = {{1,0,0},{1,0,0},{0,1,0},{0,1,0},{0,0,1},{0,0,1}};
i14 : S = ZZ[x_1..x_6, Degrees => grading];
i15 : I = monomialIdeal(x_1*x_2,x_3*x_4,x_5*x_6);

o15 : MonomialIdeal of S
i16 : fVector simplicialComplex I

o16 = HashTable{-1 => 1}
                0 => 6
                1 => 12
                2 => 8

o16 : HashTable
i17 : fVector(simplicialComplex I, Flag => true)

o17 = HashTable{{0, 0, 0} => 1}
                {0, 0, 1} => 2
                {0, 1, 0} => 2
                {0, 1, 1} => 4
                {1, 0, 0} => 2
                {1, 0, 1} => 4
                {1, 1, 0} => 4
                {1, 1, 1} => 8

o17 : HashTable

The f-vector is computed using the Hilbert series of the Stanley-Reisner ideal. For example, see Hosten and Smith's chapter Monomial Ideals, in Computations in Algebraic Geometry with Macaulay2, Springer 2001.

Caveat

The option Flag checks if the multigrading corresponds to a properly d-coloring of D, where d is the dimension of D plus one. If it is not the case the output is an empty HashTable.

See also

Ways to use fVector :

For the programmer

The object fVector is a method function with options.