Question: The question must be solved using python. Thanks! Suppose that a person does random walk on 5 states: S = [0, 1, 2, 3, 4].

 The question must be solved using python. Thanks! Suppose that a

The question must be solved using python. Thanks!

Suppose that a person does random walk on 5 states: S = [0, 1, 2, 3, 4]. Also, suppose that state 0 and state 4 are terminal (absorbing) states. That is, once the person reaches state 0 or state 4, he/she will stop. In particular, for any non-terminal states (state 1, 2, and 3), this person has euqal probability of going left or going right. Problem: What is the probability of ending at state 0, given this person starts at state i = 0,1, ... ,5? Output: your output should be a list or an array, with the i-th element indicating the probability of ending at state 0, starting from state i. For example, [1,0.1,0.2,0.3, 0] indicates that starting from state 1, this person has 10% probability of ending at state 0; starting from state 2, this person has 20% probability of ending at state 0; starting from state 3, this person has 30% probability of ending at state 0. Hint: If starting from state 0, then the probability of ending at state 0 is 1. If starting from state 4, then the probability of ending at state 0 is 0 (since state 4 is a terminal state itself). As a result, the output list should look like [1, x, y, z,0], where x, y, and z are the probabilities you need to find out. Suppose that a person does random walk on 5 states: S = [0, 1, 2, 3, 4]. Also, suppose that state 0 and state 4 are terminal (absorbing) states. That is, once the person reaches state 0 or state 4, he/she will stop. In particular, for any non-terminal states (state 1, 2, and 3), this person has euqal probability of going left or going right. Problem: What is the probability of ending at state 0, given this person starts at state i = 0,1, ... ,5? Output: your output should be a list or an array, with the i-th element indicating the probability of ending at state 0, starting from state i. For example, [1,0.1,0.2,0.3, 0] indicates that starting from state 1, this person has 10% probability of ending at state 0; starting from state 2, this person has 20% probability of ending at state 0; starting from state 3, this person has 30% probability of ending at state 0. Hint: If starting from state 0, then the probability of ending at state 0 is 1. If starting from state 4, then the probability of ending at state 0 is 0 (since state 4 is a terminal state itself). As a result, the output list should look like [1, x, y, z,0], where x, y, and z are the probabilities you need to find out

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!