wu :: forums
« wu :: forums - You have a jug that holds five gallons »

Welcome, Guest. Please Login or Register.
Apr 26th, 2024, 5:52am

RIDDLES SITE WRITE MATH! Home Home Help Help Search Search Members Members Login Login Register Register
   wu :: forums
   riddles
   easy
(Moderators: SMQ, towr, william wu, ThudnBlunder, Grimbal, Icarus, Eigenray)
   You have a jug that holds five gallons
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: You have a jug that holds five gallons  (Read 5796 times)
UgoLocal02
Newbie
*





   


Gender: male
Posts: 31
You have a jug that holds five gallons  
« on: Jun 12th, 2014, 2:17am »
Quote Quote Modify Modify

You have a jug that holds five gallons, and a jug that holds three gallons. You have no other containers, and there are no markings on the jugs. You need to obtain exactly seven gallons of water from a faucet. How can you do it?
 
Second Problem: You need exactly four gallons. How do you do it?
IP Logged
Lupin
Junior Member
**





   


Gender: male
Posts: 102
Re: You have a jug that holds five gallons  
« Reply #1 on: Jul 5th, 2014, 6:57pm »
Quote Quote Modify Modify

Wonder why no one has tackled this one.
 
For seven (and four) gallons: Fill 5-gallon jug.  From this jug, fill 3-gallon jug.  Two gallons are left on 5-gallon jug.  Empty 3-gallon jug.  Transfer contents of 5-gallon jug into 3-gallon jug.  Now fill 5-gallon jug with water.  You have exactly seven gallons (5+3)   If you need four gallons, then fill 3-gallon jug (which contains 2 gallons) from 5-gallon jug and four gallons are left on 5-gallon jug.
 
Can you measure exactly  1, 2, 3, 4, 5, 6, 7, 8 gallons? Cheesy
 
OK, so not exactly let’s say approximately
IP Logged
rloginunix
Uberpuzzler
*****





   


Posts: 1029
Re: You have a jug that holds five gallons  
« Reply #2 on: Jul 5th, 2014, 7:55pm »
Quote Quote Modify Modify

total capacity.liters now. remaining capacity, e.g 3.2.1 = 3-liter jug has 2 liters in it and can fit 1 more liter.
 
Exactly:
 
8: 3.3.0 + 5.5.0
7: 5.5.0 - 3 -> 3.0.3 = 5.2.3, 3.3.0; 3.0.3; 5.2.3 - 2 -> 3.0.3 = 3.2.1, 5.0.5; 5.5.0
6: 3.3.0 - 3 -> 5.0.5 = 3.0.3, 5.3.2; 3.3.0 - 2 -> 5.3.2 = 3.1.2, 5.5.0
5: 5.5.0
4: 5.5.0 - 3 -> 3.0.3 = 5.2.3, 3.3.0; 3.0.3; 5.2.3 - 2 -> 3.0.3 = 3.2.1, 5.0.5; 5.5.0 - 1 -> 3.2.1 = 3.3.0, 5.4.1
3: 3.3.0
2: 5.5.0 - 3 -> 3.0.3 = 5.2.3, 3.3.0
1: see 6.
 
 
 
[edit]
Hid number 2 as per dudiobugtron's notice.
By doing the number six in a more laborious way I was able to reuse it for number one.
Somehow I've totally missed the discussion that followed after my post.
Sorry.
[/edit]
« Last Edit: Aug 19th, 2014, 12:40pm by rloginunix » IP Logged
EdwardSmith
Junior Member
**





   
WWW

Posts: 61
Re: You have a jug that holds five gallons  
« Reply #3 on: Jul 6th, 2014, 2:25am »
Quote Quote Modify Modify

There are two ways of doing this.
Firstly fill the five gallon jug. Drink one gallon. You are left with 4 gallons.
Or
Fill both jugs. Drink four gallons from the five gallon jug then top it up with the 3 gallon jug.
IP Logged


Schottland Pension
dudiobugtron
Uberpuzzler
*****





   


Posts: 735
Re: You have a jug that holds five gallons  
« Reply #4 on: Jul 6th, 2014, 4:11pm »
Quote Quote Modify Modify

rloginunix - your solution to '2' should be hidden, since it is as likely to help you get 7 as the solution to 4 is. (2 + 5 = 4 + 3)
 
Also, your solution to 6 has an unnecessary step at the end. Tongue 3 + 3 = 1 + 5
 
A further question: imagine the jugs are constructed such that they can hold any integer number of litres of water less than or equal to their capacity.  At the start, they both hold zero litres.  The 'extra' negative litres are accessed through a secret compartment, so as well as filling the jugs to capacity, you can also fill them up to zero, and empty them down to zero.  Can you get a jug with -1 litres?  Can you get a jug to contain any arbitrary n < 0 ?
 
