PUMaC 2007 · 个人决赛(A 组) · 第 2 题
PUMaC 2007 — Individual Finals (Division A) — Problem 2
题目详情
- 有一个的方格表,其中填入了非负整数。对于表中每个为 0 的格子,与其在同一行或同一列的元素之和至少为 2007。求此类方格表中所有元素之和的最小值。
英文原题
- We have a 2007 × 2007 square table filled with nonnegative integers. For each entry of 0 in the
table, the sum of the elements that are in the same row or column as that entry is at least 2007.
Find the minimum sum of all the elements of such a table.
解析
表格,每个 0 所在行列之和(不含自身)至少 2007。求最小总和。
设第一行(除 外)全为 ,第一列(除 外)全为 ,,其余全 0。共有 个零。
对 的零:, ,需 。总和 。
取 达到下界。
最小总和:。
英文解析
table with nonnegative integers. For each 0 entry, the sum of its row and column (excluding the 0 itself, but including all other entries in that row and column) is at least 2007. Find minimum total sum.
Let the table entries be . Total sum .
For each zero entry at , let (row sum) and (col sum). The condition is . Since , this is .
Key observation: If there are many zeros, each zero forces . We want to minimize .
Lower bound construction: Place 2007 in the first row and first column (except the entry which can be 0). Specifically:
- for
- for
- All other for
There are zeros at positions with . For each such zero: , , so . This FAILS the condition!
Revised construction: Make the first row and column have large enough values. Let for , for , and . For : .
Row sums: , for .
Col sums: , for .
For zero at (): . ✓
For zero at : is huge, easily ≥ 2007. ✓
Total sum .
Optimality: For each zero , . Summing over all zeros: . Each row sum is counted once for each zero in that row. If row has zeros: , where is zeros in column .
The minimum is achieved by the construction above, giving .
Wait — can we do better? The constraint is only on zeros. If we avoid zeros more cleverly, we might reduce the sum. The extreme case: put 0 at only one position, say . Then . The minimum sum for this single-zero case: minimize subject to . This is achieved by with all other entries 0, giving . But then the entry itself: if it's 0, then its row sum includes , and col sum includes . If everything else is 0, means but , so impossible. The row/col sum condition at the zero IS the sum of the OTHER entries. So we need , and includes everything in row 1, includes everything in col 1.
OK, the simplest possible: put only ONE zero at . Put nothing else in row 1 or col 1 except what's needed to satisfy the constraint. Let , . Need . With , need . Minimize total sum . Since we can make all other entries 0 and just adjust and : set , all others 0. Then , . ✓. Total .
But wait: is the only zero? Yes: all other entries are non-zero (they're 0 but 0 is allowed to be "non-zero"? No, the condition is only about entries that ARE zero. If we set for , then those are ALSO zeros, and the condition applies to them too! Every zero in the table needs its row+col sum ≥ 2007.
So if we set all for (to minimize sum), then all of those entries are zeros, and each needs its row sum + col sum ≥ 2007. This forces total sum to be large.
The optimal construction balances the number of zeros with the required row/col sums. The construction with first row entries = , first col entries = , , all others 0:
- zeros (all except first row/col non-diagonal entries)
- For : , , need .
- , , need (for zero), automatically satisfied.
- .
Can we do better by making some entries non-zero? If we set for some , those entries become non-zero (no zero condition applies), but the sum goes up by 1. The benefit: one fewer zero to satisfy. The cost: +1. The zero condition requires , which typically costs much more than 1. So making entries non-zero (to reduce zeros) only helps if it enables much smaller row/col sums. But making a single entry non-zero barely changes row/col sums.
The lower bound is tight with the construction above. So minimum is .