My R code follows. This is for the example using degree centrality which made the most sense to me. For some reason, in the last section, for very large k there is an issue with computing the vector, I think it is stemming from my definition of B_K. The same issue occurs with large k using the function MM. It could be that the values get too large for R to handle? Regardless, as pointed out on page 7, even at k = 10 that ck approaches the eigenvector.