loop decomposition of weighted directed graphs for life cycle