MathLabs

Problem 2

Consider a 100×100100\times100 table, and identify the cell in row aa and column bb, 1≤a,b≤1001\le a,b\le100, with the ordered pair (a,b)(a,b). Let kk be an integer such that 51≤k≤9951\le k\le99. A kk-knight is a piece that moves one cell vertically or horizontally and kk cells in the other direction; that is, it moves from (a,b)(a,b) to (c,d)(c,d) such that (∣a−c∣,∣b−d∣)(|a-c|,|b-d|) is either (1,k)(1,k) or (k,1)(k,1). The kk-knight starts at cell (1,1)(1,1) and performs several moves. A sequence of moves is a sequence of cells (x0,y0)=(1,1),(x1,y1),…,(xn,yn)(x_0,y_0)=(1,1),(x_1,y_1),\ldots,(x_n,y_n) such that, for all i=1,2,…,ni=1,2,\ldots,n, 1≤xi,yi≤1001\le x_i,y_i\le100 and the kk-knight can move from (xi−1,yi−1)(x_{i-1},y_{i-1}) to (xi,yi)(x_i,y_i). In this case each cell (xi,yi)(x_i,y_i) is said to be reachable. For each kk, find L(k)L(k), the number of reachable cells.
Step 5 of 5: Parity invariant decides the answer
L(k)=1002−(2k−100)2 (k even),L(k)=12(1002−(2k−100)2) (k odd)L(k)=100^2-(2k-100)^2\ (k\text{ even}),\qquad L(k)=\tfrac12\big(100^2-(2k-100)^2\big)\ (k\text{ odd})
Detailed analysis

A single kk-knight move changes x+yx+y by ±(k−1)\pm(k-1) or ±(k+1)\pm(k+1), both of the same parity as k+1k+1. If kk is odd, k+1k+1 is even, so x+y mod 2x+y\bmod2 is invariant and only the (1002−(2k−100)2)/2\big(100^2-(2k-100)^2\big)/2 cells outside SS sharing (1,1)(1,1)'s color are reachable. If kk is even, k+1k+1 is odd, so a single move already reaches a cell of the opposite color, and the previous step applied to that color shows every remaining cell outside SS is reachable too; hence all 1002−(2k−100)2100^2-(2k-100)^2 cells outside SS are reachable.