Qm

Fewest weights when they may only go on one pan

A grocer's balance has two pans. The item being weighed always sits alone on the left pan, and the grocer piles reference weights on the right pan until the two sides balance. The grocer wants to be able to weigh any item of 1, 2, 3, ..., up to 63 grams exactly.

What is the smallest number of reference weights that makes this possible, and which weights should they be?

(If you know the classic version where weights may go on either pan, notice how the answer changes when that freedom is taken away.)

Show a hint

Each weight is either used or not used in a given weighing. How many different "use it or not" patterns do k weights have, and how many targets do you need to hit?

Your answer

Solving needs a free account

Answers, streaks and solutions unlock when you are signed in. Reading the question and the hint stays free.

Discussion

Sign in to join the discussion · reading is open to everyone

💡 Discussion rules

  1. No full solutions here. Hints and approaches only.
  2. Complexity, edge cases and intuition are the point.
  3. Interview experiences are welcome. Respect your NDAs.

Loading discussion…

Learn the concepts

The theory behind this question.

Related questions

The scale that only says equal or not equal12 coins, one fake of unknown weightEight balls, one heavier, two weighingsFour suspects, one genuine coin, two weighingsEight coins, and maybe none of them is fake
All questions →