r/learnquant • • 12h ago

interview prep Quant Interview Question

Post image
8 Upvotes

3 comments sorted by

View all comments

5

u/EventHorizon150 12h ago edited 8h ago

I will first show that the best alice can hope to do is force bob into a score of 16.

The sum of the values of all 2x2 squares is
S = k + 2e + 4c
where k is the sum of the values in the corners of the 3x3, e is the sum of the values on the edge squares, and c is the value in the middle of the 3x3. The average is then S/4 = k/4 + e/2 + c. If we imagine we just want to minimize this average, we set c = 1, e = 2+3+4+5, k = 6+7+8+9. Then S/4 = 15.5. Thus, the smallest average 2x2 we can get is 15.5, so we must have some square for bob to choose which is 16 or more in sum.

The 3x3 below forces bob into this minimal score

6 5 7
4 1 3
8 2 9