Updated transitive closure to include both isLeaf and isRoot.  Cleaned up the canonical computations to minimize duplication.  Added transitive children and transitive children canonical computations to quickly supply the number of children at a given depth