on Jul 6th, 2014, 2:25am, EdwardSmith wrote:
There are two ways of doing this.
Firstly fill the five gallon jug. Drink one gallon. You are left with 4 gallons.
Or
Fill both jugs. Drink four gallons from the five gallon jug then top it up with the 3 gallon jug.

I like these answers aesthetically. But of course unless you yourself are a measuring jug, you can't determine how many gallons you have consumed.
IP Logged
towr
wu::riddles Moderator
Uberpuzzler
*****



Some people are average, some are just mean.

   


Gender: male
Posts: 13730
Re: You have a jug that holds five gallons  
« Reply #5 on: Jul 6th, 2014, 10:07pm »
Quote Quote Modify Modify

on Jul 6th, 2014, 4:11pm, dudiobugtron wrote:
A further question: imagine the jugs are constructed such that they can hold any integer number of litres of water less than or equal to their capacity.  At the start, they both hold zero litres.  The 'extra' negative litres are accessed through a secret compartment, so as well as filling the jugs to capacity, you can also fill them up to zero, and empty them down to zero.  Can you get a jug with -1 litres?
Sure, 5 - 3 - 3
 
Quote:
Can you get a jug to contain any arbitrary n < 0 ?

-2 = 3 - 5
So we can get 0, -1 and -2, and therefor we can get any negative number by just repeatedly removing 3 (after moving the measured amount to 5 if necessary)

IP Logged

Wikipedia, Google, Mathworld, Integer sequence DB
lillianj
Newbie
*





   


Posts: 3
Re: You have a jug that holds five gallons  
« Reply #6 on: Aug 19th, 2014, 11:59am »
Quote Quote Modify Modify

confuse for me  Huh
IP Logged
movie4fun
Newbie
*





   


Gender: male
Posts: 49
Re: You have a jug that holds five gallons  
« Reply #7 on: Aug 20th, 2014, 1:01am »
Quote Quote Modify Modify

First problem- Fill 5 and then fill 3 using the water from 5. then empty 3 and put the two gallon from 5 to 3. and now fill 5 again. you have 7 in total.
 
Second problem-  fill three and put all in 5. then fill 3 again and pour as much as you can to 5. so 5 is full and three has 1. now empty 5 and take the 1 from 3 to 5. and now fill 3 again. in total you will have 4.
« Last Edit: Aug 20th, 2014, 1:07am by movie4fun » IP Logged
Technologeek
Junior Member
**



Any problem? Contact me by MP

   
WWW Email

Gender: male
Posts: 52
Re: You have a jug that holds five gallons  
« Reply #8 on: Sep 2nd, 2014, 10:00pm »
Quote Quote Modify Modify

I already knew it  Grin
IP Logged

Against Wikipedia totalitarism - Proofs Wiki: The Mean value theorem proof and
Fundamental theorem of calculus
wakiza33
Junior Member
**



industrial Engineer // Berkeley Alumnus

   
WWW

Posts: 54
Re: You have a jug that holds five gallons  
« Reply #9 on: Sep 10th, 2014, 9:09am »
Quote Quote Modify Modify

A classic.
IP Logged

Binder Jetting Engineer
Grimbal
wu::riddles Moderator
Uberpuzzler
*****






   


Gender: male
Posts: 7527
Re: You have a jug that holds five gallons  
« Reply #10 on: Sep 12th, 2014, 12:58am »
Quote Quote Modify Modify

I think I have given the solution somewhere else:
 
hidden:
- if A is empty, fill A,
- if B is full, empty B,
- else transfer from A to B.
 
Continue until you have the wanted quantity in A, B or A+B.

That works for all 2-bucket problems.  It doesn't matter which one is A and which one B.
IP Logged
Annettagiles
Junior Member
**





   


Gender: male
Posts: 67
Re: You have a jug that holds five gallons  
« Reply #11 on: Nov 4th, 2014, 3:37am »
Quote Quote Modify Modify

How is it possible?
IP Logged
csendra
Newbie
*





   


Gender: female
Posts: 4
Re: You have a jug that holds five gallons  
« Reply #12 on: Nov 21st, 2014, 10:51pm »
Quote Quote Modify Modify

yes agree with the EdwardSmith that Firstly fill the five gallon jug. Drink one gallon. You are left with 4 gallons. Or Fill both jugs. Drink four gallons from the five gallon jug then top it up with the 3 gallon jug.
 else i don't think so there is another solution of it
« Last Edit: Nov 21st, 2014, 10:51pm by csendra » IP Logged
Littleton
Newbie
*





   


Posts: 12
Re: You have a jug that holds five gallons  
« Reply #13 on: Nov 22nd, 2014, 3:55am »
Quote Quote Modify Modify

Just fill one halfway!  Grin
IP Logged
anglia
Junior Member
**





   
WWW

Gender: female
Posts: 60
Re: You have a jug that holds five gallons  
« Reply #14 on: Aug 24th, 2015, 10:39pm »
Quote Quote Modify Modify

Drink one and 7 would be left.
IP Logged

ebooks
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board