4
$\begingroup$

This question already has an answer here:

I have three water jugs, one with 10 liters another with 5 and another with 6, how do i get 8 liters on the first one?

$\endgroup$

marked as duplicate by A E, ʇolɐǝz ǝɥʇ qoq, Spencerkatty, Deusovi, DrunkWolf Jan 30 '16 at 12:08

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$ Which ones of them are full, and which are not? $\endgroup$ – cst1992 Jan 29 '16 at 17:13
20
$\begingroup$

There is no need for the 5 liters jug. You can do it with only the 10 and 6 liters jugs (and in less steps than the alternate solutions).

  1. 10 0 0 $\leftrightarrow$ Fill 10 liters jug.

  2. 4 6 0 $\leftrightarrow$ Pour it in the 6 liters jug (now 4 liter in 10 liters jug)

  3. 4 0 0 $\leftrightarrow$ Empty 6 liters jug

  4. 0 4 0 $\leftrightarrow$ Pour the 4 liter from 10 liters jug to the 6 liters jug (now 4 liter in 6 liters jug)

  5. 10 4 0 $\leftrightarrow$ Fill 10 liters jug again

  6. 8 6 0 $\leftrightarrow$ Pour water from 10 liters jug to 6 liters jug to fill it

You will have 8 liter in 10 liters jug

$\endgroup$
  • $\begingroup$ This seems rather wasteful. I mean, you essentially toss 12 liters of water to get 8. $\endgroup$ – tfitzger Jan 29 '16 at 17:05
  • 1
    $\begingroup$ @tfitzger That water that he pours out/empties could just as well be poured into the original reservoir from which he filled the 10-liter jug. $\endgroup$ – Shane Jan 29 '16 at 22:17
  • $\begingroup$ @Shane Not if it's from the tap. =) $\endgroup$ – jpmc26 Jan 29 '16 at 22:22
  • 1
    $\begingroup$ @tfitzger Conserving water is not part of the puzzle as it's currently stated. $\endgroup$ – immibis Jan 30 '16 at 11:06
12
$\begingroup$

Using only exactly 8L:

Assuming 10L, 6L, 5L. Bold indicate refill (top-up or complete)

  • 0, 6, 0 (Using 6 new liters)
  • 0, 1, 5
  • 1, 0, 5
  • 1, 5, 0
  • 1, 6, 0 (Using one new liter)
  • 1, 1, 5
  • 2, 0, 5
  • 2, 5, 0
  • 2, 6, 0 (Using one new liter)
  • 8, 0, 0

10 steps, but not a drop of extra water wasted or used.

$\endgroup$
  • 1
    $\begingroup$ I like it. You may take a few more steps, but you waste nothing. $\endgroup$ – tfitzger Jan 29 '16 at 17:06
11
$\begingroup$

Heres a solution without needing to refil and starting with only 10L.

Jugs are arranged in the following order 10L 5L 6L

Starting with just the 10L jug full

10L - 0L --- 0L
4 ---- 0 ---- 6
4 ---- 5 ---- 1
9 ---- 0 ---- 1
9 ---- 1 ---- 0
3 ---- 1 ---- 6
3 ---- 5 ---- 2
8 ---- 0 ---- 2

$\endgroup$
  • 1
    $\begingroup$ I like this, no wasting water and no refilling $\endgroup$ – Kevin Jan 29 '16 at 14:48
  • $\begingroup$ still 2L wasted, which is not necessary $\endgroup$ – njzk2 Jan 29 '16 at 15:27
  • 3
    $\begingroup$ No water is wasted @njzk2 - You've got your 8L needed for whatever purpose, then the remaining 2L in another jug. You have your total 10L still. $\endgroup$ – mbklnd Jan 29 '16 at 15:30
  • 3
    $\begingroup$ @njzk2 the 2L isn't wasted... it's donated to a local, starving, homeless family and their scrappy-but-lovable dog. $\endgroup$ – WernerCD Jan 29 '16 at 15:44
  • 1
    $\begingroup$ Of course, donating water to a thirsty family would be better; drink some water and you'll still be starving :) $\endgroup$ – chepner Jan 29 '16 at 16:41
9
$\begingroup$

Here's a solution that takes more steps than the others, but the problem doesn't say we're trying to minimize steps ;)   It plays on the idea that the 5- and 6-liter jugs allow you to create 1-liter increments as many times as you want.

  1. Fill the 6-liter jug.
  2. Pour from the 6-liter jug into the 5-liter jug. You have 1 liter remaining in the 6-liter jug.
  3. Pour the 1 liter from the 6-liter jug into the 10-liter jug and empty the 5-liter jug.
  4. Repeat steps 1–3 7 more times.

It's clunky but simple.

$\endgroup$
  • 3
    $\begingroup$ I like this but I think it's even simpler if you just perform it twice, then dump in on full 6-liter jug $\endgroup$ – Kevin Jan 29 '16 at 14:56
  • $\begingroup$ @Kevin One step faster than my initial thought of "6 into 5, leaving 1... 3 times... then five on top of the 3" $\endgroup$ – WernerCD Jan 29 '16 at 15:42
  • $\begingroup$ @Kevin: I had considered that, but I just liked the idea of being able to create any positive integer value using this method. $\endgroup$ – dpwilson Jan 29 '16 at 16:15
5
$\begingroup$

Fill 10 liters jug.
Pour it in the 6 liter jug.
Pour the remaining 4 liter in the 5 liter jug.
Fill 10 liters again.
Empty the 6 liter jug.
Pour 6 liters from the 10 liter jug in the 6 liter jug.
Put content of 5 liter jug in 10 liter jug.

$\endgroup$
1
$\begingroup$

Fill the 6 liter jug and then pour it into the 10 jug.

  • 10 liter jug has 6 liters of water.

Fill the 6 liter jug again and pour 5 liters into the 5 liter jug the remaining 1 liter into the 10 liter jug.

  • 10 liter jug has 7 liters of water.

Repeat last step.

  • 10 liter jug has 8 liters of water.
$\endgroup$
0
$\begingroup$

Assuming all three are empty and you have a tap:

10 5 6  Jugs  
 | | |  
 0 0 6   
 0 5 1  
 1 5 0
 1 0 5
 1 0 6
 7 0 0
 7 0 6
 7 5 1
 8 5 0

You have 8 liters in the 10L jug and 5 liters in the 5L jug.

$\endgroup$

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