# Final amount after X seconds

• Jul 13th 2012, 08:05 AM
CakeSpear
Final amount after X seconds
Hi
I have 3 trasparent Containers A, B and C wich can contain water. It is possible to have an negative amount of water.

Container A start off with a random amount ( a ) of water. The amount of water can be negative or possitive.
Container B starts of with a fixed amount ( b ) of water wich never changes. The amount of water can be negative or possitive.
Container C starts off empty.

Every second i take a bucket and fill it with the exact amount of water wich is in Container B, and then pour it intoo Container C.
Every second i take a bucket and fill it with the exact amount of water wich is in Container C, and pour it intoo Container A.

...
After x number of seconds ( t ), how much water is in container A?
• Jul 13th 2012, 10:03 AM
Soroban
Re: Final amount after X seconds
Hello, CakeSpear!

Did you make any sketches?

Quote:

I have 3 trasparent Containers A, B and C which can contain water.
It is possible to have an negative amount of water.

Container A start off with a random amount of water $a$.
Container B starts of with a fixed amount of water $b$which never changes.
Container C starts off empty.

Every second I take a bucket and fill it with the exact amount of water which is in Container B,
. . and then pour it into Container C.
Every second I take a bucket and fill it with the exact amount of water which is in Container C,
. . and then pour it into Container A.
. . and so on.

After $t$seconds, how much water is in container A?

Note that the water is not transferred from container to container.
The additional water comes from an outside source.

Here is what I found . . .

The containers start like this:
Code:

      |      |       |      |       |      |                  |      |       |      |                  |      |       |      |                  |      |       |      |                  |      | t = 0 |      |                  |      |       | - - - |    |      |    |      |       |:::::::|    | - - - |    |      |       |:::a:::|    |:::b:::|    |      |       * - - - *    * - - - *    * - - - *           A            B            C

$b$ is added to container C.
Code:

      |      |       |      |       |      |                  |      |       |      |                  |      |       |      |                  |      |       |      |                  |      | t = 1 |      |                  |      |       | - - - |    |      |    |      |       |:::::::|    | - - - |    | - - - |       |:::a:::|    |:::b:::|    |:::b:::|       * - - - *    * - - - *    * - - - *           A            B            C

Then $b$ is added to container A.
Code:

      |      |       |      |       |      |                  |      |       |      |                  |      |       |      |                  |      |       |      |                  |      | t = 2 | - - - |                  |      |       |:::::::|    |      |    |      |       |::a+b::|    | - - - |    | - - - |       |:::::::|    |:::b:::|    |:::b:::|       * - - - *    * - - - *    * - - - *           A            B            C

$b$ is added to Container C.
Code:

      |      |       |      |       |      |                  |      |       |      |                  |      |       |      |                  |      |       |      |                  |      | t = 3 | - - - |                  | - - - |       |:::::::|    |      |    |:::::::|       |::a+b::|    | - - - |    |::2b:::|       |:::::::|    |:::b:::|    |:::::::|       * - - - *    * - - - *    * - - - *           A            B            C

Then $2b$ is added to Container A.
Code:

      |      |       |      |       |      |                  |      |       |      |                  |      |       | - - - |                  |      |       |:::::::|                  |      | t = 4 |:::::::|                  | - - - |       |::a+3b:|    |      |    |:::::::|       |:::::::|    | - - - |    |::2b:::|       |:::::::|    |:::b:::|    |:::::::|       * - - - *    * - - - *    * - - - *           A            B            C

$b$ is added to Container C.
Code:

      |      |       |      |       |      |                  |      |       |      |                  |      |       | - - - |                  |      |       |:::::::|                  | - - - | t = 5 |:::::::|                  |:::::::|       |::a+3b:|    |      |    |:::::::|       |:::::::|    | - - - |    |:::3b::|       |:::::::|    |:::b:::|    |:::::::|       * - - - *    * - - - *    * - - - *           A            B            C

Then $3b$ is added to Container A.
Code:

      |      |       |      |       | - - - |                  |      |       |:::::::|                  |      |       |:::::::|                  |      |       |:::::::|                  | - - - | t = 6 |::a+6b:|                  |:::::::|       |:::::::|    |      |    |:::::::|       |:::::::|    | - - - |    |:::3b::|       |:::::::|    |:::b:::|    |:::::::|       * - - - *    * - - - *    * - - - *           A            B            C

We see a pattern developing.

. . $\begin{array}{cc}\text{Time} & \text{Container A} \\ \hline 0 & a \\ 2 & a+b \\ 4 & a+3b \\ 6 & a+6b \\ \vdots & \vdots \end{array}$

The coefficients of $b$ are triangular numbers: . $0,1,3,6,10, 15, \hdots$

If time is an even number of seconds, $t\,=\,2k$

. . then: . $A \;=\;a + \frac{k(k+1)}{2}b$
• Jul 13th 2012, 01:35 PM
CakeSpear
Re: Final amount after X seconds
Thank you for taking the time to illustrate and explain this.
You really make it seem more logical the way you explain it :)

But i dont understand why time is increased by 2 for each step.
In my case time should increase by only 1 each step.
In that case would the new formula be
a + ( ( ( t+1 ) / 2 ) * b )
???

And might i ask how you create such nice Image Tables/ Lists?
I would be very usefull for me when trying to solve thing on my own :)