Consider n nodes a0, a1, …, an-1.
There are directed edges as follows, (ai, a((i+1)%n) ) and (ai, a((i-1)%n) )
Now each node contains a solution of some amount C_i.
If an outgoing edge has weight w then amount of solute flowing out through that edge is W*C_i.
Given that sum of W’s going out of a node is 1. And that total concentration of solute in the system is also 1.
Find one equilibrium distribution of the solute among the nodes.
Constraints: n <= 10^5