0
$\begingroup$

This question already has an answer here:

You have two drums of capacity 8 litre and 5 litre and a resource of oil, can you use these two drums to give 1 litre, 2 litre, 3 litre, 4 litre, and 6 litres and 7 litres to any customer? If yes, then how? Note that there is no mark of litres on the drums.

$\endgroup$

marked as duplicate by LeppyR64, Beastly Gerbil, Glorfindel, APrough, boboquack Oct 18 '17 at 21:35

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ anyone seen Die Hard w a Vengeance? :) $\endgroup$ – Adam Oct 18 '17 at 20:07
2
$\begingroup$

The answer is

yes, you can, mainly because 5 and 8 are relatively prime (and the required volumes are less than the combined volume of the drums)

Reasoning:

1. use the procedure for 6. below, empty [5], put 5 liter in [5] (then it's full) and you're left with 1 liter in [8].
2. fill [5], empty it in [8], fill [5] again, put 3 liter in [8] (then it's full) and you're left with 2 liter in [5].
3. fill [8], put 5 liter in [5] (then it's full) and you're left with 3 liter in [8].
4. use the procedure for 7. below, fill [5], put 1 liter in [8] (then it's full) and you're left with 4 liter in [5].
6. use the procedure for 3., empty [5], put the 3 liter from [8] in [5], fill [8], put 2 liter in [5] (then it's full) and you're left with 6 liter in [8].
7. use the procedure for 2., empty [8], put the 2 liter from [5] in [8], fill [5] and empty it in [8]. You're left with 7 liter in [8].

$\endgroup$
1
$\begingroup$
  1. Fill up the 5 liter, and pour all of it into the 8 liter.

  2. Fill up the 5 liter again, and pour into the 8 liter until it's full. There will be 2 liters left in the 5 liter. Two liter check!

  3. Empty the 8 liter, and pour the two liters from the 5 liter into the 8 liter.

  4. Fill the 5 liter, and pour it all into the 8 liter, which now contains 7 liters. 7 liter check!

  5. Empty the 5 liter, and refill it. Pour into the 8 liter until it's full. There will be 4 liters left in the 5 liter. 4 liter check!

  6. Empty the 8 liter, and pour the four liters from the 5 liter into the 8 liter.

  7. Fill the 5 liter, and pour into the 8 liter until it's full. Now the 5 liter will contain 1 liter. 1 liter check!

Now, we have measured 1, 2, 4, and 7 correctly. We just need 3 and 6.

  1. Fill the 8 liter, and pour into the 5 liter until it's full. Now we have 3 left over in the 8 liter. 3 liter check!

  2. Empty the 5 liter out, and pour the remaining 3 liters into it.

  3. Fill the 8 liter, and pour into the 5 liter until it's full. Now we have 6 left over in the 8 liter 6 liter check!

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.