{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

solutions8 - Math 152 Spring 2010 Assignment#8 Notes Each...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Math 152, Spring 2010 Assignment #8 Notes: Each question is worth 5 marks. Due in class: Monday, March 15 for MWF sections; Tuesday, March 16 for TTh sections. Solutions will be posted Tuesday, March 16 in the afternoon. No late assignments will be accepted. 1. Consider a random walk with n states (this number n will be known for a given case, but we are also interested in considering it for general n ). It has the following properties: If it is in states 1 to n 1 (that is, any state but the last) is is equally likely to stay in that state or move to the state numbered one higher. If it is in the last state (number n ) then it remains there forever. (a) Write down the transition matrix P for the case of three states (that is, n = 3). (b) For the system above with three states, if it starts in state 1, what is the chance it will be in state 3 after 3 time steps? (c) Write lines of MATLAB commands that would generate the matrix P for general n . Hint: use a for loop. Solution : a) Suppose the particle starts in state 1. Then there is a chance of 1 / 2 that it stays in state 1, and a 1 / 2 chance that it moves to state 2. It never moves to state 3. The vector of probabilities is (1 / 2 , 1 / 2 , 0). If the particle starts in state 2, it has 1 / 2 chance of staying and 1 / 2 chance of moving to state 3. It never goes to state 1. Thus the vector of probabilities is (0 , 1 / 2 , 1 / 2). Finally, if the particle starts in state 3, it never leaves, so the vector of probabilities is (0 , 0 , 1). Thus the matrix P describing the walk is 1 / 2 0 0 1 / 2 1 / 2 0 0 1 / 2 1 . b) There are di ff erent ways to do this problem. The easiest would form the initial vector e = 1 0 0 , which represents a particle in state 1. Then the passage of each time step corresponds to multiplying by P , and we
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
have to do this three times. We can multiply out successively to get Pe, P 2 e = ( P ( Pe ), and P 3 e = P ( P 2 e ), and we find that f = P 3 e = 1 / 8 3 / 4 1 / 2 ,
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}