Say we have an object of some unknown weight w 1 in grams a
Say we have an object of some unknown weight w > 1 in grams, an unlimited supply of 1 gram weights, and a balance with two arms, which will tip down the arm with the heavier total amount in it. Show how we can determine w, i.e., w to within a gram, with at most 2log w uses of the balance.
Solution
okk the question is confusing
do you want to measure w or find the weight which has w among the 1 gram weights
of ypu want to find the weight then
similar to binary search algorithm
first divide the number of weights into two halves
then measure them in the balance
discard the weights on lighter arm and follow the same procedure with the weights on heavier arm
follow this until you find the weight with w grams
