I suppose the order of the teams matter when it comes to writing the matrix. The columns correspond to NU, OSU, MSU, and UM. (It was clockwise around the kind of confusing circular graph.) If I do that, my matrix must be:
((0,1,1,4),(4,0,2,3),(4,3,0,2),(1,2,3,0))
And my equations – if I understand this correctly, and I’m really not sure that I do – must be:
\frac{6}{r_{NU}}-(\frac{5}{r_{NU}+r_{OSU}}+\frac{5}{r_{NU}+r_{MSU}}+\frac{5}{r_{NU}+r_{UM}})=0
\frac{9}{r_{OSU}}-(\frac{5}{r_{OSU}+r_{NU}}+\frac{5}{r_{OSU}+r_{MSU}}+\frac{5}{r_{OSU}+r_{UM}})=0
\frac{9}{r_{MSU}}-(\frac{5}{r_{MSU}+r_{NU}}+\frac{5}{r_{MSU}+r_{OSU}}+\frac{5}{r_{MSU}+r_{UM}})=0
\frac{6}{r_{UM}}-(\frac{5}{r_{UM}+r_{NU}}+\frac{5}{r_{UM}+r_{OSU}}+\frac{5}{r_{UM}+r_{MSU}})=0
And, yeah, I know I’ve just made more work for myself. I’ll have to re-type the lot in Python, but since I was going to have to switch computers just to use Python anyway… in for a penny, in for a pound?
Anyway, my code was
from scipy.optimize import root
def g(r):
rn=r[0]
ro=r[1]
rm=r[2]
ru=r[3]
return[
6/rn - 5/(rn+ro)-5/(rn+rm)-5/(rn+ru),
9/ro - 5/(ro+rn)-5/(ro+rm)-5/(ro+ru),
9/rm - 5/(rm+rn)-5/(rm+ro)-5/(rm+ru),
6/ru - 5/(ru+rn)-5/(ru+ro)-5/(ru+rm),
]
solution = root(g, [1/4, 1/4, 1/4, 1/4])
if solution.success:
r = solution.x/sum(solution.x)
print(r)
else:
print ('uh-oh!')
and the output was [ 0.175 0.325 0.325 0.175].