The first measurement distribution I was able to solve no problem. Original distribution was
[0.2, 0.2, 0.2, 0.2, 0.2], multiply greens by 0.1, reds by 0.9, normalize and I get
[0.04761904761904762, 0.04761904761904762, 0.4285714285714286, 0.04761904761904762, 0.4285714285714286]. What's confusing me is how to manage the move. If the world was cyclic, I would just shift all the probabilities to the right by one. But since he says there is a wall blocking the right side...I'm not sure if the fifth element of resulting shifted matrix should be P(red) * P(green) or P(red) + P(green). I've tried both and neither have worked.
Any advice would be appreciated!