1)  build_reaction_tree()begin
(2)      target polymer
(3)      root node
(4)     recursion( , )
(5)     return  
(6)  recursion(graph   , node   )begin
(7)     for  each edge     of     do
(8)       ( , ) vertices of
(9)       ( , ) split ,
(10)       estimate_probability , ,
(11)       add_child( ,
(12)       add_child( , )
(13)       add_child( , )
(14)      recursion( , )
(15)      recursion( , )
Algorithm 1: Algorithm to recursively find possible paths of synthesis for a target polymer.