Proportionally fair allocation on a four-cycle (source code)

= Proportionally fair allocation on a four-cycle

For the four routes consisting of adjacent pairs of a unit-capacity four-cycle, put $P=n_1+n_3$, $Q=n_2+n_4$, and $N=P+Q$. Every active route in the first group has total service $P/N$, and every active route in the second has total service $Q/N$. Its per-flow rate is this total divided by its active flow count.