Computing the alignment between the 2m children of the elementary tree on either side requires choosing which subset of source nodes to delete, O(2 2m ), which subset of target nodes to insert (or clone), O(2 2m ), and how to reorder the remaining nodes from source to target tree, O((2m)!).
overall complexity of the algorithm is O(|T | 2 m 2 4 2m (2m)!