Math 615: Homework Due 12/9

Page 304, number 2.  Here is the transition matrix “trans”.

trans1 =N[ (({{1/6, 0, 0, 0, 0, 0}, {1/6, 2/6, 0, 0, 0, 0}, {1/6, 1/6, 3/6, 0, 0, 0}, {1/6, 1/6, 1/6, 4/6, 0, 0}, {1/6, 1/6, 1/6, 1/6, 5/6, 0}, {1/6, 1/6, 1/6, 1/6, 1/6, 1}}))];

Manipulate[NumberForm[MatrixForm[
MatrixPower[trans1, exponent] ], {4,3}], {exponent, 1, 60, 1,Appearance -> "Labeled"}]

The vector for starting in state 1 after 5 throws is given by

MatrixPower[trans1,5].{{1},{0},{0},{0},{0},{0}}

Side Remark: Is there an easy way to create the unit vector e_i = (0, 0, ..., 1, ..., 0)?  I don’t know, but here is one possible solution.

e[entry_,length_] := Module[  {tempmatrix},
(tempmatrix = {Table[0, {counter, 1, length}]} );
tempmatrix[[1,entry]]=1;
Transpose[tempmatrix] ]

MatrixPower[trans1,5].e[1,6]

3. Note that the transition matrix, as written in the textbook, is actually the transpose of what we want.

trans2 = Transpose[(({{.787, 0, 0, .111, .102}, {0, .966, .034, 0, 0}, {0, .063, .937, 0, 0}, {0, 0, .074, .612, .314}, {.021, .009, .005, .010, .954}}))];

Manipulate[NumberForm[MatrixForm[
MatrixPower[trans2, exponent] ], {4,3}], {exponent, 1, 60, 1,Appearance -> "Labeled"}]

b. Letting v0 be the initial distributions, we obtain the distribution after 1-4 iterations.  Note they are listed as row vectors.

v0 = Transpose[{{.02,.02,.02,.02,.9}}];

(*MatrixPower[trans,1].v0
MatrixPower[trans,2].v0
MatrixPower[trans,3].v0
MatrixPower[trans,4].v0
*)
TableForm[
Table[MatrixPower[trans2,k].v0, {k, 1, 4}] ,
TableHeadings -> { {"n=1", "n=2", "n=3", "n=4"}, {"NE", "NC", "S", "W", "Z"}}]

c. For our new distribution, we get

v0 = Transpose[{{0,.6522,.3478,0,0}}];

(*MatrixPower[trans,1].v0
MatrixPower[trans,2].v0
MatrixPower[trans,3].v0
MatrixPower[trans,4].v0
*)
TableForm[Table[MatrixPower[trans2,k].v0, {k, 1, 4}], TableHeadings -> { {"n=1", "n=2", "n=3", "n=4"}, {"NE", "NC", "S", "W", "Z"}}]

d. It is easiest to analyze whether the system has reached an equilibrium by using the Manipulate command. The system has not yet reached an equilibrium by n=50. It does not reach an equilibrium until roughly n=200 or 300.  At this point, everything is concentrated in the NC and S regions.

Manipulate[NumberForm[MatrixForm[
MatrixPower[trans2, exponent] ], {4,3}], {exponent, 1, 500, 1,Appearance -> "Labeled"}]