返回题库

整数子集表示

Find the smallest subset of integers

专题
Discrete Math / 离散数学
难度
L4

题目详情

求最小规模的整数子集,使得可仅用“+”或“-”(且每个数最多使用一次)表示出 1,2,,401,2,\ldots,40

英文原题

Find the smallest subset of integers that you can use to produce 1,2,..., 40 by only using “+” or “- ” (each number in the subset can be used at most one time).

解析

若子集有 kk 个数,每个数可“+用 / -用 / 不用”三种状态,所以最多得到 3k3^k 个不同和值。

要覆盖 1401\sim 40(连同对应负数与 0,至少需要 81 个值:4040-40\sim 40),故

3k81k4.3^k\ge 81\Rightarrow k\ge 4.

4 个数是否可行?取

{1,3,9,27}.\{1,3,9,27\}.

任意系数取 1,0,1-1,0,1,可得到平衡三进制表示,覆盖区间

(1+3+9+27)(1+3+9+27)=4040.-(1+3+9+27)\sim (1+3+9+27)= -40\sim 40.

因此最小规模为 4,最小子集可取

{1,3,9,27}.\boxed{\{1,3,9,27\}}.

英文解析

If a subset has kk numbers, and each number can be in one of three states ("used plus", "used minus", or "not used"), then at most 3k3^k distinct sums can be obtained.

To cover the range 1401\sim 40 (including the corresponding negative numbers and 00, requiring at least 8181values: 4040-40\sim 40), we have

3k81k4.3^k\ge 81\Rightarrow k\ge 4.

Is k=4k=4 feasible? Taking

{1,3,9,27}.\{1,3,9,27\}.

By choosing any coefficients from {1,0,1}\{-1,0,1\}, we can obtain a balanced ternary representation, covering the interval

(1+3+9+27)(1+3+9+27)=4040.-(1+3+9+27)\sim (1+3+9+27)= -40\sim 40.

Thus, the minimum size is 44, and a possible minimum subset is

{1,3,9,27}.\boxed{\{1,3,9,27\}}.