Added random testing for transitive closure. no unexpected results found.