Resolving a limited itterative cycle

Imagine a system with infinite nodes. Each node has none, one or many one way connections to other nodes (Cn). Now a selection of nodes are granted a value Xn.

For each node with a value Xn the value is added to the connected nodes following the following simple formula.

Xn/Cn

(The value is divided equally)

Now this produces first and second generation values and is repeated to a significantly large number of generations on the rule that where Cn > Xn no iteration is performed on that node.

As nodes may link in both directions between each other and circles of links may exist making some nodes members of multiple generations a loop is created.

Given that my maths skills stop just prior to mastering integrations and that I must implement the solution in php on a limited resource server what is the best way to resolve the loops and calculate the values of all nodes with values greater than 0?

I need to be able to understand the solution enough to implement it and to be able to change some of the rules (like the Xn/Cn rule).

If nodes linked only in a given direction along some imagined axis we would have a topographical slope from the first generation down to the last. Even so if the values of several generation y poured into a single node in generation y+1 we would still get a topographical "bump".

Fortunately I do not need to generate a graphic representation of the nodes but how much "bump" data would be lost by excluding prior generations from the cycle (so that it is a "run down" cycle only)?

Would this be significant?

Your thoughts on this will be most helpful.
[1697 byte] By [Matt_T_hat] at [2007-12-5 11:58:58]