1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

[Linear Algebra] Pouring Problem

  1. Jun 10, 2014 #1
    1. The problem statement, all variables and given/known data
    Two glasses.
    First glass has 1 L of water.
    Second glass has 1 L of alcohol.
    Step (1) Pour 1/2 of liquids from glass 1 to glass 2.
    Step (2) Pour 1/2 of liquids from glass 2 to glass 1.

    What is the limiting situation after 1 billion steps.


    2. Relevant equations

    N/A

    3. The attempt at a solution

    I tried solving the question with a series. if Q = the size of the transfer each time.
    Glass 1: Xn+1 = (1-q)Xn + q (1+(q-1)Xn)/(1+q)
    Glass 2: 1-Xn+1 = (1-(1-q)Xn)/(1+q)

    And by proving that 1/2 0 xn will converge to 0, I reach a conclusion.

    However, I was told my by instructor that I actually need to use transitional matrixes and the solution should indicate that the content of alcohol / water in both glasses will fluctuation between 1/2 and 1/3.

    Thanks for anyone's help!
     
    Last edited: Jun 10, 2014
  2. jcsd
  3. Jun 10, 2014 #2

    haruspex

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    Please define Xn.
    Is Q supposed to be a fixed volume? The amount transferred at each step varies.
     
  4. Jun 10, 2014 #3
    Xn is the quantity of liquids after the pour. Q is my particular case in 0.5.
    I'm looking for a solution in transitional matrix in this case so i don't think my solution in relevant, i just wanted to post it to prove that I actually thought through the problem and is looking for help for an alternative method to solve it.
     
  5. Jun 10, 2014 #4

    haruspex

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    There are two liquids and two glasses. That suggests two variables (since two pairwise sums are constant). Xn could be a vector of these, but then I cannot interpret your equations.
    (You seem to have made the total of each liquid be 1, which is fine.)
     
  6. Jun 11, 2014 #5

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    If I interpret your description literally, here is what I get. We start with 1 L water in G1 and 1 L Alc in G2. We pour 1/2 L from G1 into G2, so we now have 1/2 L of water in G1 and 1.5 L of water-alc mix in G2. Now we pour 1/2 the contents of G2 into G1, so we will pour 3/4 L from G2 into G1. That means we now have 0.5 + 0.75 = 1.25 L of water-alc mix in G1 and 0.75 L of water-alc mix in G2 (but the proportions in G1 and G2 are different). Now we pour (0.5)*(1.25) = 0.625 L from G1 into G2, leaving 0.625 L in G1 and giving us 0.625+0.75 = 1.375 L in G2, etc, etc, etc. Is that really how you want it to work?
     
  7. Jun 11, 2014 #6

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    If I am reading this correctly, step1 takes half the liquid in glass 1 and adds it to glass 2. That is, if glass 1 contains volume A and glass 2 volume B, after step 1, glass 1 will contain volume A/2 and glass B will contain volume B+ A/2. we can represent that by the matrix multiplication
    [tex]\begin{pmatrix}\frac{1}{2} & 0 \\ \frac{1}{2} & 1 \end{pmatrix}\begin{pmatrix}A \\ B \end{pmatrix}= \begin{pmatrix}\frac{1}{2}A \\ \frac{1}{2}A+ B\end{pmatrix}[/tex]

    Step 2 takes half the liquid in glass 2 and adds it to glass 1. That is, if glass A contained volume A and glass 2 volume B, after step 2, glass 1 will contain volume A+ B/2 and glass 2 will contain volume B/2. We can represent that by the matrix multiplication
    [tex]\begin{pmatrix}1 & \frac{1}{2} \\ 0 & \frac{1}{2}\end{pmatrix}\begin{pmatrix}A \\ B\end{pmatrix}= \begin{pmatrix}A+ \frac{1}{2}B \\ \frac{1}{2}B\end{pmatrix}[/tex].

    Rather than deal with individual "steps" I would combine those into 1 round: If glass1 contains volume A and glass 2 contains volume B after a single round of 2 "steps" the glasses will contain:
    [tex]\begin{pmatrix}1 & \frac{1}{2} \\ 0 & \frac{1}{2}\end{pmatrix}\begin{pmatrix}\frac{1}{2} & 0 \\ \frac{1}{2} & 1\end{pmatrix}\begin{pmatrix}A \\ B \end{pmatrix}=\begin{pmatrix} \frac{3}{4} & \frac{1}{2} \\ \frac{1}{4} & \frac{1}{2}\end{pmatrix}\begin{pmatrix}A \\ B\end{pmatrix}[/tex]

    For example, if A is "1 liter of alcohol" and B is "1 liter of water", after a single two step "round" the first glass will contain 3/4 liter of alcohol and 1/2 liter of water and the second glass will contain 1/4 liter of alcohol and 1/2 liter of water. (The amount of liquid in the two glasses does NOT stay the same. After step 1, there is more liquid in the second glass than the first so, in step 2, when we pour half of glass 2 into glass 1, we are putting more liquid back in than we took out.)

    1000000000 "steps" will be 500000000 two step "rounds" so what you want to find is
    [tex]\begin{pmatrix} \frac{3}{4} & \frac{1}{2} \\ \frac{1}{4} & \frac{1}{2}\end{pmatrix}^{500000000}\begin{pmatrix}A \\ B\end{pmatrix}[/tex]

    The simplest way to find a high power of a matrix is to "diagonalize". This matrix has 2 distinct eigenvalues (1 and 1/4) so two independent eigenvectors. If Y is the matrix having eigenvectors of matrix X as columns then [tex]X= YDY^{-1}[/tex] where "D" is the diagonal matrix with the eigenvalues of X on the diagonal and then [tex]X^{500000000}= YD^{500000000}Y^{-1}[/tex].
     
    Last edited: Jun 11, 2014
  8. Jun 17, 2014 #7
    Thank You

    Hello HallsofIvy,

    Thanks for the response, I will look into solving the system that you have outlined myself.
    I had a quick question, the system that you created was only because you had assumed that based on the question, there will be a equilibrium states for both glass 1 and glass 2 (and for the record you understood the question correctly), the question is that how do I prove that these equilibrium states exist for both glasses?

    Best,
    mattchen82
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: [Linear Algebra] Pouring Problem
  1. Linear Algebra Problem (Replies: 6)

  2. Linear algebra problem (Replies: 1)

Loading...