Check is there exist cycles considering just one predicate at a time
[ ] P150
[ ] P131
[ ] Change the name. Technically, this script deletes "invalid" edges, not only cycles. for instance, the following case is invalid o->o->X<-o<-o. (Assumption, we have only one hierarchy)
Check is there exist cycles considering just one predicate at a time