How Many Weights Are Needed to Balance Any Integer Weight on a Two-Pan Scale?

  • Thread starter Tony11235
  • Start date
  • Tags
    Minimum
In summary, the problem of weighing an unknown integer n using a scale with two pans can be solved by finding a way to represent n as the sum of two numbers using a minimum number of weights. A good lower bound for this problem is 3 weights, as even if n is even, it may still require 3 weights to be represented, depending on the available weights. Greedy algorithms can be used to achieve the best result using the least amount of resources.
  • #1
Tony11235
255
0
Say we have a scale for weighing objects, contains two pans that are balanced.

Given a collection of objects of known weight we weigh an object by putting it in one pan and putting known weights in the other pan until the scale balances. It may happen to be that there is no way to do this if we may place the given weights only in one pan.

If we can place the weights in both pans what is the minimum number of weights necessary to weigh an object whose weight is an unknown integer n? Then find a good lower bound.

This is for my algorithms analysis class. It is probably easy, but I'm having trouble getting started. Has anybody had this type of problem before? I thought I once heard that if n is odd, then it's 3, but I wouldn't know why.
 
Last edited:
Physics news on Phys.org
  • #2
The problem can be solved by finding a way to represent any given number n as the sum of two numbers that can be achieved with a minimum number of weights. This can be done by using "greedy" algorithms, which try to get the best result using the least amount of resources.A good lower bound for this problem would be 3 weights. This is because if n is odd, then at least 3 weights are needed to represent it (one in each pan, plus one in the middle to balance it). Even if n is even, 3 weights may be enough, depending on the available weights (for example, if we have weights of 1, 2, and 4, then n=6 can be represented with only 3 weights: 4 in one pan and 2 and 1 in the other).
 

FAQ: How Many Weights Are Needed to Balance Any Integer Weight on a Two-Pan Scale?

What is the minimum number of weights needed for a balanced scale?

The minimum number of weights needed for a balanced scale is two. This is because a scale requires a weight on each side to be balanced.

What is the formula for determining the minimum number of weights for a balanced scale?

The formula for determining the minimum number of weights for a balanced scale is n = 2^(k-1), where n is the number of weights and k is the number of different weight values.

Why is the minimum number of weights important?

The minimum number of weights is important because it allows for the most efficient and accurate measurement on a scale. Having too many weights can lead to unnecessary clutter and confusion, while having too few weights can limit the range of measurements that can be made.

How does the minimum number of weights vary for different types of scales?

The minimum number of weights needed for a balanced scale will vary depending on the type of scale being used. For example, a digital scale may only require one weight, while a traditional balance scale may require multiple weights of varying values.

What factors can affect the minimum number of weights needed for a balanced scale?

The main factor that can affect the minimum number of weights needed for a balanced scale is the range of measurements that need to be made. The more precise and varied the measurements, the more weights will be needed to achieve balance.

Back
Top