Brainteaser - Jugs

cujo.cabbie
Rank: Gorilla | banana points 532

3 jugs

Jug A: 8 pints liquid
Jug B: 3 pints liquid
Jug C: 5 pints liquid

You need to get 4 pints exactly in Jug A and Jug C but have nothing in Jug B.

You can only pour an amount to fill an entire jug. For example if you pour 'all of' Jug A into Jug C there will be 3 pints left in Jug A and 5 pints in Jug C. If you pour all of Jug C into Jug B there will be 3 pints in Jug B and 2 pints in Jug C (and Jug A will still have 3 pints).

There is no 4th container.

You have a maximum of 7 moves/transfers.

How do you do this?

(This is a variation of a the typical jugs brainteaser asked in interviews. I get 2 pints but if you transfer that into any jug it will be more then 2 pints won't it?)

Comments (14)

Dec 16, 2012

Forgot to say: you start with Jug A full with 8 pints and Jug B and C empty.

Learn More

Side-by-side comparison of top modeling training courses + exclusive discount through WSO here.

Dec 16, 2012

I think I did this right.....

Start (8 0 0)
1. Pour 5 pints from A to C (3 0 5)
2. Pour 3 pints from C to B (3 3 2)
3. Pour 3 pints from B to A(6 0 2)
4. Pour 2 pints from C to B ( 6 2 0)
5. Pour 5 pints from A to C ( 1 2 5)
6. Pour 1 pint from C to B ( 1 3 4)
7. Pour 3 pints from B to A (4 0 4)

Dec 16, 2012
kra5050:

I think I did this right.....

Start (8 0 0)
1. Pour 5 pints from A to C (3 0 5)
2. Pour 3 pints from C to B (3 3 2)
3. Pour 3 pints from B to A(6 0 2)
4. Pour 2 pints from C to B ( 6 2 0)
5. Pour 5 pints from A to C ( 1 2 5)
6. Pour 1 pint from C to B ( 1 3 4)
7. Pour 3 pints from B to A (4 0 4)

I looked at your answer after I solved it myself. Got the same thing, so it's confirmed.

Dec 16, 2012
Dec 16, 2012

Very misleading title.

Dec 16, 2012
SirTradesaLot:

Very misleading title.

Tits or GTFO.

Dec 16, 2012
Pwn3r:
SirTradesaLot:

Very misleading title.

Tits or GTFO.

Dec 17, 2012
SirTradesaLot:

Very misleading title.

+1

I don't throw darts at a board. I bet on sure things. Read Sun-tzu, The Art of War. Every battle is won before it is ever fought- GG

Dec 16, 2012
cujo.cabbie:

3 jugs

Jug A: 8 pints liquid
Jug B: 3 pints liquid
Jug C: 5 pints liquid

You need to get 4 pints exactly in Jug A and Jug C but have nothing in Jug B.

You can only pour an amount to fill an entire jug. For example if you pour 'all of' Jug A into Jug C there will be 3 pints left in Jug A and 5 pints in Jug C. If you pour all of Jug C into Jug B there will be 3 pints in Jug B and 2 pints in Jug C (and Jug A will still have 3 pints).

There is no 4th container.

You have a maximum of 7 moves/transfers.

How do you do this?

(This is a variation of a the typical jugs brainteaser asked in interviews. I get 2 pints but if you transfer that into any jug it will be more then 2 pints won't it?)

There is something wrong in your explanation. By extrapolation I see that Jug A has a total volume of 10 pints, but when you talk about pouring Jug C into Jug B, there will still only be 3 pints in Jug B, but now 2 pints in C and 3 in A. How the hell does that make sense? Jug A originally had 8 pints, C had 5, where do you get 3 and 2 respectively. And are you trying to imply that B is only 3 pints?

Very poorly worded. I have seen similar problems like this before and they arent hard, but everything needs to be clear and correct. Not just about.

Dec 16, 2012

He clarified in his next post...it makes sense to me?

Dec 16, 2012
kra5050:

He clarified in his next post...it makes sense to me?

I didnt see the next post, and now it makes sense. It was ambiguous that the first statement was trying to indicate the jugs total capacity vs. what was inside them. But, I didn't see the second post to decypher tht it was trying to indicate capacity. No worries then.

Dec 16, 2012

Gotcha, I was like WTF at first too. It was definitely one of the more challenging jug problems. I solved it a different way originally but it was 8 moves

Dec 17, 2012

This is a harder version: 3 jugs only

Jug A: 7 pints liquid
Jug B: 4 pints liquid
Jug C: 3 pints liquid

You need to get 2 pints exactly in Jug A and Jug B and 3 pints in Jug C.

Same rules as above except:

- You start with 7 pints in jug A.
- You have only 6 transfers available

How do you do this?

(Are you solving this by trial and error or a system?)

Dec 17, 2012

1-Click to Unlock All Comments - 100% FREE

Why do I need to be signed in?
WSO is a knowledge-sharing community that depends on everyone being able to pitch in when they know something.
+ Bonus: 6 Free Financial Modeling Lessons with 1-Click Signup ($199 value)