How many ways are there to walk from A to B by only moving rightward or upward?
I believe I remember how to do this, but.......someone will have to check me on it !!!.....
In any m x n grid, there are C ( m + n , m) paths to the right and upward, assuming that we start at the lower left vertex of the grid and end up at the top right vertex.... or, alternatively, C ( m + n, n) paths......these should work out the same
So.....the first grid is a 2 x 3 grid, which means there are C ( 2 + 3, 2) = C ( 5, 2) = 10 paths from the lower left starting point and moving to the right and up to the intersection of the two grids .......this would be the same as C ( 2 + 3, 3) = C (5, 3) = 10
The next grid is a 4 x 3 grid.....which implies that there are C(4 + 3 , 3) = C(7, 3) = 35 paths which we can take [ moving in the specified manner ] from the intersection of the two grids to the top right vertex of the upper grid
So....the total paths become C(5,2) * C (7,3) = 10 * 35 = 350 distinct paths moving to the right and upward from the lower left vertex of the bottom grid to the upper left vertex of the top grid.
Here's a good website that presents the logic behind this........http://betterexplained.com/articles/navigate-a-grid-using-combinations-and-permutations/