In an ordinary undirected graph, each edge ee links an unordered pair of vertices xx and yy (perhaps allowing for the possibility that x=yx = y, 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.

Categories of hypergraphs

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 SimpHGrphSimpHGrph has objects consisting of a pair of sets (V,E)(V,E) equipped with a relation RV×ER \subseteq V \times E, and morphisms (RV×E)(R×V×E)(R \subseteq V \times E) \to (R' \times V' \times E') consisting of pairs of functions (f:VV,g:EE)(f : V \to V', g : E \to E') which preserve the relation, i.e., such that for all vV,eEv\in V, e \in E, if (v,e)R(v,e) \in R then (fv,ge)R(f v,g e) \in R'.

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 HGrphHGrph has objects consisting of a pair of sets (V,E)(V,E) equipped with a span VvReEV \overset{v}\leftarrow R \overset{e}\rightarrow E, and morphisms (VvReE)(VvReE)(V \overset{v}\leftarrow R \overset{e}\rightarrow E) \to (V' \overset{v'}\leftarrow R' \overset{e'}\rightarrow E') consisting of triples of functions (f:VV,g:EE,h:RR)(f : V \to V', g : E \to E', h:R \to R') such that vh=fvv'\circ h = f\circ v and eh=gee'\circ h = g\circ e.

Note that HGrphHGrph is just the category of presheaves over the “walking cospan” *\bullet \rightarrow * \leftarrow \circ, and that SimpHGrphSimpHGrph is a full subcategory of HGrphHGrph.

Hypergraphs as 2-colored graphs

There is a classical equivalence between hypergraphs and 2-colored (hence bipartite) graphs. Given a hypergraph HH, define a graph G(H)G(H) whose vertex set is the disjoint union of the hypervertices and the hyperedges of HH, and with an edge x vx ex_v \sim x_e in G(H)G(H) whenever the corresponding pair (v,e)(v,e) are incident in HH (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 GG determines a hypergraph H(G)H(G) 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 GG with nn colors is equivalent to building a graph homomorphism GK nG \to K_n into the complete graph on nn vertices, and so graphs equipped with a 22-coloring are naturally organized as a slice category over K 2K_2. The classical equivalence between hypergraphs and 2-colored graphs can then be expressed formally as an equivalence of categories

HGrphGrph/K 2 HGrph \cong Grph/K_2

between the category of hypergraphs and the slice over K 2K_2 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

SimpHGrphLoopGrph/K 2 SimpHGrph \cong LoopGrph/K_2

where LoopGraphLoopGraph is the category of “loop graphs”, i.e., the full subcategory of GrphGrph 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.

Revised on October 1, 2015 09:57:05 by Noam Zeilberger (