1. The CPU that had been accessing module 1 finishes, then makes another request for that module. The CPU that had been accessing module 3 finishes, then makes a request for module 4. The CPU that had been accessing module 4 finishes, then makes another request for that module. The probability is q_1 q_4^2. 2. The product Ab of a matrix A and a vector b is a linear combination of the columns of A, with the coefficients of that linear combination being the elements of b. Here, take A = ! - P' and b = pi = (0.37,0.45,0.18). 3. q_{ijm} = p_{ij} 1 + S_k p_{ik} q_{kj,m-1} 4. An unnecessary replacement occurs when we receive a 0 in state (k-1,1) but the receiver does not go down. The long-run proportion of the time this occurs is pi_(k-1,1) 0.5 (1-rho) The long-run average time between such events is the reciprocal of that quantity. 5. getPMat <- function(n) { P <- matrix(0,nrow=n,ncol=n) for (i in 0:(n-2)) { P[i+1,1] <- 0.5 P[i+1,i+2] <- 0.5 } P[n,n] <- 0.5 P[n,1] <- 0.5 P } meanDistPerStep <- function(n) { P <- getPMat(n) pi <- findpi1(P) lrAvg <- 0 for (i in 0:(n-2)) lrAvg <- lrAvg + pi[i+1] * (0.5*i + 0.5*1) lrAvg + pi[n] * (0.5*0 + 0.5*(n-1)) }