Mathematics, Probability, Data Science, Stochastic Process, Artificial Intelligence.
Let’s use R to square the matrix: matrixpower <- function(mat,k) { if (k == 0) return (diag(dim(mat)[1])) if (k == 1) return(mat) if (k > 1) return( mat %*% matrixpower(mat, k-1)) } # matrix power function from Introduction to Stochastic Processes with R by Robert Dobrow printers <- matrix(c(.7,