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?
-
Which ones of them are full, and which are not? – cst1992 Jan 29 '16 at 17:13
7 Answers
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).
10 0 0$\leftrightarrow$ Fill 10 liters jug.4 6 0$\leftrightarrow$ Pour it in the 6 liters jug (now 4 liter in 10 liters jug)4 0 0$\leftrightarrow$ Empty 6 liters jug0 4 0$\leftrightarrow$ Pour the 4 liter from 10 liters jug to the 6 liters jug (now 4 liter in 6 liters jug)10 4 0$\leftrightarrow$ Fill 10 liters jug again8 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
- 1,535
- 10
- 17
- 14,506
- 5
- 58
- 117
-
This seems rather wasteful. I mean, you essentially toss 12 liters of water to get 8. – tfitzger Jan 29 '16 at 17:05
-
1@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. – Shane Jan 29 '16 at 22:17
-
-
1@tfitzger Conserving water is not part of the puzzle as it's currently stated. – user253751 Jan 30 '16 at 11:06
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.
- 1,116
- 8
- 12
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
- 111
- 4
-
1
-
-
3No 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. – mbklnd Jan 29 '16 at 15:30
-
3@njzk2 the 2L isn't wasted... it's donated to a local, starving, homeless family and their scrappy-but-lovable dog. – WernerCD Jan 29 '16 at 15:44
-
1Of course, donating water to a thirsty family would be better; drink some water and you'll still be starving :) – chepner Jan 29 '16 at 16:41
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.
- Fill the 6-liter jug.
- Pour from the 6-liter jug into the 5-liter jug. You have 1 liter remaining in the 6-liter jug.
- Pour the 1 liter from the 6-liter jug into the 10-liter jug and empty the 5-liter jug.
- Repeat steps 1–3 7 more times.
It's clunky but simple.
- 1,376
- 9
- 11
-
3I like this but I think it's even simpler if you just perform it twice, then dump in on full 6-liter jug – Kevin Jan 29 '16 at 14:56
-
@Kevin One step faster than my initial thought of "6 into 5, leaving 1... 3 times... then five on top of the 3" – WernerCD Jan 29 '16 at 15:42
-
@Kevin: I had considered that, but I just liked the idea of being able to create any positive integer value using this method. – dpwilson Jan 29 '16 at 16:15
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.
- 11,217
- 3
- 37
- 58
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.
- 11
- 1
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.
- 717
- 6
- 17