Maths Olympiad Prep

Track / Stage 8 / 61 of 180 #1761 of 1964

Problem 1761

IMO Shortlist mid-range; USAMO P2/P5
Number theory Difficulty 8.1 Prove it

111 Given a positive integer nn, it is known that using kk weights with masses that are positive integers and a balance can measure all items with masses of 1,2,3,⋯ ,n1, 2, 3, \cdots, n grams.
(1) Find the minimum value of kk, denoted as f(n)f(n).
(2) For which values of nn is the composition of the f(n)f(n) weights uniquely determined? Prove your conclusion.

This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.

Next problem →

Official solution

[Solution] (1) Let the mass numbers of these kk weights be a1,a2,⋯ ,aka_{1}, a_{2}, \cdots, a_{k}, and 1⩽a1⩽a2⩽⋯⩽ak,ai∈Z,1⩽i⩽k1 \leqslant a_{1} \leqslant a_{2} \leqslant \cdots \leqslant a_{k}, a_{i} \in \mathbb{Z}, 1 \leqslant i \leqslant k. Since weights can be placed on both sides of the balance, the mass that can be measured is
∑i=1kxiai,xi∈{−1,0,1}\sum_{i=1}^{k} x_{i} a_{i}, x_{i} \in\{-1,0,1\}.
If using these kk weights can measure the mass of items that are 1,2,⋯ ,n1,2, \cdots, n, then the above representation includes 1,2,⋯ ,n1,2, \cdots, n. By symmetry, it is easy to see that it also includes −1,−2,⋯ ,−n-1,-2, \cdots,-n. Therefore,
{∑i=1kxiai∣xi∈{−1,0,1}}⊇{0,±1,±2,⋯ ,±n}\left\{\sum_{i=1}^{k} x_{i} a_{i} \mid x_{i} \in\{-1,0,1\}\right\} \supseteq\{0, \pm 1, \pm 2, \cdots, \pm n\}

Since the number of elements in the set {∑i=1kxiai∣xi∈{−1,0,1}}\left\{\sum_{i=1}^{k} x_{i} a_{i} \mid x_{i} \in\{-1,0,1\}\right\} does not exceed 3k3^{k}, and the set {0,±1,±2,⋯ ,±n}\{0, \pm 1, \pm 2, \cdots, \pm n\} contains 2n+12 n+1 elements, therefore
3k⩾2n+1n⩽3k−12\begin{array}{l} 3^{k} \geqslant 2 n+1 \\ n \leqslant \frac{3^{k}-1}{2} \end{array}

If 3m−1−12<n⩽3m−12,(m⩾1,m∈Z)\frac{3^{m-1}-1}{2}<n \leqslant \frac{3^{m}-1}{2},(m \geqslant 1, m \in \mathbb{Z}), then k⩾mk \geqslant m.
 On the other hand, if 3m−1−12<n⩽3m−12,(m⩾1,m∈Z), then we can \text { On the other hand, if } \frac{3^{m-1}-1}{2}<n \leqslant \frac{3^{m}-1}{2},(m \geqslant 1, m \in \mathbb{Z}) \text {, then we can }

take mm weights: a1=1,a2=3,⋯ ,am=3m−1a_{1}=1, a_{2}=3, \cdots, a_{m}=3^{m-1} to measure all items with mass 1,2,⋯ ,n1,2, \cdots, n grams.

In fact, by the ternary representation of numbers, for any 0⩽p⩽3m−10 \leqslant p \leqslant 3^{m}-1, there exist yi∈{0,1,2},1⩽i⩽my_{i} \in\{0,1,2\}, 1 \leqslant i \leqslant m, such that
p=∑i=1′′yi3i−1p=\sum_{i=1}^{\prime \prime} y_{i} 3^{i-1}

Thus, p−3m−12=∑i=1myi⋅3i−1−∑i=1m3i−1p-\frac{3^{m}-1}{2}=\sum_{i=1}^{m} y_{i} \cdot 3^{i-1}-\sum_{i=1}^{m} 3^{i-1}
=∑i=1m(yi−1)3i−1=\sum_{i=1}^{m}\left(y_{i}-1\right) 3^{i-1}

Let l=p−3m−12l=p-\frac{3^{m}-1}{2}, then −3m−12⩽l⩽3m−12-\frac{3^{m}-1}{2} \leqslant l \leqslant \frac{3^{m}-1}{2};
Let xi=yi−1x_{i}=y_{i}-1, then xi∈{−1,0,1}x_{i} \in\{-1,0,1\}, thus, we have
l=∑i=1mxi⋅3i−1l=\sum_{i=1}^{m} x_{i} \cdot 3^{i-1}

Since n⩽3m−12n \leqslant \frac{3^{m}-1}{2}, for any l∈{1,2,⋯ ,n}l \in\{1,2, \cdots, n\}, there exist xi,1⩽i⩽mx_{i}, 1 \leqslant i \leqslant m, such that
l=∑i=1mxi⋅3i−1=∑i=1mxiail=\sum_{i=1}^{m} x_{i} \cdot 3^{i-1}=\sum_{i=1}^{m} x_{i} a_{i}

This means that using weights with mass 1,3,⋯ ,3m−11,3, \cdots, 3^{m-1}, we can measure all items with mass 1,2,⋯ ,n1,2, \cdots, n grams, where n⩽3m−12n \leqslant \frac{3^{m}-1}{2}.

