Maths Olympiad Prep

Library / /20 of 24

Combinatorics Difficulty 7.2 National Olympiad, round 2 Prove it Canada

Problem:

Centuries ago, the pirate Captain Blackboard buried a vast amount of treasure in a single cell of an M×NM \times N (2M,N2 \leq M, N) grid-structured island. You and your crew have reached the island and have brought special treasure detectors to find the cell with the treasure. For each detector, you can set it up to scan a specific subgrid [a,b]×[c,d][a, b] \times [c, d] with 1abM1 \leq a \leq b \leq M and 1cdN1 \leq c \leq d \leq N. Running the detector will tell you whether the treasure is in the region or not, though it cannot say where in the region the treasure was detected. You plan on setting up QQ detectors, which may only be run simultaneously after all QQ detectors are ready. In terms of MM and NN, what is the minimum QQ required to guarantee your crew can determine the location of Blackboard's legendary treasure?

Solutions — 2

Solution 1

Solution:

Let m=M2m=\left\lceil\frac{M}{2}\right\rceil and n=N2n=\left\lceil\frac{N}{2}\right\rceil. We claim that the minimal QQ is m+nm+n.

For the construction, start with mm detectors covering [i,i+m1]×[1,N][i, i+m-1] \times [1, N] for 1im1 \leq i \leq m. For every pair of rows, there is a detector that covers one row but not the other, hence this determines the row of the treasure. Similarly, placing nn detectors covering [1,M]×[i,i+n1][1, M] \times [i, i+n-1] for 1in1 \leq i \leq n determines the column, and thus the location of the treasure.

For the bound, we require the following lemma.

Lemma. A 1×k1 \times k island requires at least k2\left\lceil\frac{k}{2}\right\rceil detectors.

Proof. Consider the k1k-1 lines separating the cells. If one of these lines is not covered by any detector, then these cells are indistinguishable. Similarly, if neither of the vertical lines at the ends are covered, then the first and last cells are indistinguishable. In particular, at least kk vertical lines need to be covered by the detectors. A detector covers 2 vertical lines, giving the result.

In general, consider the first row. Since the cells are distinguishable, by the lemma there must be at least nn detectors that intersect it non-trivially (as in, cover between 1 and N1N-1 of the cells). The analogous result holds for the last row and the first/last columns, giving 2m+2n2m+2n detectors, where a detector may be counted multiple times.

If a detector intersected at least three of these sets, say it intersected the first row and the first and last columns. Therefore it covers the entire width of the island, and does not actually distinguish any cells in the first row, contradiction.

Therefore each detector contributes to at most 2 of the above 2m+2n2m+2n detectors, giving the final lower bound of 2m+2n2=m+n\frac{2m+2n}{2}=m+n detectors required, as desired.

Solution 2

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)}}S_{\mathrm{CR}} := \{\{(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)}}S_{\mathrm{CC}} := \{\{(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},1iN1}S_{\mathrm{R}} := \{\{(x,i),(x,i+1)\} : x \in \{1, M\}, 1 \leq i \leq N-1\}, i.e. the pairs of adjacent edges on the first/last row;
- SC:={{(i,x),(i+1,x)}:1iM1,x{1,N}}S_{\mathrm{C}} := \{\{(i,x),(i+1,x)\} : 1 \leq i \leq M-1, x \in \{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)\left(x_{\mathrm{CR}}, x_{\mathrm{CC}}, x_{\mathrm{R}}, x_{\mathrm{C}}\right), where xix_{\mathrm{i}} is the number of pairs of cells in SiS_{\mathrm{i}} for which the detector covers exactly one of the two cells. The possible scores of the detectors are as follows:

What the detector hitsScore
No edges(0,0,0,0)(0,0,0,0)
One edge, no corners(0,0,2,0)(0,0,2,0) or (0,0,0,2)(0,0,0,2)
Two edges, no corners(0,0,4,0)(0,0,4,0) or (0,0,0,4)(0,0,0,4)
One corner(1,1,1,1)(1,1,1,1)
Two corners(2,0,2,0)(2,0,2,0) or (0,2,0,2)(0,2,0,2)
>2>2 corners or edges(0,0,0,0)(0,0,0,0)

In order to determine the treasure, the total component-wise sum of scores of the detectors needs to be at least (2,2,2N2,2M2)(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+2N2M+2N, and based on the analysis above, each detector adds a total component sum of at most 4, giving at least 2M+2N4=M+N2\left\lceil\frac{2M+2N}{4}\right\rceil = \left\lceil\frac{M+N}{2}\right\rceil detectors.

This is equal to M2+N2\left\lceil\frac{M}{2}\right\rceil + \left\lceil\frac{N}{2}\right\rceil except if both M,NM, 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,2N2,2M2)(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)(1,1,1,1), or two detectors scoring (2,0,2,0)(2,0,2,0) and (0,2,0,2)(0,2,0,2). This yields a total score of (2,2,2,2)(2,2,2,2), leaving us with achieving exactly (0,0,2N4,2M4)(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)(0,0,4,0) or (0,0,0,4)(0,0,0,4). But 2N4,2M42(mod4)2N-4, 2M-4 \equiv 2 \pmod{4}, which is a contradiction.

Therefore all situations require at least M2+N2\left\lceil\frac{M}{2}\right\rceil + \left\lceil\frac{N}{2}\right\rceil detectors.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.