{VERSION 3 0 "IBM INTEL NT" "3.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Maple Plo t" -1 13 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 }3 1 0 0 0 0 1 0 1 0 2 2 0 1 }} {SECT 0 {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "with(plots):" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 38 "Execute the first and next line on ce. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "x:=rand(2):" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 83 "Each time the next group is execut ed (by placing the cursor and hitting enter) you " }}{PARA 0 "" 0 "" {TEXT -1 89 "will get a path-graph for a simple symmetric random walk \+ of length 1000. You can change " }}{PARA 0 "" 0 "" {TEXT -1 43 "the l ength of the walk in the obvious way. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 67 "L:=[]:S:=0:for i from 1 to 1000 do S:=S+2*x()-1: L:=[ op(L),S]: od: " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "listplot(L);" }} {PARA 13 "" 1 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "1 0 0" 22 }{VIEWOPTS 1 1 0 1 1 1803 }