Chess Rook Paths and squares

pascal roca How many paths can a Rook travels from upper Left Corner to lower right corner : Well you can find a solution at it needs a little bit some explanations first about the case 8 * 8  : rookPath

  1.  First the rook will start at a8,  then to reach a8, there is only one path : staying at the same place
  2. the chess rook can move horizontally or vertically from 1 up to 8 (including is initial position)
  3. the table sum up the number of paths could be used by the  rook in order to reach the case, for example if  the rook want to reach e5 ( 838) , the rook can come only vertically from the case above e4 ( e5, e6, e7, e8) or horizontally from the left of e4 ( a4, b4, c4, d4 ) therefore to get the total number of paths to reach e4 is :  8+28+94+289+289+94+28 = 838 paths  for a square 5 * 5, we can calculate all the paths recursively
  4. Actually there are 470010 paths for a square 8*8
  5. In the Link provided above to the website , they are trying to calculate the generating function for the diagonal which is the number of paths for a square N * N.pascal roca
  6. let’s demonstrate after reading the post :( ) that the 2 variables generating function is  (1 – s – t  + st) / ( 1 – 2 *s  -2*t  + 3 *st )  for a square N*N
  7. pascal roca