Input: graph , sink
Output: subproblem set
(1) ;
(2) sort nodes in ascending order by initial energy, and let be the sorted list;
(3) while    do
(4);
(5)for    do
(6);
(7)reverse the directions of edges in and perform a breadth-first search from the sink
(8)if  all vertices are visited  then
(9)construct subproblem with as the network;
(10)include to ;
(11) return  ;
Algorithm 4: decomp_fixing_parent.