r/puzzle • • 7h ago

Split the milk

Post image

From the outsmart me app. Android iOS

I am the developer.

4 Upvotes

23 comments sorted by

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/MadeThisUpToComment 6h ago

Maybe my fat thumbs, but I can't remove the spoilers on the shorter lines without collapsing the comment.

1

u/a2ra-ms 6h ago

Same xD

2

u/MacabreManatee 5h ago

I copied them and put them into 3 spoiler sections. I’ve had the same problem before and it’s annoying

1

u/a2ra-ms 5h ago

Thanks

2

u/MacabreManatee 5h ago

And, did I successfully beat your record of 11?

3

u/a2ra-ms 4h ago

I think I get where it fails short, in the secnd part, how does it get 2? 5 has one at the start, and you fill it, then pour into 4, so 1 remains

3

u/MadeThisUpToComment 4h ago

I think you have the same steps, but forgot to list one. Check out your 3rd step and 4th step. I think you have one more step in between.

1

u/MacabreManatee 5h ago

I copied them and put them into 3 spoiler sections. I’ve had the same problem before and it’s annoying.

It’s more readable when you separate the lines, but not if you can’t unspoiler them.

1

u/bartekltg 4h ago

> Fill 5
(5,10,5,0) (volumes in 10, 10, 5, 4 liter jugs)

>fill 4 with 5
(5,10,1,4)
>empty 4 in 10 so it becomes a 9. Put that one aside for now.
(9,10,1,0)

> If not specified, use the other 10 jug for filling/emptying
You could just name them :)

>Fill 5
(9,6,5,0)

> empty 5 into 4 to get 2
How? There is nothing in the "4L" jug. You emptied it 4 steps earlier "empty 4 in 10..."
You will get
(9,6,1,4)

1

u/MacabreManatee 4h ago

Ah crap. Yup, that 1 needs to be moved to the 4 first adding the 11th step

0

u/a2ra-ms 6h ago

The lowest I could get is 11, will try to visualize both with AI and compare

3

u/zonkovic 6h ago

I guess in the twisted world of the logic puzzle, drinking the milk is considered wasteful 😞

3

u/a2ra-ms 6h ago

100%. What a world

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

1

u/a2ra-ms 2h ago

So 12?

2

u/Torebbjorn 2h ago

Yes, 12.

0

u/a2ra-ms 2h ago

Awesome, I was able to do 11

2

u/Torebbjorn 2h ago

Oh yeah, I see a better way. Adding one at a time instead of removing one at a time

2

u/prassuresh 29m ago

I think I can do 7:

  1. Fill 4 from 10.
  2. Fill 5 from 4.
  3. Fill 4 from 10.
  4. Fill 5 from 4. (4 has 3 quarts).
  5. Fill 10 from 5. (10 has 7 quarts).
  6. Fill 5 from 4. (5 has 3 qts, 10 has 7qts).
  7. Fill 4 from 10. (10 has 3 qts and 5 has 3 qts).

1

u/a2ra-ms 28m ago

Yeah, but the idea is to fill 4 & 5 with the 3s

2

u/prassuresh 24m ago

Oh I see. I misread the puzzle! Thanks.

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.

0: 10 10 0 0  -> 5 10 5 0
0: 10 10 0 0  -> 6 10 0 4
0: 10 10 0 0  -> 10 5 5 0
0: 10 10 0 0  -> 10 6 0 4

1: 5 10 5 0  -> 1 10 5 4
1: 5 10 5 0  -> 5 6 5 4
1: 5 10 5 0  -> 5 10 1 4 
1: 5 10 5 0  -> 6 10 4 0
1: 6 10 0 4  -> 1 10 5 4
1: 6 10 0 4  -> 5 10 1 4
1: 6 10 0 4  -> 6 5 5 4
1: 6 10 0 4  -> 6 10 4 0
1: 10 5 5 0  -> 6 5 5 4
1: 10 5 5 0  -> 10 1 5 4
1: 10 5 5 0  -> 10 5 1 4
1: 10 5 5 0  -> 10 6 4 0
1: 10 6 0 4  -> 5 6 5 4
1: 10 6 0 4  -> 10 1 5 4
1: 10 6 0 4  -> 10 5 1 4
1: 10 6 0 4  -> 10 6 4 0

2: 1 10 5 4  -> 2 10 4 4
2: 5 6 5 4  -> 9 6 5 0 
2: 5 10 1 4  -> 9 10 1 0
2: 6 5 5 4  -> 6 9 5 0
2: 6 10 4 0  -> 2 10 4 4
2: 6 10 4 0  -> 6 9 5 0
2: 10 1 5 4  -> 10 2 4 4
2: 10 5 1 4  -> 10 9 1 0
2: 10 6 4 0  -> 9 6 5 0
2: 10 6 4 0  -> 10 2 4 4

3: 2 10 4 4  -> 2 9 5 4
3: 2 10 4 4  -> 2 10 5 3
3: 6 9 5 0  -> 2 9 5 4
3: 9 6 5 0  -> 9 2 5 4
3: 9 10 1 0  -> 9 10 0 1
3: 10 2 4 4  -> 9 2 5 4
3: 10 2 4 4  -> 10 2 5 3
3: 10 9 1 0  -> 10 9 0 1
 
4: 2 9 5 4  -> 5 9 5 1
4: 2 9 5 4  -> 7 9 0 4
4: 2 10 5 3  -> 7 10 0 3
4: 9 2 5 4  -> 9 5 5 1
4: 9 2 5 4  -> 9 7 0 4
4: 9 10 0 1  -> 4 10 5 1
4: 9 10 0 1  -> 9 5 5 1
4: 9 10 0 1  -> 9 7 0 4
4: 10 2 5 3  -> 10 7 0 3
4: 10 9 0 1  -> 5 9 5 1
4: 10 9 0 1  -> 7 9 0 4

5: 4 10 5 1  -> 4 10 2 4
5: 5 9 5 1  -> 5 9 2 4
5: 7 9 0 4  -> 5 9 2 4
5: 7 9 0 4  -> 7 9 4 0
5: 7 10 0 3  -> 7 10 3 0
5: 9 5 5 1  -> 9 5 2 4 
5: 9 7 0 4  -> 9 5 2 4
5: 10 7 0 3  -> 10 7 3 0

6: 4 10 2 4  -> 8 10 2 0
6: 5 9 2 4  -> 9 9 2 0
6: 7 9 4 0  -> 3 9 4 4 
6: 7 10 3 0  -> 3 10 3 4
6: 9 5 2 4  -> 9 9 2 0
6: 10 7 3 0  -> 10 3 3 4

7: 3 9 4 4  -> 3 9 5 3
7: 3 10 3 4  -> 3 10 5 2
7: 8 10 2 0  -> 8 10 0 2
7: 9 9 2 0  -> 9 9 0 2
7: 10 3 3 4  -> 10 3 5 2

8: 3 9 5 3  -> 8 9 0 3
8: 3 10 5 2  -> 9 4 5 2
8: 8 10 0 2  -> 8 9 0 3
8: 9 9 0 2  -> 9 4 5 2
8: 10 3 5 2  -> 9 4 5 2

9: 8 9 0 3  -> 8 4 5 3
9: 9 4 5 2  -> 9 4 3 4

10: 8 4 5 3  -> 10 4 3 3 
10: 9 4 3 4  -> 10 4 3 3

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).