Possible Duplicate:
Counting number of moves on a grid
I'm trying to solve this computer programming problem on Project Euler: http://projecteuler.net/index.php?section=problems&id=15
Starting in the top left corner of a $2\times2$ grid, there are 6 routes (without backtracking) to the bottom right corner.
How many routes are there through a $20\times20$ grid?
I've seen a solution using nCr, where n = 40 and r = 20.
Could someone explain to me how this work, please?