Linear Algebra Exercises-n-Answers.pdf
Linear Algebra Exercises-n-Answers.pdf Linear Algebra Exercises-n-Answers.pdf
150 Linear Algebra, by Hefferon 4 Represent it with respect to the standard bases E 1 , E 1 , then the only entry in the resulting 1×1 matrix is the scalar k. 5 We can show this by induction on the number of components in the vector. In the n = 1 base case the only permutation is the trivial one, and the map ( x1 ) ↦→ ( x1 ) is indeed expressible as a composition of swaps — as zero swaps. For the inductive step we assume that the map induced by any permutation of fewer than n numbers can be expressed with swaps only, and we consider the map induced by a permutation p of n numbers. ⎛ ⎞ ⎛ ⎞ x 1 x p(1) x 2 ⎜ ⎝ ⎟ . ⎠ ↦→ x p(2) ⎜ ⎝ ⎟ . ⎠ x n x p(n) Consider the number i such that p(i) = n. The map ⎛ ⎞ ⎛ x 1 x 2 . ˆp x i ↦−→ ⎜ ⎟ ⎜ ⎝ . ⎠ ⎝ x n x p(1) x p(2) will, when followed by the swap of the i-th and n-th components, give the map p. Now, the inductive hypothesis gives that ˆp is achievable as a composition of swaps. 6 (a) A line is a subset of R n of the form {⃗v = ⃗u + t · ⃗w ∣ ∣ t ∈ R}. The image of a point on that line is h(⃗v) = h(⃗u + t · ⃗w) = h(⃗u) + t · h( ⃗w), and the set of such vectors, as t ranges over the reals, is a line (albeit, degenerate if h( ⃗w) = ⃗0). (b) This is an obvious extension of the prior argument. (c) If the point B is between the points A and C then the line from A to C has B in it. That is, there is a t ∈ (0 .. 1) such that ⃗ b = ⃗a + t · (⃗c − ⃗a) (where B is the endpoint of ⃗ b, etc.). Now, as in the argument of the first item, linearity shows that h( ⃗ b) = h(⃗a) + t · h(⃗c − ⃗a). 7 The two are inverse. For instance, for a fixed x ∈ R, if f ′ (x) = k (with k ≠ 0) then (f −1 ) ′ (x) = 1/k. . x p(n) . x n ⎞ ⎟ ⎠ f(x) x f −1 (f(x)) Topic: Markov Chains 1 (a) With this file coin.m # Octave function for Markov coin game. p is chance of going down. function w = coin(p,v) q = 1-p; A=[1,p,0,0,0,0; 0,0,p,0,0,0; 0,q,0,p,0,0; 0,0,q,0,p,0; 0,0,0,q,0,0; 0,0,0,0,q,1]; w = A * v; endfunction
Answers to Exercises 151 This Octave session produced the output given here. octave:1> v0=[0;0;0;1;0;0] v0 = 0 0 0 1 0 0 octave:2> p=.5 p = 0.50000 octave:3> v1=coin(p,v0) v1 = 0.00000 0.00000 0.50000 0.00000 0.50000 0.00000 octave:4> v2=coin(p,v1) v2 = 0.00000 0.25000 0.00000 0.50000 0.00000 0.25000 This continued for too many steps to list here. octave:26> v24=coin(p,v23) v24 = 0.39600 0.00276 0.00000 0.00447 0.00000 0.59676 (b) Using these formulas p 1 (n + 1) = 0.5 · p 2 (n) p 2 (n + 1) = 0.5 · p 1 (n) + 0.5 · p 3 (n) p 3 (n + 1) = 0.5 · p 2 (n) + 0.5 · p 4 (n) p 5 (n + 1) = 0.5 · p 4 (n) and these initial conditions ⎛ ⎞ ⎛ ⎞ p 0 (0) 0 p 1 (0) 0 p 2 (0) ⎜p 3 (0) = 0 ⎟ ⎜1 ⎟ ⎝p 4 (0) ⎠ ⎝0⎠ p 5 (0) 0 we will prove by induction that when n is odd then p 1 (n) = p 3 (n) = 0 and when n is even then p 2 (n) = p 4 (n) = 0. Note first that this is true in the n = 0 base case by the initial conditions. For the inductive step, suppose that it is true in the n = 0, n = 1, . . . , n = k cases and consider the n = k + 1 case. If k + 1 is odd then the two p 1 (k + 1) = 0.5 · p 2 (k) = 0.5 · 0 = 0 p 3 (k + 1) = 0.5 · p 2 (k) + 0.5 · p 4 (k) = 0.5 · 0 + 0.5 · 0 = 0 follow from the inductive hypothesis that p 2 (k) = p 4 (k) = 0 since k is even. The case where k + 1 is even is similar. (c) We can use, say, n = 100. This Octave session octave:1> B=[1,.5,0,0,0,0; > 0,0,.5,0,0,0; > 0,.5,0,.5,0,0; > 0,0,.5,0,.5,0;
- Page 102 and 103: 100 Linear Algebra, by Hefferon (c)
- Page 104 and 105: 102 Linear Algebra, by Hefferon mea
- Page 106 and 107: 104 Linear Algebra, by Hefferon (c)
- Page 108 and 109: 106 Linear Algebra, by Hefferon Thr
- Page 110 and 111: 108 Linear Algebra, by Hefferon (e)
- Page 112 and 113: 110 Linear Algebra, by Hefferon (a)
- Page 114 and 115: 112 Linear Algebra, by Hefferon to
- Page 116 and 117: 114 Linear Algebra, by Hefferon Thr
- Page 118 and 119: 116 Linear Algebra, by Hefferon Thr
- Page 120 and 121: 118 Linear Algebra, by Hefferon As
- Page 122 and 123: 120 Linear Algebra, by Hefferon and
- Page 124 and 125: 122 Linear Algebra, by Hefferon we
- Page 126 and 127: 124 Linear Algebra, by Hefferon (b)
- Page 128 and 129: 126 Linear Algebra, by Hefferon As
- Page 130 and 131: 128 Linear Algebra, by Hefferon (d)
- Page 132 and 133: 130 Linear Algebra, by Hefferon the
- Page 134 and 135: 132 Linear Algebra, by Hefferon Thr
- Page 136 and 137: and that (⃗v − (c1 · ⃗κ 1 +
- Page 138 and 139: 136 Linear Algebra, by Hefferon (a)
- Page 140 and 141: 138 Linear Algebra, by Hefferon the
- Page 142 and 143: 140 Linear Algebra, by Hefferon and
- Page 144 and 145: 142 Linear Algebra, by Hefferon and
- Page 146 and 147: 144 Linear Algebra, by Hefferon Pro
- Page 148 and 149: 146 Linear Algebra, by Hefferon 5 T
- Page 150 and 151: 148 Linear Algebra, by Hefferon Top
- Page 154 and 155: 152 Linear Algebra, by Hefferon > 0
- Page 156 and 157: 154 Linear Algebra, by Hefferon 0.5
- Page 158 and 159: 156 Linear Algebra, by Hefferon n =
- Page 160 and 161: 158 Linear Algebra, by Hefferon Top
- Page 162 and 163: 160 Linear Algebra, by Hefferon and
- Page 164 and 165: 162 Linear Algebra, by Hefferon ∣
- Page 166 and 167: 164 Linear Algebra, by Hefferon Fou
- Page 168 and 169: 166 Linear Algebra, by Hefferon Fou
- Page 170 and 171: 168 Linear Algebra, by Hefferon The
- Page 172 and 173: 170 Linear Algebra, by Hefferon Fou
- Page 174 and 175: 172 Linear Algebra, by Hefferon ∣
- Page 176 and 177: 174 Linear Algebra, by Hefferon whe
- Page 178 and 179: 176 Linear Algebra, by Hefferon 0.2
- Page 180 and 181: 178 Linear Algebra, by Hefferon Als
- Page 182 and 183: 180 Linear Algebra, by Hefferon Fiv
- Page 184 and 185: 182 Linear Algebra, by Hefferon Res
- Page 186 and 187: 184 Linear Algebra, by Hefferon The
- Page 188 and 189: 186 Linear Algebra, by Hefferon (as
- Page 190 and 191: 188 Linear Algebra, by Hefferon Fiv
- Page 192 and 193: 190 Linear Algebra, by Hefferon to
- Page 194 and 195: 192 Linear Algebra, by Hefferon Fiv
- Page 196 and 197: 194 Linear Algebra, by Hefferon and
- Page 198 and 199: 196 Linear Algebra, by Hefferon tha
- Page 200 and 201: 198 Linear Algebra, by Hefferon Aga
<strong>Answers</strong> to <strong>Exercises</strong> 151<br />
This Octave session produced the output given here.<br />
octave:1> v0=[0;0;0;1;0;0]<br />
v0 =<br />
0<br />
0<br />
0<br />
1<br />
0<br />
0<br />
octave:2> p=.5<br />
p = 0.50000<br />
octave:3> v1=coin(p,v0)<br />
v1 =<br />
0.00000<br />
0.00000<br />
0.50000<br />
0.00000<br />
0.50000<br />
0.00000<br />
octave:4> v2=coin(p,v1)<br />
v2 =<br />
0.00000<br />
0.25000<br />
0.00000<br />
0.50000<br />
0.00000<br />
0.25000<br />
This continued for too many steps to list here.<br />
octave:26> v24=coin(p,v23)<br />
v24 =<br />
0.39600<br />
0.00276<br />
0.00000<br />
0.00447<br />
0.00000<br />
0.59676<br />
(b) Using these formulas<br />
p 1 (n + 1) = 0.5 · p 2 (n)<br />
p 2 (n + 1) = 0.5 · p 1 (n) + 0.5 · p 3 (n)<br />
p 3 (n + 1) = 0.5 · p 2 (n) + 0.5 · p 4 (n) p 5 (n + 1) = 0.5 · p 4 (n)<br />
and these initial conditions<br />
⎛ ⎞ ⎛ ⎞<br />
p 0 (0) 0<br />
p 1 (0)<br />
0<br />
p 2 (0)<br />
⎜p 3 (0)<br />
=<br />
0<br />
⎟ ⎜1<br />
⎟<br />
⎝p 4 (0) ⎠ ⎝0⎠<br />
p 5 (0) 0<br />
we will prove by induction that when n is odd then p 1 (n) = p 3 (n) = 0 and when n is even then<br />
p 2 (n) = p 4 (n) = 0. Note first that this is true in the n = 0 base case by the initial conditions. For<br />
the inductive step, suppose that it is true in the n = 0, n = 1, . . . , n = k cases and consider the<br />
n = k + 1 case. If k + 1 is odd then the two<br />
p 1 (k + 1) = 0.5 · p 2 (k) = 0.5 · 0 = 0<br />
p 3 (k + 1) = 0.5 · p 2 (k) + 0.5 · p 4 (k) = 0.5 · 0 + 0.5 · 0 = 0<br />
follow from the inductive hypothesis that p 2 (k) = p 4 (k) = 0 since k is even. The case where k + 1<br />
is even is similar.<br />
(c) We can use, say, n = 100. This Octave session<br />
octave:1> B=[1,.5,0,0,0,0;<br />
> 0,0,.5,0,0,0;<br />
> 0,.5,0,.5,0,0;<br />
> 0,0,.5,0,.5,0;