Open dewittpe opened 5 years ago
Having looked into it a bit more, you are adding 1/11 to your answer for the n=10 case, which you shouldn't be as no jump has a 1/11 probability.
Having looked into it a bit more, you are adding 1/11 to your answer for the n=10 case, which you shouldn't be as no jump has a 1/11 probability.
@illustromancer, thank you for looking over the solution I posted. It is always good to have some review. I'm wondering if our interpretation of the problem is slightly different. for the n = 10 case I look at that as there are 10 pads between the frog and the opposite bank. The bank would be the p + 1 pad. With equal probability of jumping to any pad or the bank each transition probability would be 1/11 as there are eleven possible next states.
The full transition probability matrix T should have dimension (p +2) x (p + 2), for the p pads the and the two banks. The matrix Q would then have dimension (p + 1) x (p + 1) for the transitions from the starting bank of the pond to each of the pads; omitting the transition to the final bank. In the google sheet you shared it appears that there are only 10 columns in the Q matrix, which, for the way I interpreted the problem, would be the case of n = 9 pads between the two banks.
No worries at all.
Thats the difference then. The problem as stated in the video is that the river is of width 10 (9 lilypads and the opposite bank, or 10 possible landing places), which is stated in the video description, whereas your writeup has 11 possible landing places for n=10 (10 lilypads between the two banks).
It would be worth clarifying that in your writeup.
Would you mind looking at the first page of the .pdf file where I defined the problem? Is there any detain there which you like to see added? Thanks.
Something in your final calculation isn't correct, as a direct calculation of the probability of being in the final state using each of the P^n intermediate transition matrices yields a final answer of 2.92896825. The same is true if (I-Q)^-1 is calculated directly in google sheets/excel for n=10.
See this google sheet for two separate methods of calculating the expected number of steps, one from first principles, and the second using the same method in your solution.
https://docs.google.com/spreadsheets/d/1HzawT8I5YjbughzTNrJ_v3MBvNMAylTHwS2-dtKFSQI/edit?usp=sharing