Difference between revisions of "2023 SSMO Team Round Problems/Problem 9"

(Created page with "==Problem== Let <math>B</math>, <math>K</math>, and <math>R</math> be the total number of possible moves for a bishop, knight, or rook from any position of a <math>9</math> by...")
 
Line 7: Line 7:
  
 
==Solution==
 
==Solution==
 +
 +
We first compute <math>R</math>. Note that from any of the 81 squares, the rook can move to another 16 squares. Thus, <cmath>R = 16 \cdot 81 = 1296.</cmath>
 +
 +
We now present an alternative method that generalizes well to bishops and knights. Define an <math>(i,j)</math>-move as a move that shifts <math>i</math> squares to the right and <math>j</math> squares up.
 +
 +
There are exactly <cmath>(9 - |i|)(9 - |j|)</cmath> possible ways to perform such a move, since the piece must start in a position where it can legally make that move within the bounds of the board.
 +
 +
The total number of possible moves is the sum over all legal <math>(i,j)</math>-moves.
 +
 +
The rook can perform moves of the type <math>(0,i)</math> and <math>(i,0)</math> for integers <math>i \ne 0</math>, with <math>-8 \le i \le 8</math>.
 +
 +
So,
 +
<cmath>R = 4 \cdot \sum_{i=1}^{8} 9(9 - i) = 4 \cdot 9 \cdot \frac{8 \cdot 9}{2} = 1296,</cmath>
 +
matching our earlier computation.
 +
 +
The bishop can perform moves of the type <math>(i,i)</math> and <math>(-i,i)</math> for <math>1 \le i \le 8</math>, so
 +
<cmath>B = 4 \cdot \sum_{i=1}^{8} (9 - i)^2 = 4 \cdot \frac{8 \cdot 9 \cdot 17}{6} = 4 \cdot 12 \cdot 17 = 816.</cmath>
 +
 +
The knight can perform moves of the type <math>(\pm1, \pm2)</math> and <math>(\pm2, \pm1)</math>. For each such pair, the number of legal positions is:
 +
<cmath>K = 8 \cdot (9 - 2)(9 - 1) = 8 \cdot 7 \cdot 8 = 448.</cmath>
 +
 +
The final answer is:
 +
<cmath>B + K + R = 816 + 448 + 1296 = \boxed{2560}.</cmath>

Revision as of 21:24, 9 September 2025

Problem

Let $B$, $K$, and $R$ be the total number of possible moves for a bishop, knight, or rook from any position of a $9$ by $9$ grid. Find $B + K + R$.

(A bishop moves along diagonals, a rook moves along rows, and a knight moves in the form of a $2 \times 1$ "L" shape)

Solution

We first compute $R$. Note that from any of the 81 squares, the rook can move to another 16 squares. Thus, \[R = 16 \cdot 81 = 1296.\]

We now present an alternative method that generalizes well to bishops and knights. Define an $(i,j)$-move as a move that shifts $i$ squares to the right and $j$ squares up.

There are exactly \[(9 - |i|)(9 - |j|)\] possible ways to perform such a move, since the piece must start in a position where it can legally make that move within the bounds of the board.

The total number of possible moves is the sum over all legal $(i,j)$-moves.

The rook can perform moves of the type $(0,i)$ and $(i,0)$ for integers $i \ne 0$, with $-8 \le i \le 8$.

So, \[R = 4 \cdot \sum_{i=1}^{8} 9(9 - i) = 4 \cdot 9 \cdot \frac{8 \cdot 9}{2} = 1296,\] matching our earlier computation.

The bishop can perform moves of the type $(i,i)$ and $(-i,i)$ for $1 \le i \le 8$, so \[B = 4 \cdot \sum_{i=1}^{8} (9 - i)^2 = 4 \cdot \frac{8 \cdot 9 \cdot 17}{6} = 4 \cdot 12 \cdot 17 = 816.\]

The knight can perform moves of the type $(\pm1, \pm2)$ and $(\pm2, \pm1)$. For each such pair, the number of legal positions is: \[K = 8 \cdot (9 - 2)(9 - 1) = 8 \cdot 7 \cdot 8 = 448.\]

The final answer is: \[B + K + R = 816 + 448 + 1296 = \boxed{2560}.\]