Note that Each M k (i, j) is in fact the addition of the weights of all paths from i to j (i, j = |Q| − 1) with length k that have at most k + 1 different states.
if i = j, i = |Q| − 1, expression (11) becomes: given that there are no cycles, only loops.