Macaulay2 » Documentation
Packages » Posets :: fPolynomial
next | previous | forward | backward | up | index | toc

# fPolynomial -- computes the f-polynomial of a poset

- Usage:
    `f = fPolynomial P`
    `f = fPolynomial(P, VariableName => symbol)`
- Inputs:
  - P, an instance of the type Poset,
- Optional inputs:
  - VariableName => a symbol, default value q
- Outputs:
  - f, a ring element, the f-polynomial of $P$

## Description

The f-polynomial of $P$ is the polynomial such that the coefficient on $q^i$ is the number of chains of length $i$ in $P$.

The f-polynomial of the $n$ chain is $(q+1)^n$.

    i1 : n = 5;

    i2 : factor fPolynomial chain n

                5
    o2 = (q + 1)

    o2 : Expression of class Product

## See also

- chains -- computes all chains of a poset
- hPolynomial -- computes the h-polynomial of a poset

## Ways to use fPolynomial:

- `fPolynomial(Poset)`

## For the programmer

The object fPolynomial is a method function with options.

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