To reach cell , you came from either (from above) or (from left).
The number of paths to is the sum of paths to those two cells: .
Base case: The top row and left column each have exactly 1 path (you can only move in one direction).
(Sum of incoming paths)
To reach cell , you came from either (from above) or (from left).
The number of paths to is the sum of paths to those two cells: .
Base case: The top row and left column each have exactly 1 path (you can only move in one direction).