Weights and Scale Problem

91 Views Asked by At

a.) What is the minimum number of integer weights to balance a scale with bags of rocks from weights 1 to n.

b.) What is the minimum number of weights to balance a scale of weights on one side and on the second side bags of rocks with weights as well as weights on one side from 1 to n integer weights.

-I really need a clear explanation please - A few attempts I had were 1 weights but that wasnt right and then I started to get triangle numbers but I am lost on what I am doing.

1

There are 1 best solutions below

0
On

a. Let k be the largest integer with $2^k$ <= n.
k + 1 weights are needed, each being a power of 2.

b. I'll pass trying to figure it out.