# Transition matrix
A <- matrix(c(0.5,0.25,0.25,0.5,0,0.5,0.25,0.25,0.5), nrow=3, ncol=3, byrow=TRUE)
A## [,1] [,2] [,3]
## [1,] 0.50 0.25 0.25
## [2,] 0.50 0.00 0.50
## [3,] 0.25 0.25 0.50
# Initial probability vectors
u1 <- matrix(c(0,1,0), ncol=3, nrow=1)
u2 <- matrix(c(1/3,1/3,1/3), ncol=3, nrow=1)## [,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.