6
$\begingroup$

This question is related to What's the fewest weights you need to balance any weight from 1 to 40 pounds?

You had 4 weights to balance any weight from $1$ to $40$ pounds which is answered previously as $w_1=1$, $w_2=3$, $w_3=9$, $w_4=27$ where $w_1<w_2<w_3<w_4$

This time, we just need to balance any weight from $1$ to $30$ pounds with least amount of weight again. ($4$ as you guessed)

Strangely this time what is wanted is to maximize the total amount of weights with the maximum value of the minimum weight, $w_1$?

For example; $w_1=1,w_2=3,w_3=9,w_4=17$ is a solution to find all weight from 1 to 30. But $w_1=1$ is not the maximum value of $w_1$ that can get and $w_1+w_2+w_3+w_4=30$ is not the maximum total.

$\endgroup$
  • $\begingroup$ By "total amount of weights" do you mean total number weights we're using, or total weight of the other 3 weights? $\endgroup$ – tilper May 23 '17 at 23:56
  • $\begingroup$ @tilper total weight of all weights $\endgroup$ – Oray May 24 '17 at 3:54
3
$\begingroup$

The best score I have is

$w_1 = 6$ and $w_1 + w_2 + w_3 + w_4 = 50$ with the following weights
$w_1 = 6, w_2 = 8, w_3 = 9, w_4 = 27$

The solution was found by

trying to keep the differences between the weights of 1, 2, 6 and 18 since they are optimal, but reordering them. This will still give us 40 different numbers, but might skip some numbers before 40. We want to maximize $w_1$, so 6, 1, 2, 18 and 6, 2, 1, 18 are good candidates. This allows us to get most of the small numbers with just the first three weights and realizing the others as differences to 27.
6/7/9/27 gives us all numbers up to 31 with a secondary score of 49
6/8/9/27 gives us all numbers up to 30 with a secondary score of 50
When checking the possible numbers with just the first 3 weights, a nice symmetrical pattern emerges which lets us plug the holes with the differences from 27.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.