In summary, the minimum value of kk is f(n)=mf(n)=m, where mm satisfies the inequality 3m−1−12<n⩽3m−12\frac{3^{m-1}-1}{2}<n \leqslant \frac{3^{m}-1}{2}.
(2) First, prove that when 3m−1−12<n<3m−12\frac{3^{m-1}-1}{2}<n<\frac{3^{m}-1}{2}, the composition of f(n)f(n) weights, besides the one already mentioned in (1):
a1=1,a2=3,⋯ ,am=3m−1, there is at least one more way: a1=1,a2=3,⋯ ,am−1=3m−2,am=3m−1−1.\begin{array}{l} a_{1}=1, a_{2}=3, \cdots, a_{m}=3^{m-1} \text {, there is at least one more way: } \\ a_{1}=1, a_{2}=3, \cdots, a_{m-1}=3^{m-2}, a_{m}=3^{m-1}-1 . \end{array}

In fact, if 1⩽l⩽3m−1−121 \leqslant l \leqslant \frac{3^{m-1}-1}{2}, then by (1), there exist xi∈{−1,0,1}x_{i} \in\{-1,0,1\}, such that
l=∑i=1m−1xi⋅3i−1=∑i=1m−1xi⋅3i−1+0⋅(3m−1−1). If 3m−1−12<l⩽n<3m−12, then l+1⩽3m−12,\begin{array}{l} l=\sum_{i=1}^{m-1} x_{i} \cdot 3^{i-1} \\ \quad=\sum_{i=1}^{m-1} x_{i} \cdot 3^{i-1}+0 \cdot\left(3^{m-1}-1\right) . \\ \text { If } \frac{3^{m-1}-1}{2}<l \leqslant n<\frac{3^{m}-1}{2} \text {, then } l+1 \leqslant \frac{3^{m}-1}{2}, \end{array}

Thus, by (1), there exist xi∈{−1,0,1}x_{i} \in\{-1,0,1\}, such that
l+1=∑i=1mxi⋅3i−1l+1=\sum_{i=1}^{m} x_{i} \cdot 3^{i-1}

And it must be that xm=1x_{m}=1. Thus,
l=∑i=1m−1xi⋅3i−1+1⋅(3m−1−1)l=\sum_{i=1}^{m-1} x_{i} \cdot 3^{i-1}+1 \cdot\left(3^{m-1}-1\right)

Therefore, using weights a1=1,a2=3,⋯ ,am−1=3m−2,am=3m−1−1a_{1}=1, a_{2}=3, \cdots, a_{m-1}=3^{m-2}, a_{m}=3^{m-1}-1 can measure all items with mass 1,2,⋯ ,n1,2, \cdots, n grams. Thus, in this case, the composition of f(n)f(n) weights is not unique.

Next, prove that when n=3m−12n=\frac{3^{m}-1}{2}, the composition of f(n)f(n) weights is unique, i.e., ai=3i−1(1⩽i⩽m)a_{i}=3^{i-1}(1 \leqslant i \leqslant m).

In fact, if mm weights a1,a2,⋯ ,ama_{1}, a_{2}, \cdots, a_{m} can measure all items with mass 1,2,⋯ ,n=3m−121,2, \cdots, n=\frac{3^{m}-1}{2} grams, then for each −3m−12⩽l⩽3m−12-\frac{3^{m}-1}{2} \leqslant l \leqslant \frac{3^{m}-1}{2}, there exist
l=∑i=1mxiai,xi∈{−1,0,1}l=\sum_{i=1}^{m} x_{i} a_{i}, x_{i} \in\{-1,0,1\}

Therefore,
{∑i=1mxiai∣xi∈{−1,0,1}}⊇{0,±1,⋯ ,±3m−12}\left\{\sum_{i=1}^{m} x_{i} a_{i} \mid x_{i} \in\{-1,0,1\}\right\} \supseteq\left\{0, \pm 1, \cdots, \pm \frac{3^{m}-1}{2}\right\}

Notice that the left-hand side set contains at most 3m3^{m} elements, and the right-hand side set contains exactly 3m3^{m} elements, thus, we have
{∑i=1mxiai∣xi∈{−1,0,1}}={0,±1,⋯ ,±3m−12}\left\{\sum_{i=1}^{m} x_{i} a_{i} \mid x_{i} \in\{-1,0,1\}\right\}=\left\{0, \pm 1, \cdots, \pm \frac{3^{m}-1}{2}\right\}

And ∑i=1mai=3m−12\sum_{i=1}^{m} a_{i}=\frac{3^{m}-1}{2}
Adding 3m−12\frac{3^{m}-1}{2} to each element of the set, we get
{∑i=1mxiai+∑i=1mai∣x∈{−1,0,1}}={0,1,2,⋯ ,3m−1}\left\{\sum_{i=1}^{m} x_{i} a_{i}+\sum_{i=1}^{m} a_{i} \mid x \in\{-1,0,1\}\right\}=\left\{0,1,2, \cdots, 3^{m}-1\right\}

That is, {∑i=1myiai∣yi∈{0,1,2}}={0,1,2,⋯ ,3m−1}\left\{\sum_{i=1}^{m} y_{i} a_{i} \mid y_{i} \in\{0,1,2\}\right\}=\left\{0,1,2, \cdots, 3^{m}-1\right\}.
And for each l(0⩽l⩽3m−1)l\left(0 \leqslant l \leqslant 3^{m}-1\right), it can be uniquely represented as l=∑i=1myiail=\sum_{i=1}^{m} y_{i} a_{i}. Assume a1<a2<⋯<ama_{1}<a_{2}<\cdots<a_{m}. Therefore, a1a_{1} is the smallest positive integer in the set {0,1,2,⋯ ,3m−1}\left\{0,1,2, \cdots, 3^{m}-1\right\}, i.e., a1=1a_{1}=1. Assume a1=1,a2=3,⋯ ,as=3s−1a_{1}=1, a_{2}=3, \cdots, a_{s}=3^{s-1}. Then

Source: NuminaMath-1.5, licensed Apache-2.0. Statement reproduced verbatim; metadata (topic, difficulty, ordering) added by this project.