an algorithm for mining frequent rooted unordered trees