Section 11.1 Exercise 13

Write a program to compute \(u^{(n)}\) given u and P. Use this program to compute \(u^{(10)}\) for the Land of Oz example, with u = (0,1,0), and with u = (1/3, 1/3, 1/3).

##      [,1] [,2] [,3]
## [1,] 0.50 0.25 0.25
## [2,] 0.50 0.00 0.50
## [3,] 0.25 0.25 0.50
##      [,1] [,2] [,3]
## [1,]  0.4  0.2  0.4
##      [,1] [,2] [,3]
## [1,]  0.4  0.2  0.4

The two results converge to the same numbers despite the different initial probabilities vectors.