You can't "calculate" an unknown weight without some other constraint (like all cycles have the same total weight).



A 10 B
+--->---+
| |
X V V 30
| |
...