Puzzles/Decision puzzles/Weighings Once More/Solution

< Puzzles < Decision puzzles < Weighings Once More

Pathetic drawing following

     /|\
    / | \
   /  |  \#
 ---- | ----
      |
   -------  


Weight to be measured is #.

We prove, that 4 is the minimum size of a weighing set to measure the numbers from 1 to 40.

Wl = Wr + x

where Wl and Wr are the sum of all weights on left resp. right side. x has a unique solution for every pair of Wl and Wr.


Now, we construct a minimum solution:

Lemma: The weighing set S(n) = {1, 3, ..., 3n} can measure all weights between 1 and |S(n)|.

Proof by induction: For S(0) the lemma trivially holds. Assume that the lemma holds for S(n). We will now prove that it holds for S(n+1). Because S(n) is a subset of S(n+1), we can surely measure all weighs between 1 and |S(n)| = (3n + 1)/2 without using the weight 3n+1. By adding this weight on the left side, we can reach all solutions between 3n+1 - (3n+1)/2 = |S(n)| + 1 and 3n+1 + (3n+1)/2 = 3n+2/2 = |S(n+1)|. QED.

Because of |S(3)| = 40, a solution to the problem is the weighing set {1,3,9,27}, which is minimal.

Questions:

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.