Measuring water

If you had an infinite supply of water and a 5 gallon and 3 gallon bucket, how would you measure exactly 4 gallons?

5          3

Fill up 3            0          3

Tip into 5          3          0

Fill up 3             3          3

3 to 5                5          1

Tip out 5           0          1

3 to 5                1          0

Fill up 3            1    +    3 = 4

 DifficultyModerate TypeLogicMathematical

ithink different: let keep 5 gallon bucket as A adn other bucket B

fill up A and pour it on B
there will be 2 gallons left

and repeat once more

u will have agian 2 gallons left
and there u go 4 gallons

- (17 May 2009)

Put water 1/2 of 5=2.5 gal
Put water 1/2 of 3=1.5 gal
Total =4.0 gal
- Nan Nwe Nwe (28 Jul 2009)

Fill both buckets and freeze them then measure the difference that will equal 2 gallons double the distance and and u have four once thawed u will know how deep 4 gallons will be
- Kurt (24 Aug 2009)

lol @ the silliness of comments... what if the jugs are shaped like milk jugs and have irregular shape.

A more efficient way:
Fill up 5 gallon jug and pour it into 3 gallon jug. 2 gallons left.
Pour out the 3 gallon jug and pour 2 gallons into the 3 gallon jug.
Fill up the 5 gallon jug and pour enough to fill up the 3 gallon jug (it has space for 1 more gallon). You will have 4 gallons left in the 5 gallon jug.
- kevin (13 Nov 2009)

Holy shit. This riddle is from one of the Die Hard movies. Bruce Willis and Sammy L. Jackson had to get EXACTLY four gallons of water out of 3 and a 5 gallon buckets or else a bomb was gonna blow.

They did it just as Kurt described and then screamed "4 gallons!" in unison, just in the knick of time!
- mike (8 Mar 2010)

lets assume that they have a typical bucket shape.

put the 3 gallon bucket inside the 5 gallon bucket. fill the crack between the the two buckets. take the 3 gallon bucket out and you have two gallons in the 5 gallon bucket. pour the 2 gallons into the smaller bucket and then put the small bucket (which has two gallons in it) back into the 5 gallon bucket. fill crack again. remove 3 gallon bucket and then in each bucket you have 2 gallons
- joeman (11 Mar 2010)

Fill up the 3 gallon jug and pour it into the 5 gallon jug. Re-fill the 3 gallon jug and pour that into the 5 gallon jug (You will have one gallon left over in the 3 gallon jug). Dump out the now-full 5 gallon jug. Pour the 1 gallon in the 3 gallon jug into the 5 gallon jug. Re-fill the 3 gallon jug and pour that into the 5 gallon jug (1 + 3 = 4).
- Nyx (13 Mar 2010)

@ Kevin - Yup - that's exactly how Bruce Willis did it in Die Hard 3......
- Doug (13 Mar 2010)

put the 3 gallon into a larger bucket. fill the 5 gallon. empty it into the 3 gallon. you'd have 2 gallons in the larger bucket. repeat...you'd then have 4 gallons.
- bel (14 Mar 2010)

correct kevin. very simple riddle.
- james (14 Mar 2010)

Love the logic being thrown in with the Mathematics here guys; but incase you haven't noticed there's a kink in your theories: There are only 2 buckets.

That means doing the "5 into 3 and you have 2 left over" solution would require three buckets... Or else you're just refilling one of your buckets when you go to measure out your second 2-gallons. =_=
- (8 Apr 2010)

to the guy in the comment above mine, you don't need 3 buckets, you just pour the three gallons of water out of the three gallon bucket that you filled with the five gallon bucket. Now you have an empty three gallon bucket, and a five gallon bucket with two gallons of water in it. Next transfer the two gallons from the five gallon bucket to the three gallon bucket. Now you have an empty five gallon bucket and a three gallon bucket with two gallons of water in it. Next fill the five gallon bucket with the never-ending supply of water. Now you have a full five gallon bucket and a three gallon bucket with two gallons of water. Next top off your three gallon bucket with water from the five gallon bucket. Now you are done. You have three gallons of water in the three gallon bucket and FOUR in the five gallon bucket. ONLY TWO BUCKETS USED!!!
- jim (28 Apr 2010)

Yeah thanks for your genius there Jimbo but we got that part. The comment above yours was refering to other comments that are saying to pour 5 into 3 leaving 2 remaining and then repeat the process.
- Markas (26 Jun 2010)

lest assume that infinity is infinite then the infinite answer to this question would not be something like infinity because if infinity is infinite then u would have nothing but infinity and if that is true then the answers is infinity
- ojan (29 Jun 2010)

First pour water in 5 Lt gallon and pour the water
from 5Lr into 3Lr gallon then 2Lr will be left in 5lr gallon
now take out the water from 3Lr gallon and pour the 2Lr of present in 5Lr gallon
Now fill the 5Lr Gallon completely and then pour the water from it to the 3Lr gallon,as 3Lr gallon is containing 2Lr already, it will take only 1Lr that means the 5Lr gallon will now contain 4Lr So Simple

step no 5Lr 3Lr
1 5 0
2 2 3
3 0 2
4 5 2
5 4 3
- Md Khaja Aleemuddin (15 Oct 2010)

This isn't that hard. Kevin is correct. Some of the other algorithms are really inventive and entertaining.
- Steve Pemberton (25 Sep 2016)