The TreeMiner algorithm follows the combined depth-first/breadth-first traversal idea to discover all frequent embedded subtrees from a database of
rooted ordered trees. Other than the general downward closure property (i.e., all subtrees of a frequent tree are frequent), TreeMiner takes advantage of a useful property of the string encodings for
rooted ordered trees: removing either one of the last two vertices at the end of the string encoding of a
rooted ordered tree P (with correspondent adjustment to the number of backtrack symbols) will result in the string encoding of a valid embedded subtree of P.