# characteristicPolynomial -- computes the characteristic polynomial of a ranked poset with a unique minimal element

## Synopsis

• Usage:
p = characteristicPolynomial P
p = characteristicPolynomial(P, VariableName => symbol)
• Inputs:
• P, an instance of the type Poset, a ranked poset
• Optional inputs:
• VariableName => , default value q
• Outputs:
• p, , the characteristic polynomial of $P$

## Description

The characteristic polynomial of a ranked poset is the generating function with variable $q$ such that the coefficient of $q^r$ is the sum overall vertices of rank $r$ of the Moebius function of $v$.

The characteristic polynomial of the chain of $n$ is $q^{n-1}(q-1)$.

 i1 : n = 5; i2 : factor characteristicPolynomial chain n 3 o2 = (q) (q - 1) o2 : Expression of class Product

And the characteristic polynomial of the booleanLattice of $n$ is $(q-1)^n$.

 i3 : factor characteristicPolynomial booleanLattice n 5 o3 = (q - 1) o3 : Expression of class Product