# ncPartitions -- generates the non-crossing partitions of size $n$

## Synopsis

• Usage:
N = ncpPartitions n
• Inputs:
• n, an integer, the size of the set to partition
• Outputs:

## Description

A non-crossing partition of size $n$ is a partitioning of the set $\{0,\ldots,n-1\}$ into a finite number of non-empty disjoint pieces such that if $a < b$ belong to one part, and $c < d$ belong to a different part, then $a < b < c < d$, $a < c < d < b$, or $c < d < a < b$.

 i1 : ncPartitions 5 o1 = {01234, 0/1234, 0234/1, 0134/2, 0124/3, 0123/4, 01/234, 034/12, 014/23, ------------------------------------------------------------------------ 012/34, 04/123, 0/1/234, 0/134/2, 0/124/3, 0/123/4, 0/12/34, 0/14/23, ------------------------------------------------------------------------ 034/1/2, 024/1/3, 023/1/4, 02/1/34, 04/1/23, 014/2/3, 013/2/4, 01/2/34, ------------------------------------------------------------------------ 04/13/2, 012/3/4, 01/24/3, 04/12/3, 01/23/4, 03/12/4, 0/1/2/34, ------------------------------------------------------------------------ 0/1/24/3, 0/1/23/4, 0/14/2/3, 0/13/2/4, 0/12/3/4, 04/1/2/3, 03/1/2/4, ------------------------------------------------------------------------ 02/1/3/4, 01/2/3/4, 0/1/2/3/4} o1 : List

• ncpLattice -- computes the non-crossing partition lattice of set-partitions of size $n$