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

Chess Board and rectangles


How many rectangles you can see ?

  • you have on the upper side of the chess board 8 indivisible squares ,  7 points belongs to the edge and to the frontiers separating the squares , plus 2 points at the corners .  then if you want define a side of a rectangle you need to choose 2 points out of the 9 points belonging to the upper side. the order doesn’t matter , we will use combination : :  finally we have 9! / ( 2! * 7!) combinations
  • you can apply the same reasoning on the left side of the Chess Board
  • at the end you have 9! / ( 2! * 7!) * 9! / ( 2! * 7!) rectangles and squares (which are technically rectangle) but if you want only and only rectangle you can subtract the  number of squares with the formula defined in the previous post about Chess Board and squares :

Chess board and squares

pascal rocaHow many squares do you see on this picture ?

  • Obviously 64 of size 1
  • 1 of size 8
  • Horizontally from top left corner or from top right corner, you can build a side of length 7. Identically it could be done vertically, meaning that 4 squares of length 7 are fitting in the chess board
  • Same reasoning applies to the other size

    Finally the number of squares fitting in a chess board is :  chessBoardSquaresFormula