# Transversal (combinatorics)

In mathematics, particularly in combinatorics, given a family of sets, here called a collection C, a transversal (also called a cross-section) is a set containing exactly one element from each member of the collection. When the sets of the collection are mutually disjoint, each element of the transversal corresponds to exactly one member of C (the set it is a member of). If the original sets are not disjoint, there are two possibilities for the definition of a transversal:
* One variation is that there is a bijection f from the transversal to C such that x is an element of f(x) for each x in the transversal. In this case, the transversal is also called a system of distinct representatives (SDR).$^{:29}$
* The other, less commonly used, does not require a one-to-one relation between the elements of the transversal and the sets of C. In this situation, the members of the system of representatives are not necessarily distinct.$^{:692}$$^{:322}$
In computer science, computing transversals is useful in several application domains, with the input family of sets often being described as a hypergraph.
In set theory, the axiom of choice is equivalent to the statement that every partition has a transversal.

## Existence and number

A fundamental question in the study of SDR is whether or not an SDR exists. Hall's marriage theorem gives necessary and sufficient conditions for a finite collection of sets, some possibly overlapping, to have a transversal. The condition is that, for every integer k, every collection of k sets must contain in common at least k different elements.$^{:29}$
The following refinement by H. J. Ryser gives lower bounds on the number of such SDRs.$^{:48}$
Theorem. Let S$_1$, S$_2$, ..., S$_m$ be a collection of sets such that $S_{i_{1}}\cup S_{i_{2}}\cup \dots \cup S_{i_{k}}$ contains at least k elements for k = 1,2,...,m and for all k-combinations {$i_{1},i_{2},\ldots ,i_{k}$} of the integers 1,2,...,m and suppose that each of these sets contains at least t elements. If t ≤ m then the collection has at least t ! SDRs, and if t > m then the collection has at least t ! / (t - m)! SDRs.

## Relation to matching and covering

One can construct a bipartite graph in which the vertices on one side are the sets, the vertices on the other side are the elements, and the edges connect a set to the elements it contains. Then, a transversal (defined as a system of distinct representatives) is equivalent to a perfect matching in this graph.
One can construct a hypergraph in which the vertices are the elements, and the hyperedges are the sets. Then, a transversal (defined as a system of not-necessarily-distinct representatives) is a vertex cover in a hypergraph.

## Examples

In group theory, given a subgroup H of a group G, a right (respectively left) transversal is a set containing exactly one element from each right (respectively left) coset of H. In this case, the "sets" (cosets) are mutually disjoint, i.e. the cosets form a partition of the group.
As a particular case of the previous example, given a direct product of groups $G=H\times K$, then H is a transversal for the cosets of K.
In general, since any equivalence relation on an arbitrary set gives rise to a partition, picking any representative from each equivalence class results in a transversal.
Another instance of a partition-based transversal occurs when one considers the equivalence relation known as the (set-theoretic) kernel of a function, defined for a function $f$ with domain X as the partition of the domain $\operatorname {ker} f:=\left\{\,\left\{\,y\in X\mid f(x)=f(y)\,\right\}\mid x\in X\,\right\}$. which partitions the domain of f into equivalence classes such that all elements in a class map via f to the same value. If f is injective, there is only one transversal of $\operatorname {ker} f$. For a not-necessarily-injective f, fixing a transversal T of $\operatorname {ker} f$ induces a one-to-one correspondence between T and the image of f, henceforth denoted by $\operatorname {Im} f$. Consequently, a function $g:(\operatorname {Im} f)\to T$ is well defined by the property that for all z in $\operatorname {Im} f,g(z)=x$ where x is the unique element in T such that $f(x)=z$; furthermore, g can be extended (not necessarily in a unique manner) so that it is defined on the whole codomain of f by picking arbitrary values for g(z) when z is outside the image of f. It is a simple calculation to verify that g thus defined has the property that $f\circ g\circ f=f$, which is the proof (when the domain and codomain of f are the same set) that the full transformation semigroup is a regular semigroup. $g$ acts as a (not necessarily unique) quasi-inverse for f; within semigroup theory this is simply called an inverse. Note however that for an arbitrary g with the aforementioned property the "dual" equation $g\circ f\circ g=g$ may not hold. However if we denote by $h=g\circ f\circ g$, then f is a quasi-inverse of h, i.e. $h\circ f\circ h=h$.

## Common transversals

A common transversal of the collections A and B (where $|A|=|B|=n$) is a set that is a transversal of both A and B. The collections A and B have a common transversal if and only if, for all $I,J\subset \{1,...,n\}$,
    $|(\bigcup _{i\in I}A_{i})\cap (\bigcup _{j\in J}B_{j})|\geq |I|+|J|-n$

## Generalizations

A partial transversal is a set containing at most one element from each member of the collection, or (in the stricter form of the concept) a set with an injection from the set to C. The transversals of a finite collection C of finite sets form the basis sets of a matroid, the transversal matroid of C. The independent sets of the transversal matroid are the partial transversals of C.
An independent transversal (also called a rainbow-independent set or independent system of representatives) is a transversal which is also an independent set of a given graph. To explain the difference in figurative terms, consider a faculty with m departments, where the faculty dean wants to construct a committee of m members, one member per department. Such a committee is a transversal. But now, suppose that some faculty members dislike each other and do not agree to sit in the committee together. In this case, the committee must be an independent transversal, where the underlying graph describes the "dislike" relations.
Another generalization of the concept of a transversal would be a set that just has a non-empty intersection with each member of C. An example of the latter would be a Bernstein set, which is defined as a set that has a non-empty intersection with each set of C, but contains no set of C, where C is the collection of all perfect sets of a topological Polish space. As another example, let C consist of all the lines of a projective plane, then a blocking set in this plane is a set of points which intersects each line but contains no line.

## Category theory

In the language of category theory, a transversal of a collection of mutually disjoint sets is a section of the quotient map induced by the collection.

## Computational complexity

The computational complexity of computing all transversals of an input family of sets has been studied, in particular in the framework of enumeration algorithms.