ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 07 Jan 2021 18:21:18 +0100Counting lattice path with Sagehttps://ask.sagemath.org/question/55175/counting-lattice-path-with-sage/ Quite newbie with Sage but I try to count very standard lattice path with steps (1,0) and (0,1) on a grin (0,0) to (m,n) for positive integers n and m. I want also put constraints like for example "not touching the main. diagonal".
I can program it but maybe there are Sage libraries that can help me?
Thanks for any suggestions
GianfrancooldaniThu, 07 Jan 2021 18:21:18 +0100https://ask.sagemath.org/question/55175/Constructing all NE-lattice paths from $(0,0)$ to $(m,n)$https://ask.sagemath.org/question/46087/constructing-all-ne-lattice-paths-from-00-to-mn/If I consider only [Dyck Paths](http://mathworld.wolfram.com/DyckPath.html), I can do write something like this:
DWS=DyckWords(3).list()
for D in DWS:
print(D.height())
to obtain the height of all Dyck paths of length $3$. However, I would like to do the same thing but using [$NE$-lattice paths](https://en.wikipedia.org/wiki/Lattice_path#North-East_lattice_paths) from $(0,0)$ to $(m,n)$. Is there an easy way to do this in Sage?joakim_uhlinThu, 11 Apr 2019 08:50:27 +0200https://ask.sagemath.org/question/46087/