# Disjoint sets

{{#invoke:Hatnote|hatnote}}

In mathematics, two sets are said to be **disjoint** if they have no element in common. Equivalently, disjoint sets are sets whose intersection is the empty set.^{[1]}
For example, {1, 2, 3} and {4, 5, 6} are **disjoint sets,** while {1, 2, 3} and {3, 4, 5} are not.

## Generalizations

This definition of disjoint sets can be extended to any family of sets. A family of sets is **pairwise disjoint** or **mutually disjoint** if every two different sets in the family are disjoint.^{[1]}
For example, the collection of sets { {1}, {2}, {3}, ... } is pairwise disjoint.

Two sets are said to be almost disjoint sets if their intersection is small in some sense. For instance, two infinite sets whose intersection is a finite set may be said to be almost disjoint.^{[2]}

In topology, there are various notions of separated sets with more strict conditions than disjointness. For instance, two sets may be considered to be separated when they have disjoint closures or disjoint neighborhoods. Similarly, in a metric space, positively separated sets are sets separated by a nonzero distance.^{[3]}

## Intersections

Disjointness of two sets, or of a family of sets, may be expressed in terms of their intersections.

Two sets *A* and *B* are disjoint if and only if their intersection is the empty set.^{[1]}
It follows from this definition that every set is disjoint from the empty set,
and that the empty set is the only set that is disjoint from itself.^{[4]}

A family *F* of sets is pairwise disjoint if, for every two sets in the family, their intersection is empty.^{[1]}
If the family contains more than one set, this implies that the intersection of the whole family is also empty. However, a family of only one set is pairwise disjoint, regardless of whether that set is empty, and may have a non-empty intersection. Additionally, a family of sets may have an empty intersection without being pairwise disjoint.^{[5]} For instance, the three sets { {1, 2}, {2, 3}, {1, 3} } have an empty intersection but are not pairwise disjoint. In fact, there are no two disjoint sets in this collection.

A Helly family is a system of sets within which the only subfamilies with empty intersections are the ones that are pairwise disjoint. For instance, the closed intervals of the real numbers form a Helly family: if a family of closed intervals has an empty intersection and is minimal (i.e. no subfamily of the family has an empty intersection), it must be pairwise disjoint.^{[6]}

## Disjoint unions and partitions

A partition of a set *X* is any collection of mutually disjoint non-empty sets whose union is *X*.^{[7]} Every partition can equivalently be described by an equivalence relation, a binary relation that describes whether two elements belong to the same set in the partition.^{[7]}
Disjoint-set data structures^{[8]} and partition refinement^{[9]} are two techniques in computer science for efficiently maintaining partitions of a set subject to, respectively, union operations that merge two sets or refinement operations that split one set into two.

A disjoint union may mean one of two things. Most simply, it may mean the union of sets that are disjoint.^{[10]} But if two or more sets are not already disjoint, their disjoint union may be formed by modifying the sets to make them disjoint before forming the union of the modified sets.^{[11]} For instance two sets may be made disjoint by replacing each element by an ordered pair of the element and a binary value indicating whether it belongs to the first or second set.^{[12]}
For families of more than two sets, one may similarly replace each element by an ordered pair of the element and the index of the set that contains it.^{[13]}

## See also

- Hyperplane separation theorem for disjoint convex sets
- Mutually exclusive events
- Relatively prime, numbers with disjoint sets of prime divisors
- Set packing, the problem of finding the largest disjoint subfamily of a family of sets

## References

- ↑
^{1.0}^{1.1}^{1.2}^{1.3}{{#invoke:citation/CS1|citation |CitationClass=citation }}. - ↑ {{#invoke:citation/CS1|citation |CitationClass=citation }}.
- ↑ {{#invoke:citation/CS1|citation |CitationClass=citation }}.
- ↑ {{#invoke:citation/CS1|citation |CitationClass=citation }}.
- ↑ {{#invoke:citation/CS1|citation |CitationClass=citation }}.
- ↑ {{#invoke:citation/CS1|citation |CitationClass=citation }}.
- ↑
^{7.0}^{7.1}Template:Harvtxt, p. 28. - ↑ {{#invoke:citation/CS1|citation |CitationClass=citation }}.
- ↑ {{#invoke:citation/CS1|citation |CitationClass=citation }}.
- ↑ {{#invoke:citation/CS1|citation |CitationClass=citation }}.
- ↑ {{#invoke:citation/CS1|citation |CitationClass=citation }}.
- ↑ {{#invoke:citation/CS1|citation |CitationClass=citation }}.
- ↑ {{#invoke:citation/CS1|citation |CitationClass=citation }}.