{VERSION 2 3 "APPLE_68K_MAC" "2.3" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{CSTYLE "" -1 256 "" 0 1 255 0 0 1 0 1 0 0 0 0 0 0 0 } {CSTYLE "" -1 257 "" 0 1 255 0 0 1 0 1 0 0 0 0 0 0 0 }{PSTYLE "Normal " -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 256 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 256 "" 0 "" {TEXT -1 13 "Markov Chains" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 189 "The cell below defines the matrix giving the probabilities of moving from one state \+ to another and the initial probability vector. Then it uses matrix mu ltiplication to study this model. " }{TEXT 256 16 "Evaluate it now." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1139 "A := array(1..12, 1..12):\n\nA := [[0, 0, 0, 0, 0, 0, 0, 0, \+ 0, 0, 0, 0],\n [6/36, 1, 0, 2/36, 3/36, 4/36, 5/36, 5/36, 4/36, 3 /36, 2/36, 1/36],\n [1/36, 0, 1, 6/36, 6/36, 6/36, 6/36, 6/36, 6/ 36, 6/36, 6/36, 6/36],\n [2/36, 0, 0, 28/36, 0, 0, 0, \+ 0, 0, 0, 0, 0],\n [3/36, 0, 0, 0, 27/36, 0, 0 , 0, 0, 0, 0, 0],\n [4/36, 0, 0, 0, 0, 26/36 , 0, 0, 0, 0, 0, 0],\n [5/36, 0, 0, 0, 0, \+ 0, 25/36, 0, 0, 0, 0, 0],\n [5/36, 0, 0, 0, \+ 0, 0, 0, 25/36, 0, 0, 0, 0],\n [4/36, 0, 0, \+ 0, 0, 0, 0, 0, 26/36, 0, 0, 0],\n [3/36, 0, \+ 0, 0, 0, 0, 0, 0, 0, 27/36, 0, 0],\n [2/36 , 0, 0, 0, 0, 0, 0, 0, 0, 0, 28/36, 0],\n \+ [1/36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29/36]]: \n\nP0 := [[1.0], [0.0], [0.0], [0.0], [0.0], [0.0], \n [0.0], [ 0.0], [0.0], [0.0], [0.0], [0.0]]:\n\nP := proc(n) option remember;\n \+ if n = 0 then P0\n else evalm(A &* P(n - 1));\n fi\n \+ end:\n\nP(1);\nP(2);\nP(3);\nP(4);\nP(10);\nP(20);\nP(40);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 374 "N otice that as the game is played a player is more likely to find himse lf or herself in states 2 or 3 -- the stwo states corresponding to com pleted games. After 40 throws of the dice a player will have won (sta te 2) with probability 46.91% and will have lost with probability 53.0 9%.\n\nThe cell below shows how these computations can be done without matrix multiplication. " }{TEXT 257 15 "Evaluate it now" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 275 "P0 := [1.0, 0.0, 0.0, 0.0, 0.0, 0.0, \n 0.0, 0 .0, 0.0, 0.0, 0.0, 0.0]:\n\nP := proc(n) option remember;\n local \+ i, j:\n if n = 0 then P0\n else [seq(sum(A[i, j] * P(n - 1) [j], j=1..12), i=1..12)];\n fi\n end:\n\nP(1);\nP(2);\nP(3);\n P(4);\nP(10);\nP(20);\nP(40);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "0 2 1" 16 }{VIEWOPTS 1 1 0 1 1 1803 }