Document 11103748

advertisement
Math 152 Test #2 version A
A4: Consider the following lines of MATLAB code:
A= zeros(3,4);
for i=1:3
A(i,i) = i;
A(i,i+l) = 1;
end
0 0
J
0
2
I 0
(0
~ \
0
What matrix A results?
A5: The 3 x 3 matrix A has a determinant with value 3. What is
det(A +A)?
A6: Write the matrix P that represents projection onto the line x
in 2D.
+ 2y = 0
{ .... 2.
j_ )
~~~ .
\P = ( Lfls
-215
A7: Consider a linear transformation, T, which describes central symmetry
with respect to the point (2, 1), shown in the figure below. Find the
matrix representation for this linear transformation, so that Ta = b.
y
a/····. ~~.~. ~)...··;?'
Ta -
/ ··· · · ···········. ./ b
X
vvtJv\
-Q
X
3
[-~ _,
0
Math 152 Test #2 version A
A8: Determine whether a 1 = [1, 2, 1, 2], a 2 = [3, 3, 3, 3],
linearly independent. Justify.
I
a3
= [1, 2, 3, 4] are
3 I
\
-3 ()
t)
0 0 '2..
0 0 0
..
A9: Find the matrix representation of the linear transformation T(x ) =
a x x , where a = (1 , 1, 1).
5 'b
I
f
y·
0
T = _,I
I
-\
0 -I
0
1
AlO: Find the third (bottom) row of the matrix A- where
A=
l2
I'
1
I I ' 00
I I {) i· 0
{0
I I 'l
0 0 (
~0
tw
1\.
0
0
[ 2 I
1 1
1 1
~]
oo l
tJt •f.z ~ 'Iz.
•lz
_t/2 -l6_
l/1 'Sfz
~
[o
--'ll
0
01
I
~ A-t
-1
2
4
J
,~
i]
1 'lz
0
0
tlz , y2
1 _,
0
. -( 2
0 2 I o -1
~J
Math 152 Test #2 version A
B3: Consider the following model of a flu epidemic in a school. During the
epidemic, 25% of those healthy the week before but had not yet had the
flu are sick the week after; 50% of those sick for one week are healthy
the week after; everyone who is sick for two weeks is healthy the next
week; Those who have had the flu and recover do not get sick again.
At the beginning of the epidemic, everyone is healthy. The epidemic
can be described as a random walk with four states:
1.
2.
3.
4.
Healthy students who have not had the flu
Healthy students who have had the flu and recovered
Students sick with the flu for one week
Students sick with the flu for two weeks
(a) [3 marks] Write the matrix of probabilities for the random walk,
using the ordering of states above.
(b) [1] What fraction of the students are sick two weeks after the
outbreak begins?
(c) [1] What happens to the fraction of students that are sick after a
long time passes after the outbreak?
7
Solution to Test B:B3
(a) The transition matrix is

0.75 0 0 0
 0 1 0.5 1
P =
 0.25 0 0 0
0 0 0.5 0


3/4
  0
=
  1/4
0

0 0 0
1 1/2 1 
.
0 0 0 
0 1/2 0
(b)

  
H(0)
1
 R(0)   0 
  
~x(0) = 
 I1 (0)  =  0  .
I2 (0)
0

  
3/4 0 0 0
1
 0 1 1/2 1   0  
  
~x(1) = P ~x(0) = 
 1/4 0 0 0   0  = 
0 0 1/2 0
0
Notice that

3/4

0
P2 = 
 1/4
0
2 
0 0 0

1 1/2 1 
 =

0 0 0 
0 1/2 0


~x(2) = P 2~x(0) = 

32
42
2
42
3
42
2
42
9
16
2
16
3
16
2
16
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
 
0

1 
=
0  
0

1
0


1  0
0  0
0
0


3/4
0 
.
1/4 
0
32
42
2
42
3
42
2
42

 
=
 
0
1
0
0
32
42
2
42
3
42
2
42
0
1
0
0

0
1 
.
0 
0


.

Therefore, the fraction of sick students two weeks after outbreak is
I1 (2) + I2 (2) =
3
2
5
+ 2 = .
2
4
4
16
(c) The fraction of sick students will decrease to zero. A reasoning is accepted as convincing if it touches two important points: (1) the fraction
of healthy and never-sick students will decrease every week by 25%; (2)
the only source of sick students will come from the healthy and neversick group. The healthy and never-sick fraction will decrease to zero
after a very long time, so will the fraction of sick students.
A even more convincing way of showing why the answer is correct is
actually calculating all the fractions for all t = 2n. Notice that
 
2 
 32
34
34
0
0
0
4
0
0
0
4
44
42
 2 32
 
32
2 32
2


+
1
−
1
1
1
1
−
1
−
1
1
1



2
2
2
2
4
4 4
4
4
42

42
P =
=
3 32
3 32
 32 0 0 0  = 

0 0 0  
4
42 42
42 42
2
2 32
2 32
0
0
0
0 0 0
42
42 42
42 42
Thus,

P 2n

=

32
42
2
42
3
42
2
42
0
1
0
0
0
1
0
0
n
32n
42n

0
 1 − (1 − R(2(n − 1))) 32(n−1)
1 
42(n−1)
 =

3 32(n−1)
0 

42 42(n−1)
2 32(n−1)
0
2 2(n−1)
4 4
0
1
0
0
Therefore,

P∞ =
lim P 2n
n→inf ty

0
1 
,
0 
0
0
 1
=
 0
0
0
1
0
0
0
1
0
0

0
1
0
0

0
1
 0
1 

0  0
0
0
0

1
~x(∞) = P ∞~x(0) = 
 0
0
0
1
0
0
⇒



0
  1 
 =  .
  0 
0
0
1
0
0
0
1
0
0



.

0
1
0
0
0
1
0
0
0
1
0
0



.

Download