North-east lattice path recurrence

ID: north-east-lattice-path-recurrence

For positive integers , the north-east lattice path recurrence is
The boundaries have only straight north-east lattice paths. The origin counts the zero-step north-east lattice path once.[ref]
Proof outline. A north-east lattice path ending at has a final step either from or from . Deleting that step gives a shorter north-east lattice path; appending it reverses the operation. The two classes are disjoint and exhaust all possibilities, so the rule of sum adds their counts. At , the arrivals from contribute , while those from contribute : altogether .
Set if either integer coordinate is negative. Then the same recurrence relation applies on the nonnegative axes away from : one predecessor contributes one, and the other contributes zero. Initialize separately; applying the recurrence relation there would incorrectly give zero.
Computing the grid once in increasing order of is dynamic programming: every entry uses two earlier entries. If a specified point is forbidden, set its count to zero, then continue the same recurrence relation at allowed points. This counts north-east lattice paths avoiding the forbidden points, provided the origin and endpoint are allowed. The last-step argument remains valid because appending a step to an allowed endpoint cannot visit any new intermediate integer lattice point.

New to topics? Read the docs here!