PathArrayPackage R

distro.spad line 168 [edit on github]

A package for weighted Motzkin paths over a ring.

bottom: Stream List R -> Stream R

bottom(x) returns the bottom entry of each column.

jacobiPathArray: (Stream R, Stream R) -> Stream List R

jacobiPathArray([b0, b1, ...], [c1, c2, ...]) computes Flajolet's Motzkin path array from the sequences [1, 1, …], bi, ci.

motzkinPathArray: (Stream R, Stream R, Stream R) -> Stream List R

motzkinPathArray([a0, a1, ...], [b0, b1, ...], [c1, c2, ...]) computes Flajolet's Motzkin path array from the sequences ai, bi, ci.