格点路径计数(不越过 y=x)
Number of paths from two points
题目详情
只允许向上 或向右 走。求从 到 的格点路径数,要求路径在过程中不穿越直线 (可在其上)。
We allow steps up or right . Count the lattice paths from to that do not cross . (Known as the Catalan-type path counting.)
解析
这是 Ballot / Catalan 型计数。对 ,从 到 且始终满足 的路径数为
这里 ,因此