This paper presents efficient algorithms for finding the largest tree S such that there are vertex disjoint subtrees S1, ... , S(k) (k > 1) of T each of which is isomorphic to S and every leaf of T is a leaf of some S(i). The algorithms are useful for learning a macro table.