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 1 of 5: When does a cell have a legal move
(x,y) has a legal move  ⟺  x≤100−k∨x≥k+1∨y≤100−k∨y≥k+1(x,y)\text{ has a legal move}\iff x\le100-k\lor x\ge k+1\lor y\le100-k\lor y\ge k+1
Detailed analysis

A kk-knight move changes one coordinate by ±1\pm1 and the other by ±k\pm k, and the sign of the ±1\pm1 part can always be chosen so that a coordinate already in [1,100][1,100] stays in range. Hence (x,y)(x,y) has at least one on-board move exactly when the kk-part can be applied to xx or to yy, that is, when x≤100−kx\le100-k or x≥k+1x\ge k+1 or y≤100−ky\le100-k or y≥k+1y\ge k+1. Since every move is reversible, the same condition governs whether (x,y)(x,y) has any on-board move at all, incoming or outgoing.