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

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

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

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)

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.

Tits or GTFO.

Pwn3r:

Tits or GTFO.

+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

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.

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

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.

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

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: