[Linear Algebra] Pouring Problem

In summary, the conversation discusses the situation of two glasses, one with 1 L of water and the other with 1 L of alcohol. After following certain steps of pouring liquid between the glasses, the question asks for the limiting situation after 1 billion steps. The attempt at a solution involves using transitional matrices, and the final solution should show that the content of alcohol and water in both glasses will fluctuate between 1/2 and 1/3. One method of solving this problem involves diagonalizing the matrix with two distinct eigenvalues and finding the equilibrium states for both glasses.
  • #1
mattchen82
3
0

Homework Statement


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.

Homework Equations



N/A

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:
Physics news on Phys.org
  • #2
Please define Xn.
Is Q supposed to be a fixed volume? The amount transferred at each step varies.
 
  • #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.
 
  • #4
mattchen82 said:
Xn is the quantity of liquids after the pour.
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.)
 
  • #5
mattchen82 said:

Homework Statement


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.


Homework Equations



N/A

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!

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?
 
  • #6
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 by a moderator:
  • Like
Likes 1 person
  • #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?


mattchen82
 

What is the "pouring problem" in linear algebra?

The "pouring problem" in linear algebra refers to a specific type of problem where the goal is to find the optimal way to transfer liquid from one container to another, while minimizing the number of pours and maximizing the amount of liquid in the final container.

How does linear algebra relate to the pouring problem?

In the pouring problem, linear algebra is used to represent the different containers and their capacities as matrices, and the amounts of liquid in each container as vectors. This allows for the use of matrix operations and equations to solve the problem and find the optimal solution.

What are the key concepts in linear algebra that are important for solving the pouring problem?

The key concepts in linear algebra that are important for solving the pouring problem include matrix multiplication, Gaussian elimination, and vector operations such as addition and subtraction. These concepts are used to set up and solve the equations that represent the pouring problem.

What are the different approaches to solving the pouring problem using linear algebra?

There are several different approaches to solving the pouring problem using linear algebra, including the Gauss-Jordan method, the inverse matrix method, and the reduced row echelon form method. Each approach has its own advantages and disadvantages, and the best approach will depend on the specific problem at hand.

What are some real-world applications of the pouring problem and linear algebra?

The pouring problem and linear algebra have many real-world applications, such as in chemical engineering, where it is used to optimize chemical reactions and mixtures; in operations research, where it is used to optimize transportation and logistics; and in computer graphics, where it is used to simulate fluid dynamics and animations.

Similar threads

  • Calculus and Beyond Homework Help
Replies
24
Views
617
  • Calculus and Beyond Homework Help
Replies
2
Views
446
  • Calculus and Beyond Homework Help
Replies
25
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
407
  • Mechanical Engineering
Replies
22
Views
1K
  • Calculus and Beyond Homework Help
Replies
10
Views
937
  • Calculus and Beyond Homework Help
Replies
10
Views
2K
  • Calculus and Beyond Homework Help
Replies
5
Views
155
  • Calculus and Beyond Homework Help
Replies
14
Views
513
  • Calculus and Beyond Homework Help
Replies
1
Views
130
Back
Top