Linear Algebra Exercises-n-Answers.pdf

Linear Algebra Exercises-n-Answers.pdf Linear Algebra Exercises-n-Answers.pdf

math.hcmuns.edu.vn
from math.hcmuns.edu.vn More from this publisher
11.04.2014 Views

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;

<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;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!