sec sets and relations examplebag [ is distinct from bag [ ]while set { is indistinguishable from set { howeverbag [ is indistinguishable from bag [ sequence is collection of elements with an orderand which may contain duplicate-valued elements sequence is also sometimes called tuple or vector in sequencethere is th elementa st element nd elementand so on indicate sequence by using angle brackets hi to enclose its elements for exampleh is sequence note that sequence is distinct from sequence iand both are distinct from sequence relation over set is set of ordered pairs from as an example of relationif is {abc}then {hacihbcihcbiis relationand {haaihacihbbihbcihcciis different relation if tuple hxyi is in relation rwe may use the infix notation xry we often use relations such as the less than operator (<on the natural numberswhich includes ordered pairs such as and ibut not or rather than writing the relationship in terms of ordered pairswe typically use an infix notation for such relationswriting define the properties of relations as followswhere is binary relation over set is reflexive if ara for all is symmetric if whenever arbthen brafor all ab is antisymmetric if whenever arb and brathen bfor all ab is transitive if whenever arb and brcthen arcfor all abc as examplesfor the natural numbersis antisymmetric and transitive<is reflexiveantisymmetricand transitiveand is reflexiveantisymmetricand transitive for peoplethe relation "is sibling ofis symmetric and transitive if we define person to be sibling of himselfthen it is reflexiveif we define person not to be sibling of himselfthen it is not reflexive is an equivalence relation on set if it is reflexivesymmetricand transitive an equivalence relation can be used to partition set into equivalence classes if two elements and are equivalent to each otherwe write partition of set is collection of subsets that are disjoint from each other and whose union is an equivalence relation on set partitions the set into subsets whose elements are equivalent see section for discussion on how to represent equivalence classes on set one application for disjoint sets appears in section