Basic lattice paths
A path from to using only unit steps right and up requires exactly right-steps and up-steps, in some order — so the count is just the number of ways to arrange that sequence of steps:
Paths around a blocked point
To count paths that avoid a blocked square, use the complement: count all paths to the destination, then subtract the paths that pass through the blocked point. The number of paths through a specific point splits into two independent legs — start to blocked point, blocked point to destination — multiplied together:
With multiple blocked squares, this becomes an inclusion-exclusion problem: subtract paths through each blocked point, add back paths through pairs of blocked points (double-subtracted), and so on.
Diagonal-move paths
If diagonal moves are allowed alongside right/up moves, there's no clean closed form — instead, build up the count recursively, since the number of paths to a cell equals the sum of paths to the three cells that could step into it:
Worked example
Problem: How many paths from to (right/up steps only) avoid passing through ?
Solution: Total paths: . Paths through :
Paths avoiding : .
Practice problems
1.How many lattice paths are there from to using only right and up steps?
2.How many paths from to pass through the point ?
3.How many paths from to avoid the point ?
4.How many paths from to use only right, up, and diagonal (up-right) unit steps?