In an ordinary undirected graph, each edge links an unordered pair of vertices and (perhaps allowing for the possibility that , as in the case of a loop). Hypergraphs generalize this, allowing a “hyperedge” to link any set of “hypervertices”. Abstracting everything away but the incidence relation between hypervertices and hyperedges, a hypergraph can be modelled as an arbitrary heterogenous relation, or more generally as a span.
As with “graph”, the word “hypergraph” does not have an entirely standardized meaning. We take as our starting point (Schmidt & Ströhlein), who define hypergraphs as heterogenous relations (usually presented as boolean-valued matrices) and give an appropriate notion of morphism. We call these “simple” hypergraphs, since they are a special case of a more general definition given below.
The category of simple hypergraphs has objects consisting of a pair of sets equipped with a relation , and morphisms consisting of pairs of functions which preserve the relation, i.e., such that for all , if then .
The category of simple hypergraphs could also be referred to more dryly as “the category of binary relations”, although this has potential for confusion with Rel (whose morphisms are binary relations).
In a simple hypergraph, a hypervertex can be incident to a hyperedge at most once, but in some situations one wants to allow a hypervertex to be incident to a hyperedge multiple times. To define hypergraphs in this more general sense, we keep the intuition of hypergraphs-as-heterogenous-relations, but generalize relations to spans.
The category of hypergraphs has objects consisting of a pair of sets equipped with a span , and morphisms consisting of triples of functions such that and .
There is a classical equivalence between hypergraphs and 2-colored (hence bipartite) graphs. Given a hypergraph , define a graph whose vertex set is the disjoint union of the hypervertices and the hyperedges of , and with an edge in whenever the corresponding pair are incident in (creating multiple edges in the case of multiple incidence). By coloring vertices corresponding to hypervertices in black and vertices corresponding to hyperedges in white, we satisfy the requirement that no pair of vertices sharing an edge have the same color. Conversely, this construction is clearly reversible: any 2-colored graph determines a hypergraph by interpreting black vertices as hypervertices and white vertices as hyperedges that connect all of their (black vertex) neighbors.
Giving a vertex coloring of a graph with colors is equivalent to building a graph homomorphism into the complete graph on vertices, and so graphs equipped with a -coloring are naturally organized as a slice category over . The classical equivalence between hypergraphs and 2-colored graphs can then be expressed formally as an equivalence of categories
between the category of hypergraphs and the slice over of the category of graphs, where by the latter we mean “pseudographs” in the greatest level of generality, allowing for loops, multiple edges between vertices, and dangling half-edges (as described in this definition). Moreover, this equivalence restricts to an equivalence
where is the category of “loop graphs”, i.e., the full subcategory of whose objects are symmetric relations.
T. R. S. Walsh, Hypermaps Versus Bipartite Maps, Journal of Combinatorial Theory (B) 18, 155-163 (1975).
W. Dörfler and D. A. Waller, A category-theoretical approach to hypergraphs, Archiv der Mathematik, Volume 34, Number 1, (1980) 185-192, DOI: 10.1007/BF01224952
Gunther Schmidt and Thomas Ströhlein (1993), Relations and Graphs: Discrete Mathematics for Computer Scientists, EATCS Monographs on Theoretical Computer Science, Springer.