English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Divide $151 (in whole $ increments) into a number of bags so that I can ask for any amount between $1 and $151, and you can give me the proper amount by giving me a certain number of these bags without opening them. What is the minimum number of bags you will require?

2006-10-22 21:20:08 · 5 answers · asked by Omar 1 in Science & Mathematics Mathematics

5 answers

I suspect you mean $511 not $151 and the answer is 9 bags (to be mathematically neat)

1, 2, 4, 8, 16. 32, 64, 128 and 256

and you just express the number of dollars requested/required as a binary number and help yourself accordingly: eg 317 dollars would be 256 + 32 + 16 + 8 + 4 + 1

and 317 = 100111101 in binary so you leave out the 128 and 64 and 2 dollar bags and take the other 6 bags

Or you could use ternary maths and get to $161 in 9 bags as follows:

1, 1, 3, 3, 9, 9, 27, 27, 81

express the amount required in ternary maths eg 146 is 81 + (2 x 27) + 9 + (2 x 1), which in ternary notation is 12102 and you take 1 bag with 81 dollars, 2 with 27 dollars, 1 with 9 dollars, none with 3 dollars and both the 1 dollar bags.

Ternary maths is better suited to "weighing any amount on a scale with 2 pans" problems, eg to weigh any amount up to 40 ounces, a 1 oz, 3 oz, 9 oz, and 27 oz weight suffices.

2006-10-22 23:38:41 · answer #1 · answered by Anonymous · 15 0

The key to this question is "by giving me a certain number of these bags WITHOUT OPENING THEM". The only possible answer would be 151 bags if the bags were not marked or colored in any way.
However, if this is not to be considered, or the bags were marked or colored to indicate the amount inside, then either solution provided by jayanth! or Helmut would be correct (8 bags minimum).

2006-10-23 00:31:57 · answer #2 · answered by Bird 2 · 0 0

1 2 4 8 16 32 64 24
place the given amount in each bag!
the min number of bags is 8

2006-10-22 21:31:44 · answer #3 · answered by !kumar! 2 · 0 0

2)151
..2)75,1
..2)37,1
..2)18,1
....2)9,0
....2)4,1
....2)2,0
....2)1,0
..........1

$75, $37, $18, $9, $5, $4, $2, $1
8 bags

2006-10-22 22:08:37 · answer #4 · answered by Helmut 7 · 0 0

you have to say please first if you are asking for help with your homework

2006-10-22 21:27:22 · answer #5 · answered by summerglow 5 · 1 0

fedest.com, questions and answers