00:02
Given the flow of traffic in vehicles per hour through a network of streets like indicated in the following diagram, and knowing that the total flow into each junction is equal to the total flow out of each junction, in part a we are going to find the traffic flow by solving the corresponding system of linear equations using matrices.
00:31
In part b, we are going to find the traffic flow.
00:34
When x2 equals 200 and x3 equals 50 and in part c we are going to find the traffic flow when x2 equals 150 and x3 equals 0.
00:51
So for each junction in this network we are going to write an equation stating the property written here that is the fact that the total flow into each junction is equal to the total flow out of each junction.
01:12
So for each junction we state algebraically this property here and with that we're going to obtain a system of linear equations and then we solve that system using matrices.
01:32
That is we write the augmented matrix.
01:38
We apply some row operations to transform that augmented matrix into a row echelon form and then using back substitution we solve the system so we find the bodies of x1 x2 x3 x4 and x5 then we we find particular configurations of the flow of the network when some variables are given so in per p x2 and x3 are given and with that we obtain the other variables and in part c x2 and x3 are given different values and we do the same so we're going to start with bar a and now we are going to write the equations one for each junction so we're going to start here at this junction here and we have in this junction we have in this junction we have flow into of value of 300 because we have this arrow coming into the junction here and we have two values flowing out so we have x1 and x2 flowing out so using this property here we know that the flow into which is 300 get to be equal to the flow out which is x1 plus x2 so x1 plus x2 equals 3 is the first equation we get.
03:34
Now we are going to write the equation for this junction here, this one here.
03:49
And we have coming into this junction, we have flow from x1 here, from x3 coming here, from this diagonal, and that's all, that is flowing into the junction.
04:06
We have x1 and x3, so the total flow into this junction.
04:10
Is x1 plus x3 that get to be equal to the flow out of the junction which are 150 and for x4 so x1 plus x3 get to be equal to x4 plus 150 that's our second equation okay so now we go to this junction here and we have flowing into the junction we have only two 200 and flowing at and is 200 and x2 as we see is this arrow coming down into the junction so coming into the junction r x2 and 200 and coming out is x3 and x5 so x2 plus 200 get to be equal to x3 plus x5 is a third equation and now we are going to write the equation correspond to this last junction here flowing into this junction we have x4 here and x5 here so the total flow into the junction is x4 plus x5 and the only flow out is 350 this one here so x4 plus x5 is equal to 350 is the last equation and from this we get the associated linear system which we write in an appropriate form.
06:36
That is, we're going to put all variables to the left of the equations and the independent terms to the right.
06:44
So the first equation we're going to write is this one here is x1 plus x2 equals 300.
06:53
Then we're going to write this equation here where we pass x4 to the left.
06:59
So we get x1 plus x3 minus x4.
07:04
Equals 150 then we're going to write this equation here instead of this one because we're going to maintain some since we wrote down here so it doesn't matter because it doesn't matter the order in which we put the equations so we are going to write x4 plus x5 equals 350 and the last equation is this one here where we are going to pass these two variables to the right so we can 200 to the left so we get x2 minus x3 minus x5 equals negative 200.
07:53
We could have done differently than this as we could have done x2 to the left and left 200 on the right of the equation is the same.
08:05
So we're going to start with this but you can start with another confusion.
08:11
That is you can put this equation as the last equation and here it make a different arrangement that's not a problem that's equivalent so now we are going to solve this linear system using matrices for that we start by writing down the augmented matrix remember that the augmented matrix is construct by taking the coefficients of the variables in order and putting the right hand sides on the same matrix.
08:53
In this case we're going to take the coefficients of the variables in the order x1 x2 x3 x4 and x5 and then the right hand side.
09:05
So for example we get for the first row we get coefficient of x1 here is 1 coefficient of x2 is 1.
09:21
The coefficient of x2 is 1 again and we don't see x3 x4 and x5 on the first equation so it means the coefficients of those variables are zeros and then we put the right side of these first equations so we get 300 and we do the same for second equation coefficient of x1 the second equation is 1 coefficient of x2 is 0 coefficient of x3 here is 1 coefficient of x4 is 1 coefficient of x4 is 1.
10:00
Negative 1 x5 doesn't appear so the coefficient is 0 and their right hand side is 150 now for the third equation we have coefficient of x1 is 0 x2 is 0 x3 0 x4 is 1 and x5 is 1 right hand side is 350 the last equation 0 coefficient 4 x1 coefficient of x2 is 1 x3 coefficient negative 1 x4 doesn't appear coefficient 0 and x5 coefficient negative 1 and the right side is negative 200.
10:43
So this is our augmented matrix where we put this dot line here in order to separate what is the coefficient matrix from the right side.
10:58
Okay so we apply now some row operations to transform this matrix to a row echelon form.
11:18
So the first thing we're going to do is, as we see, we have already a 1 in this position, which is the first thing we got to do, but we have already 1 there.
11:33
So we got to notify this 1.
11:36
We have also 0 zeros here.
11:38
So the only value in this column we got to nullify is this one here...