Results 1 to 8 of 8

Math Help - Pour me another one

  1. #1
    MHF Contributor
    Joined
    Dec 2007
    From
    Ottawa, Canada
    Posts
    3,175
    Thanks
    74

    Pour me another one

    You got a 4gallon and a 9gallon container, an unmarked container, and a huge water supply.

    You want to end up with exactly 6 gallons in the unmarked container.
    YES: the unmarked container > 6 gallons!

    You mission is to do it in exactly 9 moves, and using the MINIMUM
    number of gallons of water from the water supply.

    A "move" is any pouring and/or filling; as example, filling the
    9gal from the water supply, then pouring to fill the 4gal container,
    then emptying it out is 3 moves: fill-pour-empty.

    How do you do it?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Super Member
    Joined
    Jan 2008
    Posts
    588
    Thanks
    87
    I shall refer to the 9 gallon, 4 gallon, and unmarked container as A, B, and C respectively. When I say A = 4, it means there are 4 gallons of water in container A.

    1. Fill A
    A = 9 B = 0 C = 0

    2. Pour water from A to B until B is full
    A = 5 B = 4 C = 0

    3. Pour the remaining water from A into C.
    A = 0 B = 4 C = 5

    4. Pour water from B into A
    A = 4 B = 0 C = 5

    5. Pour water from C into B until B is full
    A = 4 B = 4 C =1

    6. Empty B
    A = 4 B = 0 C = 1

    7. Top up the water in A
    A = 9 B = 0 C = 1

    8. Pour water from A to B until B is full
    A = 5 B = 4 C = 1

    9. Pour the remaining water from A to C
    A = 0 B = 4 C = 6

    Total gallons of water used =
    9 + 5 = 14

    I made that up along the way, but I'm not sure if it used the minimum number of water.
    Last edited by Gusbob; October 27th 2009 at 09:12 AM.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Super Member

    Joined
    May 2006
    From
    Lexington, MA (USA)
    Posts
    11,915
    Thanks
    779
    Hello, Wilmer!

    I think I got it . . .


    You have a 4-gallon and a 9-gallon container, an unmarked container, and a huge water supply.

    You want to end up with exactly 6 gallons in the unmarked container.
    (YES: the unmarked container > 6 gallons!)

    Your mission is to do it in exactly 9 moves, and using the MINIMUM number of gallons of water
    from the water supply.

    A "move" is any pouring, filling or emptying.
    For example, filling the 9-gal from the water supply,
    then pouring it to fill the 4-gal container,
    then emptying it is 3 moves: fill - pour - empty.

    How do you do it?
    Spoiler:


    (1) Fill the "9".

    Code:
                      *     *
                      |/////|
                      |/////|     *     *
                      |/////|     |     |
                      |/////|     |     |
          *     *     |//9//|     |  0  |
          |     |     |/////|     |     |
          |  0  |     |/////|     |     |
          *-----*     *-----*     *-----*
             4           9           U

    (2) Pour "9" into "4".

    Code:
                      *     *
                      |     |
                      |     |     *     *
                      |     |     |     |
                      |/////|     |     |
          *     *     |/////|     |  0  |
          |/////|     |//5//|     |     |
          |//4//|     |/////|     |     |
          *-----*     *-----*     *-----*
             4           9           U

    (3) Empty "4",

    Code:
                      *     *
                      |     |
                      |     |     *     *
                      |     |     |     |
                      |/////|     |     |
          *     *     |/////|     |  0  |
          |     |     |//5//|     |     |
          |  0  |     |/////|     |     |
          *-----*     *-----*     *-----*
             4           9           U

    (4) Pour "9" into "4".

    Code:
                      *     *
                      |     |
                      |     |     *     *
                      |     |     |     |
                      |     |     |     |
          *     *     |     |     |  0  |
          |/////|     |     |     |     |
          |//4//|     |//1//|     |     |
          * - - *     * - - *     * - - *
             4           9           U

    (5) Pour "9" into "U".

    Code:
                      *     *
                      |     |
                      |     |     *     *
                      |     |     |     |
                      |     |     |     |
          *     *     |     |     |     |
          |/////|     |  0  |     |     |
          |//4//|     |     |     |//1//|
          *-----*     *-----*     * - - *
             4           9           U

    (6) Empty "4".

    Code:
                      *     *
                      |     |
                      |     |     *     *
                      |     |     |     |
                      |     |     |     |
          *     *     |     |     |     |
          |     |     |  0  |     |     |
          |  0  |     |     |     |//1//|
          *-----*     *-----*     *-----*
             4           9           U

    (7) Fill "9".

    Code:
                      *     *
                      |/////|
                      |/////|     *     *
                      |/////|     |     |
                      |/////|     |     |
          *     *     |//9//|     |     |
          |     |     |/////|     |     |
          |  0  |     |/////|     |//1//|
          *-----*     *-----*     *-----*
             4           9           U

    (8) Pour "9" into "4".

    Code:
                      *     *
                      |     |
                      |     |     *     *
                      |     |     |     |
                      |/////|     |     |
          *     *     |/////|     |     |
          |/////|     |//5//|     |     |
          |//4//|     |/////|     |//1//|
          *-----*     *-----*     *-----*
             4           9           U

    (9) Pour "9" into "U".

    Code:
                      *     *
                      |     |
                      |     |     *     *
                      |     |     |     |
                      |     |     |/////|
          *     *     |     |     |/////|
          |/////|     |  0  |     |//6//|
          |//4//|     |     |     |/////|
          *-----*     *-----*     *-----*
             4           9           U

    . . ta-DAA!

    I used 18 gallons from the water supply
    . . and discarded 8 gallons.
    But I don't know if that's the optimal solution.



    Edit: Gusbob, brilliant solution!
    . . . You beat me by four gallons!
    . . . Nice work!
    .
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor
    Joined
    Dec 2007
    From
    Ottawa, Canada
    Posts
    3,175
    Thanks
    74
    Quote Originally Posted by Gusbob View Post
    5. Pour water from C into B until B is full
    A = 4 B = 4 C =1

    6. Empty B
    A = 4 B = 0 C = 1

    7. Top up the water in A
    A = 9 B = 0 C = 1
    Good stuff....BUT only 10 gallons need be taken from supply:
    At step#6, empty B into A: then you only need 1 gallon to fill A.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Dec 2009
    Posts
    9
    I'm assuming the 9 steps have to be defined and have meaning? So you don't pour into one barrel, then pour back, and repeat this to fill up a few steps? Because if such redundancy were permitted, this could be solved losing 6 gallons.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Newbie
    Joined
    Jul 2012
    From
    earth
    Posts
    15

    Re: Pour me another one

    Total gallons of water used = 9 + 5 = 14

    Hahaha very good answer, how did you get that so easily the question?

    _________________________________
    I love numbers
    Treatment centers in georgia click here
    Follow Math Help Forum on Facebook and Google+

  7. #7
    MHF Contributor
    Joined
    Dec 2007
    From
    Ottawa, Canada
    Posts
    3,175
    Thanks
    74

    Re: Pour me another one

    Hey buddy, you made your first 9 posts today: clearly to expose that link of yours.
    Why don't you return to that treatment center and ask them to lock you up!
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Newbie
    Joined
    Aug 2012
    From
    usa
    Posts
    17

    Re: Pour me another one

    Maybe it goes something like this Total gallons of water used = 9 + 5 = 14.... nice!


    Treatment programs website...
    Follow Math Help Forum on Facebook and Google+

Search Tags


/mathhelpforum @mathhelpforum