Grid Path Problems in Combinatorics
Problem 1
Consider an grid where you can only move right or down. There is an obstacle at . Find the number of ways to reach the bottom-right corner from the top-left corner while avoiding the obstacle.
Solution
-
Compute the number of paths ignoring the obstacle:
-
Compute the number of paths reaching :
-
Compute the number of paths from to :
-
By removing the paths that pass through the obstacle, the final count is:
Problem 2
Consider an grid where you can only move right or up. However, you are not allowed to step on any point where either or is odd. Find the total number of ways to reach the top-right corner from the bottom-left corner.
Solution
Since movement is restricted, we can only step on coordinates where both and are even. Effectively, the grid reduces to an grid where each move corresponds to a move in the smaller grid.
In the reduced grid, we must make exactly right moves and up moves to reach the top-right corner. The number of such paths is given by the binomial coefficient:
which represents the number of ways to choose right moves out of total moves.