Added no cycles constraint.