“I bought this guide a few days ago to prepare for my interview with Oracle. Many of the questions they asked me were from this guide. I found this book absolutely great!”
Measure 5 quart using the 5 quart pail, Then fill the 3 quart pail from 5 quat p ail. You have 2 quart left in the 5 quart pail. So, measure 2 quarts. Repeat the process and you will have measured four quarts.
Your answer to the riddle is incorrect unless you have multiple 5 quart pails since…. to add water for your stated second trial to the 3 quart pail you shall have to fill the 5 quart pail loosing your original 2 quarts.
The riddle does not state a limitted amount of water…. just a limited number of pails and the volume of water the pails can hold.
1) Thus……. using the 3 quart pail add its contents to the 5 quart pail.
2) Result …. 5 quart pail has 3 quart volume with the 3 quart pail is empty.
3) Once again fill the 3 quart pail to its max volume. Begin adding water to the 5 quart pail. Once the 5 quart max volume is reached you will have added 2 quarts of water leaving 1 quart of water remainnig in the 3 quart pail.
4) Throw the contents of the 5 quart pail on the ground.
5) Take the 1 quart of water in the 3 quart pail and add to the now empty 5 quart pail. Result 1 quart of water in the 5 quart pail.
Then refill the 3 quart pail to its max then add the contents to the 5 quart pail….. thus the 5 quart pail has 4 quarts of water. HE HE HE!
Thanks Lorene!..You are absolutely right..I just assumed that you had some sort of container to hold the 4 quart that you wanted to measure…
1. Fill 5 qt. pail. 2. Fill 3 qt. pail from 5 qt. pail leaving 2 qts. 3. Empty 3 qt. pail and fill with 2qt. water from the 5 qt. pail. 4. Fill 5 qt. pail. 5. Pour water from 5 qt. pail until you fill 3 qt. pail, leaving 4 qts.
depending on thickness and shape of pails may be far off or impossible but a different way to think about it nonetheless:
put 3qt pail inside 5qt so that when 5qt is filled, 3qt *displaces* 3qts of water leaving 2qts. put water in 3qt and repeat. empty 3qt back into 5qt to make 4 qts.
fill 3 quarts in the 5 quarts pail using the 3 quart pail. fill again till the 5 quart pail is full using the 3 quart pail, leaving 1 quart in the 3 quart pail.
now empty the 5 quart pail, fill it with the 1 quart left in 3 qt pail, and then use the 3 quart pail to make this 4 quarts
fill 5 quart pail fill 3 quart pail with 5 quart pail,leaving 2 quarts in 5 quart pail now empty out the 3 quart pail empty out remaining 2 quarts in 5 quart pail to 3 quart pail now fill 5 quart pail again and empty out 1 quart in to 3 quart pail so you will have 4 quarts of water in 5 quart pail;
fill 3 then pour it in 5 fill 3 again then pour it in 5 again so now u have 1 in 3 throw 5 fill it with contents of 3 fill 3 then put it in 5 u have 4 in 5
I got the answer that BBK got prior to reading everyones answers. That is the solution I came up with. I believe it’s simple and quick. Fill each pail half ways (5 qt to 2.5qts) and (3 qts to 1.5) leaving you with 2.5+1.5 (after adding contents of pail 3qt. to pail 5qt.= 4qts.
On another note, I’m looking for HP type interview questions. Please forward me any info you may know where I can find such questions for a firmware position. (email at ceramire@alumni.calpoly.edu)
1. Fill the 5qt one up (five = 5, three = 0)
2. Fill the 3qt one with the contents of the 5qt one. (five = 2, three = 3)
3. Empty the 3qt one (five = 2, three = 0)
4. Poor the rest of the 5qt one into the 3qt one (five = 0, three = 2)
5. Fill the 5qt one up again (five = 5, three = 2)
6. Fill the 3pt one up with the water from the 5qt one (five = 4, three = 3)
Lets name 5 quarter pail as 5QP and 3 quater pail as 3QP
1) Fill 5QP completely
2) From the 5QP, fill the 3QP completely. Now we have 2 Q in 5QP.
3) Empty 3QP
4) Transfer 2 quarts from 5QP to 3QP
5) Fill 5QP completely
6) Fill up 3QP by transferring from 5QP, since 3QP is already having 2Q, it needs 1 Q to get filled and we will have 4 Q left in 5QP
To illustrate, the contents in each pail at the end of each step
5 QP 3 QP
—- ——
Step1 5 0
Step2 2 3
Step3 2 0
Step4 0 2
Step5 5 2
Step6 4 3
If the pails are cylinders, rectangular prisms or otherwise rotationally symmetrical along the pouring axis, a simplification is:
Fill the 5 gal. pail
Fill the 3 gal. pail
Tilt each one, pouring the water out until the water level just touches the opening on one side and the inside, bottom corner on the other. Because the empty space above the water has the same shape as the volume of the water, you will have poured out exactly half of each pail. You now have 2.5 gal + 1.5 gal = 4 gallons of water.
take water of 3 qt pail
fill 5 qt pail with 3 qt pail water
then we get 3q of water in 5 qt pail
again do the same above but this time 5qt is capable of store only 2qt. so, we left with 1qt .
now empty the 5 qt pail and fill it with remain 1qt of water in the above step.
finally take the 3qt pail of water fill the 5 qt so we’ll get 4qt of warer in 5qt.
By taking 5 quarts and 3 quarts. Fill water
5 Quart 3 Quart Comment
0 3 Fill 3 quart
3 0
5 0
2 3
2 0 Throw water down
0 2
5 2
4 3 So finally in 5 quart, you Result can store 4 quarts
Measure 5 quart using the 5 quart pail, Then fill the 3 quart pail from 5 quat p
ail. You have 2 quart left in the 5 quart pail. So, measure 2 quarts. Repeat the
process and you will have measured four quarts.
sent by : Lorne Kettle
Your answer to the riddle is incorrect unless you have multiple 5 quart pails since…. to add water for your stated second trial to the 3 quart pail you shall have to fill the 5 quart pail loosing your original 2
quarts.
The riddle does not state a limitted amount of water…. just a limited number of pails and the volume of water the pails can hold.
1) Thus……. using the 3 quart pail add its contents to the 5 quart pail.
2) Result …. 5 quart pail has 3 quart volume with the 3 quart pail is empty.
3) Once again fill the 3 quart pail to its max volume. Begin adding water to the 5 quart pail. Once the 5 quart max volume is reached you will have added 2 quarts of water leaving 1 quart of water remainnig in the 3 quart pail.
4) Throw the contents of the 5 quart pail on the ground.
5) Take the 1 quart of water in the 3 quart pail and add to the now empty 5 quart pail. Result 1 quart of water in the 5 quart pail.
Then refill the 3 quart pail to its max then add the contents to the 5 quart pail….. thus the 5 quart pail has 4 quarts of water. HE HE HE!
Thanks Lorene!..You are absolutely right..I just assumed that you had some sort of container to hold the 4 quart that you wanted to measure…
Another solution:
1. Fill 5 qt. pail.
2. Fill 3 qt. pail from 5 qt. pail leaving 2 qts.
3. Empty 3 qt. pail and fill with 2qt. water from the 5 qt. pail.
4. Fill 5 qt. pail.
5. Pour water from 5 qt. pail until you fill 3 qt. pail, leaving 4 qts.
depending on thickness and shape of pails may be far off or impossible but a different way to think about it nonetheless:
put 3qt pail inside 5qt so that when 5qt is filled, 3qt *displaces* 3qts of water leaving 2qts. put water in 3qt and repeat. empty 3qt back into 5qt to make 4 qts.
fill both pails half way, empty contents of 3-qt pail into 5-qt pail.
(5 / 2) + (3 / 2) = 4
I think….
fill 3 quarts in the 5 quarts pail using the 3 quart pail. fill again till the 5 quart pail is full using the 3 quart pail, leaving 1 quart in the 3 quart pail.
now empty the 5 quart pail, fill it with the 1 quart left in 3 qt pail, and then use the 3 quart pail to make this 4 quarts
fill 5 quart pail
fill 3 quart pail with 5 quart pail,leaving 2 quarts in 5 quart pail
now empty out the 3 quart pail
empty out remaining 2 quarts in 5 quart pail to 3 quart pail
now fill 5 quart pail again
and empty out 1 quart in to 3 quart pail
so you will have 4 quarts of water in 5 quart pail;
fill 3 then pour it in 5
fill 3 again then pour it in 5 again
so now u have 1 in 3
throw 5
fill it with contents of 3
fill 3 then put it in 5
u have 4 in 5
anyone seen “Die Hard With A Vengence” ???
I got the answer that BBK got prior to reading everyones answers. That is the solution I came up with. I believe it’s simple and quick. Fill each pail half ways (5 qt to 2.5qts) and (3 qts to 1.5) leaving you with 2.5+1.5 (after adding contents of pail 3qt. to pail 5qt.= 4qts.
On another note, I’m looking for HP type interview questions. Please forward me any info you may know where I can find such questions for a firmware position. (email at ceramire@alumni.calpoly.edu)
1. Fill the 5qt one up (five = 5, three = 0)
2. Fill the 3qt one with the contents of the 5qt one. (five = 2, three = 3)
3. Empty the 3qt one (five = 2, three = 0)
4. Poor the rest of the 5qt one into the 3qt one (five = 0, three = 2)
5. Fill the 5qt one up again (five = 5, three = 2)
6. Fill the 3pt one up with the water from the 5qt one (five = 4, three = 3)
the end.
3+3
6-5=1
1+3=4
Lets name 5 quarter pail as 5QP and 3 quater pail as 3QP
1) Fill 5QP completely
2) From the 5QP, fill the 3QP completely. Now we have 2 Q in 5QP.
3) Empty 3QP
4) Transfer 2 quarts from 5QP to 3QP
5) Fill 5QP completely
6) Fill up 3QP by transferring from 5QP, since 3QP is already having 2Q, it needs 1 Q to get filled and we will have 4 Q left in 5QP
To illustrate, the contents in each pail at the end of each step
5 QP 3 QP
—- ——
Step1 5 0
Step2 2 3
Step3 2 0
Step4 0 2
Step5 5 2
Step6 4 3
If the pails are cylinders, rectangular prisms or otherwise rotationally symmetrical along the pouring axis, a simplification is:
Fill the 5 gal. pail
Fill the 3 gal. pail
Tilt each one, pouring the water out until the water level just touches the opening on one side and the inside, bottom corner on the other. Because the empty space above the water has the same shape as the volume of the water, you will have poured out exactly half of each pail. You now have 2.5 gal + 1.5 gal = 4 gallons of water.
Do I have a scale?
take water of 3 qt pail
fill 5 qt pail with 3 qt pail water
then we get 3q of water in 5 qt pail
again do the same above but this time 5qt is capable of store only 2qt. so, we left with 1qt .
now empty the 5 qt pail and fill it with remain 1qt of water in the above step.
finally take the 3qt pail of water fill the 5 qt so we’ll get 4qt of warer in 5qt.
By taking 5 quarts and 3 quarts. Fill water
5 Quart 3 Quart Comment
0 3 Fill 3 quart
3 0
5 0
2 3
2 0 Throw water down
0 2
5 2
4 3 So finally in 5 quart, you Result can store 4 quarts
Leave an Answer/Comment