Selected Answers to Problem Set 7
1. We know that the dot product will yield zero iff the vectors are perpendicular (aka orthogonal). So:(1+a)(2) + (-2b)(1) + (4)(-1) = 0 2a - 2b = 2 a - b = 1 a = b + 1If the vector U is perpendicular to W as well, then we solve the equation again, knowing that a = b + 1:(1+a)(1) + (-2b)(1) + (4)(0) = 0 a - 2b + 1 = 0 a = 2b - 1Solving these linearly give us:a = b + 1 a = 2b - 1 a = 3, b = 2
2. Since V is orthogonal to X, then= 0: (v1)(3) + (v2)(4) + (v3)(0) = 0 (v2)(4) = -(v1)(3) v2 = -(3/4)(v1) Second, we can put this equation into a linear form: 1 = c(3) + v1 -2 = c(4) + v2 1 = c(0) + v3 Now we can substitute for v2 to find c: 1 = 3c + v1 -2 = 4c - (3/4)(v1) 3 = 9c + 3v1 -8 = 16c - 3v1 ------------------------- -5 = 25c => c = -(1/5) Knowing c we can find v1 and v2 1 = 3(-1/5) + v1 8/5 = v1 v2 = -(4/3)(8/5) = -(6/5) c = -1/5, v1 = -6/5, v2 = 8/5
3.||X||2 = x12 + x22 ||Y||2 = y12 + y22 ||X+Y||2 = (x1 + y1)2 + (x2 + y2)2 = (x1 + y1)2 + (x2 + y2)2 = ||X||2 + ||Y||2 + 2x1y1 + 2x2y2 x1y1 + x2y2 = 0 iff the angle between them is zero. That is, x1y1 + x2y2 = < X,Y > Without components, this looks like: ||X+Y|| = < X,X > + < Y,Y > + 2< X,Y > The 2< X,Y > drops out if the angle is Pi/2.
4.Rewrite the equation as y = (3/4)x - 5/2. A line orthogonal to this is: y = (-4/3)x + b, where b is the y-intercept. The line crosses the origin, so b = 0. This can be solved linearly: y = (3/4)x - 5/2 y = (-4/3)x y = -8/5, x = 6/5. These are the coordinates of where the two lines meet. The distance between these coordinates and the origin is found with the pythagorean theorem. c2 = (-8/5)2 + (6/5)2 = (36/25) + (64/25) = 4 c2 = 4, so c = 2. For any line, we can rewrite the equation as y = -(a/b)x + (c/b). We want to know the coordinates where this line crosses the orthogonal line passing through the origin. y = (-a/b)x + (c/b) y = (b/a)x This can be solved linearly in Maple x = ac / (a2 + b2) y = bc / (a2 + b2) The distance d is found by sqrt(x2 + y2) (a2c2 + b2c2) d2 = ------------- (a2 + b2)2 c2(a2 + b2) = ------------- (a2 + b2)2 c2 = ---------- (a2 + b2) d = c / sqrt(a2 + b2)
5. To find the weighted averages, we should add the number of arrivals together from both airlines:
Alaska Airline America West Destination % on time Total Flights % on time Total Flights Los Angeles 88.9 1370 85.6 1370 Phoenix 94.8 5488 92.1 5488 San Diego 91.4 680 85.5 680 San Francisco 83.1 1054 71.3 1054 Seattle 85.8 2408 76.7 2408 Total 90.8 11000 85.5 11000
7. Put answer here.1. First we find the long-term distribution of the matrix, then we can plug in the initial values. Basically we have a vector P(n) at some time n. After one period, the vector will be P(n+1), which is AP(n). For the long-term distribution, P(n+1) = P(n), or P=AP.
We can solve these linearly in Maple to get a = 5/11, c = 5/11, e = 1/11. Thus, staring out with 220 limos, we know that the airport will have 100 limos, the city will have 100 limos, and everywhere else will have 20 limos.a = 0.73a + 0.25c + 0.10e c = 0.25a + 0.73c + 0.10e e = 0.02a + 0.02c + 0.80eAlso important to know is that at some point Pn (the ratio of cars in each location), at step Pn+1 will be the same. That is, P = AP, where A is our probability matrix. Therefore, AP - P = 0 and (A - I)P = 0. We can solve this equation linearly. Basically this entails subtracing a from both sides in the first equation, c from both sides in the second, and e from both sides in the third.
-0.27a + 0.25c + 0.10e = 0 0.25a - 0.27c + 0.10e = 0 0.02a + 0.02c - 0.20e = 0We can solve this with Gauss-Elimination form or with Maple to get the same answer.
8. Click here for the answer in Maple (PDF file). The HTML and Perl scripts can be found here.