Compare all elements of a set with all elements of the set

77 Views Asked by At

I have a set $ X = \{a,b,c,d\} $ where all elements of the set are tuples $ (x,y), x \in \mathbb{N}, y \in \mathbb{N} $. In this case the elements of the tuple would represent a timeslot where start time x and an end time y. I know want to have a constraint that compares all elements to each other, so that no timeslot in the set is overlapping. Basically $ y_1 > x_2 \vee x_1 > y_2 $. How would I go to describe this mathematically?