Maths Olympiad Prep

Track / Stage 8 / 53 of 180 #1753 of 1964

Problem 1753

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

6. 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.

Official solution

[Solution] (1) Let the mass numbers of these kk weights be a1,a2,,aka_{1}, a_{2}, \cdots, a_{k}, and 1a1a2ak,aiZ,1ik1 \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=1kxiaixi{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=1kxiaixi{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
3k2n+1n3k12\begin{array}{l} 3^{k} \geqslant 2 n+1 \\ n \leqslant \frac{3^{k}-1}{2} \end{array}

If 3m112<n3m12,(m1,mZ)\frac{3^{m-1}-1}{2}<n \leqslant \frac{3^{m}-1}{2},(m \geqslant 1, m \in \mathbb{Z}), then kmk \geqslant m.
 On the other hand, if 3m112<n3m12,(m1,mZ), 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=3m1a_{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 0p3m10 \leqslant p \leqslant 3^{m}-1, there exist yi{0,1,2},1imy_{i} \in\{0,1,2\}, 1 \leqslant i \leqslant m, such that
p=i=1yi3i1p=\sum_{i=1}^{\prime \prime} y_{i} 3^{i-1}

Thus, p3m12=i=1myi3i1i=1m3i1p-\frac{3^{m}-1}{2}=\sum_{i=1}^{m} y_{i} \cdot 3^{i-1}-\sum_{i=1}^{m} 3^{i-1}
=i=1m(yi1)3i1=\sum_{i=1}^{m}\left(y_{i}-1\right) 3^{i-1}

Let l=p3m12l=p-\frac{3^{m}-1}{2}, then 3m12l3m12-\frac{3^{m}-1}{2} \leqslant l \leqslant \frac{3^{m}-1}{2};
Let xi=yi1x_{i}=y_{i}-1, then xi{1,0,1}x_{i} \in\{-1,0,1\}, thus, we have
l=i=1mxi3i1l=\sum_{i=1}^{m} x_{i} \cdot 3^{i-1}

Since n3m12n \leqslant \frac{3^{m}-1}{2}, for any l{1,2,,n}l \in\{1,2, \cdots, n\}, there exist xi,1imx_{i}, 1 \leqslant i \leqslant m, such that
l=i=1mxi3i1=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,,3m11,3, \cdots, 3^{m-1}, we can measure all items with mass 1,2,,n1,2, \cdots, n grams, where n3m12n \leqslant \frac{3^{m}-1}{2}.

In summary, the minimum value of kk is f(n)=mf(n)=m, where mm satisfies the inequality 3m112<n3m12\frac{3^{m-1}-1}{2}<n \leqslant \frac{3^{m}-1}{2}.
(2) First, prove that when 3m112<n<3m12\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=3m1, there is at least one more way: a1=1,a2=3,,am1=3m2,am=3m11.\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 1l3m1121 \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=1m1xi3i1=i=1m1xi3i1+0(3m11). If 3m112<ln<3m12, then l+13m12,\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=1mxi3i1l+1=\sum_{i=1}^{m} x_{i} \cdot 3^{i-1}

And it must be that xm=1x_{m}=1. Thus,
l=i=1m1xi3i1+1(3m11)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,,am1=3m2,am=3m11a_{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=3m12n=\frac{3^{m}-1}{2}, the composition of f(n)f(n) weights is unique, i.e., ai=3i1(1im)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=3m121,2, \cdots, n=\frac{3^{m}-1}{2} grams, then for each 3m12l3m12-\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=1mxiaixi{1,0,1}}{0,±1,,±3m12}\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=1mxiaixi{1,0,1}}={0,±1,,±3m12}\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=3m12\sum_{i=1}^{m} a_{i}=\frac{3^{m}-1}{2}
Adding 3m12\frac{3^{m}-1}{2} to each element of the set, we get
{i=1mxiai+i=1maix{1,0,1}}={0,1,2,,3m1}\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=1myiaiyi{0,1,2}}={0,1,2,,3m1}\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(0l3m1)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,,3m1}\left\{0,1,2, \cdots, 3^{m}-1\right\}, i.e., a1=1a_{1}=1. Assume a1=1,a2=3,,as=3s1a_{1}=1, a_{2}=3, \cdots, a_{s}=3^{s-1}. Then

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.