Selection of weights to weigh a thing

(Extracted from Leino’s puzzle page)

You are given a balance (that is, a weighing machine with two trays) and a positive integer N. You are then to request a number of weights. You pick which denominations of weights you want and how many of each you want. After you receive the weights you requested, you are given a thing whose weight is an integer between 1 and N, inclusive. Using the balance and the weights you requested, you must now determine the exact weight of the thing.

As a function of N, how few weights can you get by requesting?

Advertisements
Explore posts in the same categories: Puzzles

Tags: ,

You can comment below, or link to this permanent URL from your own site.

One Comment on “Selection of weights to weigh a thing

  1. simpple Says:

    My guess is log_2(N+1)-1, rounded up to the closest upper integer.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


%d bloggers like this: