# isRanked -- determines if a poset is ranked

## Synopsis

• Usage:
i = isRanked P
• Inputs:
• P, an instance of the type Poset,
• Outputs:
• i, , whether $P$ is ranked

## Description

The poset $P$ is ranked if there exists an integer function $r$ on the vertex set of $P$ such that for each $a$ and $b$ in the poset if $b$ covers $a$ then $r(b) - r(a) = 1$.

The $n$ chain and the $n$ booleanLattice are ranked.

 i1 : n = 5; i2 : C = chain n; i3 : isRanked C o3 = true i4 : rankFunction C o4 = {0, 1, 2, 3, 4} o4 : List i5 : B = booleanLattice n; i6 : isRanked B o6 = true i7 : rankGeneratingFunction C 4 3 2 o7 = q + q + q + q + 1 o7 : ZZ[q]

However, the pentagon lattice is not ranked.

 i8 : P = poset {{1,2}, {1,3}, {3,4}, {2,5}, {4,5}}; i9 : isRanked P o9 = false

This method uses the method rankPoset, which was ported from John Stembridge's Maple package available at http://www.math.lsa.umich.edu/~jrs/maple.html#posets.

• rankFunction -- computes the rank function of a ranked poset
• rankGeneratingFunction -- computes the rank generating function of a ranked poset
• rankPoset -- generates a list of lists representing the ranks of a ranked poset

## Ways to use isRanked :

• "isRanked(Poset)"

## For the programmer

The object isRanked is .