Determine if the given stochastic matrix is regular. If it is regular input the smallest exponent which shows the matrix to be regular, otherwise input 0.