几个世纪前,海盗船长黑板在 网格结构的岛屿上的一个单元格中埋藏了一大笔宝藏。你和你的船员已经到达了岛屿,并带来了特殊的宝藏探测器来找到藏有宝藏的单元格。对于每个探测器,你可以设置它扫描一个特定的子网格 ,其中 和 。运行探测器会告诉你宝藏是否在该区域内,但它不能说明宝藏在该区域的具体位置。你计划设置 个探测器,这些探测器只能在所有 个探测器都准备好后同时运行。用 和 表示,最少需要多少个 才能保证你的船员可以确定黑板传奇宝藏的位置?
Solution
Let and . We claim that the minimal is . For the construction, start with detectors covering for . 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 detectors covering for determines the column, and thus the location of the treasure.
For the bound, we require the following lemma.
Lemma. A island requires at least detectors.
Proof. Consider the 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 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 detectors that intersect it non-trivially (as in, cover between 1 and of the cells). The analogous result holds for the last row and the first/last columns, giving 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 detectors, giving the final lower bound of detectors required, as desired.