Solution:
The following alternative approach from CMO competitor Marvin Mao of Bergen County Academies is another full solution.
Take the same construction as in Solution 1. For the bound, consider the following sets:
- SCR:={{(1,1),(1,N)},{(M,1),(M,N)}}, i.e. the pairs of corners on the same row;
- SCC:={{(1,1),(M,1)},{(1,N),(M,N)}}, i.e. the pairs of corners on the same column;
- SR:={{(x,i),(x,i+1)}:x∈{1,M},1≤i≤N−1}, i.e. the pairs of adjacent edges on the first/last row;
- SC:={{(i,x),(i+1,x)}:1≤i≤M−1,x∈{1,N}}, i.e. the pairs of adjacent edges on the first/last column.
For each detector, we assign it a score (xCR,xCC,xR,xC), where xi is the number of pairs of cells in Si for which the detector covers exactly one of the two cells. The possible scores of the detectors are as follows:
In order to determine the treasure, the total component-wise sum of scores of the detectors needs to be at least
(2,2,2N−2,2M−2), since we need to tell apart each of the pairs of cells. The sum of these components is
2M+2N, and based on the analysis above, each detector adds a total component sum of at most 4, giving at least
⌈42M+2N⌉=⌈2M+N⌉ detectors.
This is equal to ⌈2M⌉+⌈2N⌉ except if both M,N are odd. In this case, if there is at least one more detector, then we have the required bound, so assume otherwise. In particular, we must achieve exactly the score (2,2,2N−2,2M−2), with each detector contributing 4 to the total component sum.
In particular, to fill out the first two components, we must either have two detectors scoring (1,1,1,1), or two detectors scoring (2,0,2,0) and (0,2,0,2). This yields a total score of (2,2,2,2), leaving us with achieving exactly (0,0,2N−4,2M−4) from the rest. Since we cannot have a non-zero score in the first two entries and must have a total component sum of 4, we can only use detectors scoring (0,0,4,0) or (0,0,0,4). But 2N−4,2M−4≡2(mod4), which is a contradiction.
Therefore all situations require at least ⌈2M⌉+⌈2N⌉ detectors.