Wednesday, April 24, 2013

Wednesday Brain Teaser 4-24-13

Alright, so you have a scale that looks like this:

You want to use this scale to measure the weight of various widgets you have that could weigh as little as 1oz, or as much as 1000 ozs. Now you want to purchase a set of weights so that you can get the weight on any of these to the closest oz.  You don't have much money, so you want to buy the fewest number of weights possible...but you have to be able to measure all the individual weights that might fall in the 1-1000 range.

How many weights do you need, and what units should they be?

5 comments:

  1. I've come up with a set of six weights. I'll post what they are tomorrow if someone else doesn't.

    ReplyDelete
  2. Hello Again BS King!

    This brain teaser really caught my interest. I never took number theory in school but it looks to me like I need to select a set of weights that represent each position in a number system. My first instinct was to use base 2 which would require 10 weights (1, 2, 4, 8, 16, 32, 64, 128, 256, and 512) but I had no idea which base would be the most efficient.

    Doing a bit of research I found an article on the radix economy and discovered that base 3 is more efficient than base 2 (I am using integer bases and don't want to mess with base e). Doing a bit more research I found that The Balanced Ternary Number System can do the job with seven weights.

    My answer is these 7 weights: 1 oz, 3 oz. 9 oz, 27 oz, 81 oz, 243 oz, and 729 oz.

    I would like to see Joseph's six weights.

    Glenn

    ReplyDelete
    Replies
    1. This is embarrassing. I came up with the same set but had an off-by-one error while counting them.

      Delete
  3. I recalled from the dim past that it was a powers o' three answer. Then I saw Joseph's proposal of 6, Anon's suggestion of base e, the fact that 729 seems wastefully high when weighing for 1000, and I read the question more carefully. The closest ounce... if one had fractional ounces but knew the decimal...

    Hmm. I don't like it. I'm sticking with the 7 weights listed.

    ReplyDelete
  4. I was constructing a system for a more limited problem (max is 10 oz), using a set of 3 weights. It can be done with two sets: (1 oz, 2 oz, 5 oz) or (1 oz, 3 oz, 5 oz). This feels less-than-optimal, as certain values can be produced in multiple ways.

    Scaling that up to 100 ounces, I find the set (1 oz, 2 oz, 5 oz, 10 oz, 20 oz, 50 oz) works.

    Up to 1000 ounces, this pattern produces (1 oz, 2 oz, 5 oz, 10 oz, 20 oz, 50 oz, 100 oz, 200 oz, 500 oz).

    But this is a set of 9 weights.

    The answer with 7 weights will also work, and is more efficient.

    ReplyDelete