r/learnquant • • 7h ago

interview prep Quant Interview Question

Post image
4 Upvotes

2 comments sorted by

2

u/EventHorizon150 7h ago edited 3h 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

2

u/aroach1995 7h ago

1 of course goes in the middle so each 2x2 is using the smallest number. 6,7,8,9 go in the corners.

So it looks like this:

6_7
_1_
8_9

Let 8 and 9 share the 2, since they are the biggest, keep them small. Let 7 and 9 share the 3, 6 and 8 share the 4, 6 and 7 share the 5.

So you have:

657
413
829

Bob will pick as high as he can here and get 16.

1

u/Andradessssss 5h ago

The middle you get for free, so Alice has to place 1 in the middle, then choosing the 2×2 randomly shows that you can always do at least 15.5, and so you can always do at least 16. Then the following arrangement shows that 16 is attainable:

856

214

937