Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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 outStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started