MathDB
2015-2016 OMO Spring #18

Source:

March 29, 2016
Online Math Open

Problem Statement

Kevin is in kindergarten, so his teacher puts a 100×200100 \times 200 addition table on the board during class. The teacher first randomly generates distinct positive integers a1,a2,,a100a_1, a_2, \dots, a_{100} in the range [1,2016][1, 2016] corresponding to the rows, and then she randomly generates distinct positive integers b1,b2,,b200b_1, b_2, \dots, b_{200} in the range [1,2016][1, 2016] corresponding to the columns. She then fills in the addition table by writing the number ai+bja_i+b_j in the square (i,j)(i, j) for each 1i1001\le i\le 100, 1j2001\le j\le 200.
During recess, Kevin takes the addition table and draws it on the playground using chalk. Now he can play hopscotch on it! He wants to hop from (1,1)(1, 1) to (100,200)(100, 200). At each step, he can jump in one of 88 directions to a new square bordering the square he stands on a side or at a corner. Let MM be the minimum possible sum of the numbers on the squares he jumps on during his path to (100,200)(100, 200) (including both the starting and ending squares). The expected value of MM can be expressed in the form pq\frac{p}{q} for relatively prime positive integers p,qp, q. Find p+q.p + q.
Proposed by Yang Liu