
Lattice Paths
Starting in the top left corner of a $2 \times 2$ grid, and only being able to move to the right and down, there are exactly $6$ routes to the bottom right corner.

How many such routes are there through a $20 \times 20$ grid?
Starting in the top left corner of a $2 \times 2$ grid, and only being able to move to the right and down, there are exactly $6$ routes to the bottom right corner.
How many such routes are there through a $20 \times 20$ grid?
Nel caso 2x2, i possibili percorsi sono dati dagli anagrammi delle mosse che dobbiamo compiere, ovvero due verso il basso (sud, sud) e due verso destra (est, est). Quindi
\[ \text{\# anagrammi SSEE} = \frac{4!}{2! \cdot 2!} = 6 \]Allo stesso modo, nel caso 20x20 avremo da calcolare gli anagrammi della parola S..SE..E
BigInt(factorial(big(40)) / (factorial(big(20)) * factorial(big(20))))
137846528820