How to weigh up to 100kg with 5 weights

Solution 1:

Use powers of $3$: $1,3,9,27,81$ can weigh anything up to $121$.

The trick is to place weights on both sides of the pan. Without that, the maximum you can do is with powers of two, and five of those will allow you to go up to $63$. At least if you only consider exact weighings. If you're allowed to infer that the weight is $14$ if it is heavier than $13$ and lighter than $15$ will probably allow you to go a bit higher, and I don't yet see a systematic way of going about this.

$121$ is the maximum you can do with 5 weights. See http://www.uri.edu/artsci/math/clark/mthdl/scale/explore.pdf for necessary and sufficient conditions.

On the other hand, since you can optimally go up to $121$, there is some choice if you only want to go up to $100$. There are 132 sets of weights that work, 15 of them measuring up to exactly $100$, and the lexicographically smallest one is $1,3,7,22,67$.

Further, the proof for sufficiency is constructive. That is, you can figure out an algorithm to tell you which weights go on which side for any of these sets of weights.

Solution 2:

If you used $1,2,4,8..$ kg weights, you could measure until $127$ kg only using seven different weights on one side of scale. Because numbers $0-127$ is written with maximum seven digits in base $2$, i.e. $100=1100100_2$. You can use only one side of scale because you only have $0$ and $1$ digits in base $2$.

On the other hand, in base $3$ you have $1,0,2$ and you can use max five digits to represent numbers in $0-100$. But you have to repeat weights if you use just one side of scale due to digit $2$. But you can rewrite a number in base $3$ as substraction of two numbers in the same base which have only digits $0$ and $1$. For example, $7=21_3$, which means you have to use two $3$ kg and one $1$ kg to measure $7$ kg if you only use one side of scale. But since you are not restricted to only one side, you can write $7$ as $101_3-10_3$. You put $101_3=10$ kg to left side, $7$ kg and $10_3=3$ kg to right.