The DFS algorithm yields all balancing solutions. These are passed on to the postprocessing step (2.2.3). The list R of rules is applied in a fixed order that ensures that pattern size, defined as the number atoms in r, is non-increasing. Thus, the search can be restricted to check only patterns with a valid length. One could use the fact that the dictionary obtained by the successful application of several rules is independent of the order in which these rules a applied. Keep track of the rule r that was applied before DFS(∆, R, S) was called it therefore suffices to disregard in the next recursion step all rules that appear before r in R. Moreover, one could abandon a recursion step if its path length exceeds the best previously found solution. The latter modification however limits the scope of post-processing rules intended to remove chemically implausible solutions. Since simple DFS is already comparably fast and the search tree is usually quite shallow, such optimization are currently not implemented.