Problem Idea

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

I got a bit confused with the question.

  1. Is C_i the concentration of the solution or the volume of the solution?
  2. “If an outgoing edge has weight w then amount of solute flowing out through that edge is W*C_i”, I didn’t understand this statement.

Can you please clarify it?

P.S : Comment is not working for me.

See, every node has a particular C_i. Now for edge between u-> v with weight w. The amount of flow through that edge is w*C_i.

//