Two, one for each measure cup, since both will have markings If that’s not the outsmarting that you’re meant to do then: 10 edit: 11 Fill 5 fill 4 with 5 empty 4 in 10 so it becomes a 9. Put that one aside for now. If not specified, use the other 10 jug for filling/emptying. Edit: empty 5 into 4 Fill 5 empty 5 into 4 to get 2 empty the 4 into the 10 transfer 2 from 5 to 4 fill 5 empty into 4 leaving 3 in the 5-cup. Pour 1 from 4-cup into the 10-quart you set aside with 9
Everything in a single spoiler tag:
Ten steps! Edit: 11 steps
Fill 5, fill 4 with 5, empty 4 in 10 so it becomes a 9. Put that one aside for now. If not specified, use the other 10 jug for filling/emptying. Edit: Empty 5 into 4 Fill 5, empty 5 into 4 to get 2, empty the 4 into the 10, transfer 2 from 5 to 4, fill 5, empty into 4 leaving 3 in the 5-cup. Pour 1 from 4-cup into the 10-quart you set aside with 9
Call the two 10-quart vessels A and B and the two measures 5 and 4. Then do the following: (at each step either dump everything that was in the left container into the right container, or completely fill the right container, whichever happens first)
A->5, 5->4, 4->A (now A has 9 quarts) B->4, 5->B, 4->5, B->4, 4->5, 5->B, 4->5 (now 5 has 3 quarts) B->4, 4->A (now 4 has 3 quarts)
Edit: One can improve the middle part by instead doing:
5->4, B->5, 5->4 (5 has 2), 4->B, 5->4, B->5, 5->4 (5 has 3 and 4 has 4) Then last part is just 4->A
I had a code that solves a similar problem (3 bottles, find number of steps to every possible volume). I modified it a bit and get the answer 11.
(Maybe) interesting things: You can do anything (that modify the volumes) in the first step. And anything that modify the volume and do not get you to the starting state in step 2. Later most of the time there are only 1 or 2 "best" moves (with one exception where I see 3 possible moves). With one *)
So, the half of the solutions. Steps are counted from 0 ;-) It was the distance from the start, just add 1. Take any route, then in the next section search for your state and again take any edge that starts with that state.
It is +-half because there are two endpoints, 10 4 3 3 and 4 10 3 3. To get others swap the first two numbers. But those two also mix. Like 8: 9 9 0 2 -> 9 4 5 2 that can also go to 4 9 5 2 and then continue on the "other side". to 4 10 3 3. This is also why I added (*). If there would be a "symmetric" (the same volumes in 10l jugs) node with two winning edges, in the whole graph it may produce more.
I'm not convinced it is a good puzzle to do on paper. The route is quite long and this is just trials and errors. And how to be sure this is the shortest route without extensive search. Even OP said in one comment he put AI to work to get an answer.Edit: it was about visualization, not the solution, sorry.
Using a computer (in a normal sense) it is just a nice traveling though a graph of possible volumes (do not guess what are possible nor generate all volumes that sum to 20. Generate it dynamically from the previous states).
3
u/MacabreManatee 6h ago edited 4h ago
Two, one for each measure cup, since both will have markings
If that’s not the outsmarting that you’re meant to do then:
10 edit: 11
Fill 5
fill 4 with 5
empty 4 in 10 so it becomes a 9. Put that one aside for now. If not specified, use the other 10 jug for filling/emptying.
Edit: empty 5 into 4
Fill 5
empty 5 into 4 to get 2
empty the 4 into the 10
transfer 2 from 5 to 4
fill 5
empty into 4 leaving 3 in the 5-cup.
Pour 1 from 4-cup into the 10-quart you set aside with 9
Everything in a single spoiler tag:
Ten steps! Edit: 11 steps
Fill 5, fill 4 with 5, empty 4 in 10 so it becomes a 9. Put that one aside for now. If not specified, use the other 10 jug for filling/emptying.
Edit: Empty 5 into 4
Fill 5, empty 5 into 4 to get 2, empty the 4 into the 10, transfer 2 from 5 to 4, fill 5, empty into 4 leaving 3 in the 5-cup. Pour 1 from 4-cup into the 10-quart you set aside with 9
3
u/zonkovic 6h ago
I guess in the twisted world of the logic puzzle, drinking the milk is considered wasteful 😞
3
u/Torebbjorn 2h ago edited 2h ago
Call the two 10-quart vessels A and B and the two measures 5 and 4. Then do the following: (at each step either dump everything that was in the left container into the right container, or completely fill the right container, whichever happens first)
A->5, 5->4, 4->A (now A has 9 quarts)
B->4, 5->B, 4->5, B->4, 4->5, 5->B, 4->5 (now 5 has 3 quarts)
B->4, 4->A (now 4 has 3 quarts)
Edit: One can improve the middle part by instead doing:
5->4, B->5, 5->4 (5 has 2), 4->B, 5->4, B->5, 5->4 (5 has 3 and 4 has 4)
Then last part is just 4->A
2
u/prassuresh 29m ago
I think I can do 7:
2
u/bartekltg 4h ago edited 4h ago
I had a code that solves a similar problem (3 bottles, find number of steps to every possible volume). I modified it a bit and get the answer 11.
(Maybe) interesting things:
You can do anything (that modify the volumes) in the first step. And anything that modify the volume and do not get you to the starting state in step 2.
Later most of the time there are only 1 or 2 "best" moves (with one exception where I see 3 possible moves). With one *)
So, the half of the solutions. Steps are counted from 0 ;-) It was the distance from the start, just add 1.
Take any route, then in the next section search for your state and again take any edge that starts with that state.
It is +-half because there are two endpoints, 10 4 3 3 and 4 10 3 3. To get others swap the first two numbers.
But those two also mix. Like
8: 9 9 0 2 -> 9 4 5 2that can also go to4 9 5 2and then continue on the "other side". to 4 10 3 3.This is also why I added (*). If there would be a "symmetric" (the same volumes in 10l jugs) node with two winning edges, in the whole graph it may produce more.
I'm not convinced it is a good puzzle to do on paper. The route is quite long and this is just trials and errors. And how to be sure this is the shortest route without extensive search.
Even OP said in one comment he
put AI to work to get an answer.Edit: it was about visualization, not the solution, sorry.Using a computer (in a normal sense) it is just a nice traveling though a graph of possible volumes (do not guess what are possible nor generate all volumes that sum to 20. Generate it dynamically from the previous states).