Phase Transition Behavior of Cardinality and XOR Constraints