# Dyck Word in 3d¶

3d DyckWords

Generalisation of Dyck Word to Surface of cubes in the n x n x n cube above the plane x+y+z=2n.

EXAMPLES:

sage: from slabbe.dyck_3d import DyckBlocks3d
sage: L = [len(DyckBlocks3d(i)) for i in range(1, 7)]    # not tested
[1, 2, 9, 96, 2498, 161422]

sage: L = [1, 2, 9, 96, 2498, 161422]
sage: oeis.find_by_subsequence(L)                        # not tested internet
0: A115965: Number of planar subpartitions of size n pyramidal planar partition.


AUTHOR:

• Sébastien Labbé, 31 october 2014
slabbe.dyck_3d.DyckBlocks3d(n)

EXAMPLES:

sage: from slabbe.dyck_3d import DyckBlocks3d
sage: L = [len(DyckBlocks3d(i)) for i in range(1, 6)]
sage: L
[1, 2, 9, 96, 2498]

slabbe.dyck_3d.Possible(n)

Possible stack of DyckWords inside a n x n cube.

EXAMPLES:

sage: from slabbe.dyck_3d import Possible
sage: Possible(1)
The Cartesian product of ({[1, 0]},)
sage: Possible(2)
The Cartesian product of ({[1, 1, 0, 0]}, {[1, 0, 1, 0], [1, 1, 0, 0]})
sage: Possible(3).list()
[([1, 1, 1, 0, 0, 0], [1, 1, 0, 1, 0, 0], [1, 0, 1, 0, 1, 0]),
([1, 1, 1, 0, 0, 0], [1, 1, 0, 1, 0, 0], [1, 0, 1, 1, 0, 0]),
([1, 1, 1, 0, 0, 0], [1, 1, 0, 1, 0, 0], [1, 1, 0, 0, 1, 0]),
([1, 1, 1, 0, 0, 0], [1, 1, 0, 1, 0, 0], [1, 1, 0, 1, 0, 0]),
([1, 1, 1, 0, 0, 0], [1, 1, 0, 1, 0, 0], [1, 1, 1, 0, 0, 0]),
([1, 1, 1, 0, 0, 0], [1, 1, 1, 0, 0, 0], [1, 0, 1, 0, 1, 0]),
([1, 1, 1, 0, 0, 0], [1, 1, 1, 0, 0, 0], [1, 0, 1, 1, 0, 0]),
([1, 1, 1, 0, 0, 0], [1, 1, 1, 0, 0, 0], [1, 1, 0, 0, 1, 0]),
([1, 1, 1, 0, 0, 0], [1, 1, 1, 0, 0, 0], [1, 1, 0, 1, 0, 0]),
([1, 1, 1, 0, 0, 0], [1, 1, 1, 0, 0, 0], [1, 1, 1, 0, 0, 0])]

slabbe.dyck_3d.is_larger_than(x, y)

EXAMPLES:

sage: from slabbe.dyck_3d import is_larger_than
sage: w = DyckWord([1,1,1,0,0,0])
sage: w.heights()
(0, 1, 2, 3, 2, 1, 0)
sage: z = DyckWord([1,0,1,0,1,0])
sage: is_larger_than(w,z)
True
sage: is_larger_than(z,w)
False
sage: is_larger_than(w,w)
True