
In
mathematics
Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
, a hypergraph is a generalization of a
graph
Graph may refer to:
Mathematics
*Graph (discrete mathematics), a structure made of vertices and edges
**Graph theory, the study of such graphs and their properties
*Graph (topology), a topological space resembling a graph in the sense of discret ...
in which an
edge
Edge or EDGE may refer to:
Technology Computing
* Edge computing, a network load-balancing system
* Edge device, an entry point to a computer network
* Adobe Edge, a graphical development application
* Microsoft Edge, a web browser developed by ...
can join any number of
vertices. In contrast, in an ordinary graph, an edge connects exactly two vertices.
Formally, a directed hypergraph is a pair
, where
is a set of elements called ''nodes'', ''vertices'', ''points'', or ''elements'' and
is a set of pairs of subsets of
. Each of these pairs
is called an ''edge'' or ''
hyperedge
This is a glossary of graph theory. Graph theory is the study of graphs, systems of nodes or vertices connected in pairs by lines or edges.
Symbols
A
B
...
''; the vertex subset
is known as its ''tail'' or ''domain'', and
as its ''head'' or ''
codomain
In mathematics, a codomain, counter-domain, or set of destination of a function is a set into which all of the output of the function is constrained to fall. It is the set in the notation . The term '' range'' is sometimes ambiguously used to ...
''.
The order of a hypergraph
is the number of vertices in
. The size of the hypergraph is the number of edges in
. The order of an edge
in a directed hypergraph is
: that is, the number of vertices in its tail followed by the number of vertices in its head.
The definition above generalizes from a
directed graph to a directed hypergraph by defining the head or tail of each edge as a set of vertices (
or
) rather than as a single vertex. A graph is then the special case where each of these sets contains only one element. Hence any standard graph theoretic concept that is independent of the edge orders
will generalize to hypergraph theory.
An undirected hypergraph
is an undirected graph whose edges connect not just two vertices, but an arbitrary number. An undirected hypergraph is also called a ''set system'' or a ''
family of sets
In set theory and related branches of mathematics, a family (or collection) can mean, depending upon the context, any of the following: set, indexed set, multiset, or class. A collection F of subsets of a given set S is called a family of su ...
'' drawn from the
universal set
In set theory, a universal set is a set which contains all objects, including itself. In set theory as usually formulated, it can be proven in multiple ways that a universal set does not exist. However, some non-standard variants of set theory inc ...
.
Hypergraphs can be viewed as
incidence structure
In mathematics, an incidence structure is an abstract system consisting of two types of objects and a single relationship between these types of objects. Consider the Point (geometry), points and Line (geometry), lines of the Euclidean plane as t ...
s. In particular, there is a bipartite "incidence graph" or "
Levi graph
In combinatorial mathematics, a Levi graph or incidence graph is a bipartite graph associated with an incidence structure.. See in particulap. 181 From a collection of points and lines in an incidence geometry or a projective configuration, we ...
" corresponding to every hypergraph, and conversely, every
bipartite graph
In the mathematics, mathematical field of graph theory, a bipartite graph (or bigraph) is a Graph (discrete mathematics), graph whose vertex (graph theory), vertices can be divided into two disjoint sets, disjoint and Independent set (graph theo ...
can be regarded as the incidence graph of a hypergraph when it is 2-colored and it is indicated which color class corresponds to hypergraph vertices and which to hypergraph edges.
Hypergraphs have many other names. In
computational geometry, an undirected hypergraph may sometimes be called a range space and then the hyperedges are called ''ranges''.
In
cooperative game theory, hypergraphs are called simple games (voting games); this notion is applied to solve problems in
social choice theory
Social choice theory is a branch of welfare economics that extends the Decision theory, theory of rational choice to collective decision-making. Social choice studies the behavior of different mathematical procedures (social welfare function, soc ...
. In some literature edges are referred to as ''hyperlinks'' or ''connectors''.
The collection of hypergraphs is a
category
Category, plural categories, may refer to:
General uses
*Classification, the general act of allocating things to classes/categories Philosophy
* Category of being
* ''Categories'' (Aristotle)
* Category (Kant)
* Categories (Peirce)
* Category ( ...
with hypergraph
homomorphism
In algebra, a homomorphism is a morphism, structure-preserving map (mathematics), map between two algebraic structures of the same type (such as two group (mathematics), groups, two ring (mathematics), rings, or two vector spaces). The word ''homo ...
s as
morphism
In mathematics, a morphism is a concept of category theory that generalizes structure-preserving maps such as homomorphism between algebraic structures, functions from a set to another set, and continuous functions between topological spaces. Al ...
s.
Applications
Undirected hypergraphs are useful in modelling such things as satisfiability problems, databases,
machine learning,
and
Steiner tree problem
In combinatorial mathematics, the Steiner tree problem, or minimum Steiner tree problem, named after Jakob Steiner, is an umbrella term for a class of problems in combinatorial optimization. While Steiner tree problems may be formulated in a ...
s. They have been extensively used in
machine learning
Machine learning (ML) is a field of study in artificial intelligence concerned with the development and study of Computational statistics, statistical algorithms that can learn from data and generalise to unseen data, and thus perform Task ( ...
tasks as the data model and classifier
regularization (mathematics)
In mathematics, statistics, Mathematical finance, finance, and computer science, particularly in machine learning and inverse problems, regularization is a process that converts the Problem solving, answer to a problem to a simpler one. It is ofte ...
. The applications include
recommender system
A recommender system (RecSys), or a recommendation system (sometimes replacing ''system'' with terms such as ''platform'', ''engine'', or ''algorithm'') and sometimes only called "the algorithm" or "algorithm", is a subclass of information fi ...
(communities as hyperedges),
image retrieval
An image retrieval system is a computer system used for browsing, searching and retrieving images from a large database of digital images. Most traditional and common methods of image retrieval utilize some method of adding metadata such as captio ...
(correlations as hyperedges), and
bioinformatics
Bioinformatics () is an interdisciplinary field of science that develops methods and Bioinformatics software, software tools for understanding biological data, especially when the data sets are large and complex. Bioinformatics uses biology, ...
(biochemical interactions as hyperedges). Representative hypergraph learning techniques include hypergraph
spectral clustering
In multivariate statistics, spectral clustering techniques make use of the spectrum (eigenvalues) of the similarity matrix of the data to perform dimensionality reduction before clustering in fewer dimensions. The similarity matrix is provided ...
that extends the
spectral graph theory
In mathematics, spectral graph theory is the study of the properties of a Graph (discrete mathematics), graph in relationship to the characteristic polynomial, eigenvalues, and eigenvectors of matrices associated with the graph, such as its adjacen ...
with hypergraph Laplacian, and hypergraph
semi-supervised learning
Weak supervision (also known as semi-supervised learning) is a paradigm in machine learning, the relevance and notability of which increased with the advent of large language models due to large amount of data required to train them. It is charact ...
that introduces extra hypergraph structural cost to restrict the learning results. For large scale hypergraphs, a distributed framework
built using
Apache Spark
Apache Spark is an open-source unified analytics engine for large-scale data processing. Spark provides an interface for programming clusters with implicit data parallelism and fault tolerance. Originally developed at the University of Californ ...
is also available. It can be desirable to study hypergraphs where all hyperedges have the same cardinality; a ''k-uniform hypergraph'' is a hypergraph such that all its hyperedges have size ''k''. (In other words, one such hypergraph is a collection of sets, each such set a hyperedge connecting ''k'' nodes.) So a 2-uniform hypergraph is a graph, a 3-uniform hypergraph is a collection of unordered triples, and so on.
Directed hypergraphs can be used to model things including telephony applications, detecting
money laundering
Money laundering is the process of illegally concealing the origin of money obtained from illicit activities (often known as dirty money) such as drug trafficking, sex work, terrorism, corruption, and embezzlement, and converting the funds i ...
, operations research,
and transportation planning. They can also be used to model
Horn-satisfiability In formal logic, Horn-satisfiability, or HORNSAT, is the problem of deciding whether a given conjunction of propositional Horn clauses is satisfiable or not. Horn-satisfiability and Horn clauses are named after Alfred Horn.
A Horn clause is a clau ...
.
Generalizations of concepts from graphs
Many
theorem
In mathematics and formal logic, a theorem is a statement (logic), statement that has been Mathematical proof, proven, or can be proven. The ''proof'' of a theorem is a logical argument that uses the inference rules of a deductive system to esta ...
s and concepts involving graphs also hold for hypergraphs, in particular:
*
Matching in hypergraphs
In graph theory, a matching in a hypergraph is a set of hyperedges, in which every two hyperedges are disjoint. It is an extension of the notion of matching in a graph.
Definition
Recall that a hypergraph is a pair , where is a set of v ...
;
*
Vertex cover in hypergraphs (also known as: transversal);
*
Line graph of a hypergraph;
*
Hypergraph grammar - created by augmenting a class of hypergraphs with a set of replacement rules;
*
Ramsey's theorem
In combinatorics, Ramsey's theorem, in one of its graph-theoretic forms, states that one will find monochromatic cliques in any edge labelling (with colours) of a sufficiently large complete graph. To demonstrate the theorem for two colours (sa ...
;
*
Erdős–Ko–Rado theorem
In mathematics, the Erdős–Ko–Rado theorem limits the number of Set (mathematics), sets in a family of sets for which every two sets have at least one element in common. Paul Erdős, Chao Ko, and Richard Rado proved the theorem in 1938, but d ...
;
*
Kruskal–Katona theorem on uniform hypergraphs;
*
Hall-type theorems for hypergraphs.
In directed hypergraphs:
transitive closure
In mathematics, the transitive closure of a homogeneous binary relation on a set (mathematics), set is the smallest Relation (mathematics), relation on that contains and is Transitive relation, transitive. For finite sets, "smallest" can be ...
, and shortest path problems.
Hypergraph drawing

Although hypergraphs are more difficult to draw on paper than graphs, several researchers have studied methods for the visualization of hypergraphs.
In one possible visual representation for hypergraphs, similar to the standard
graph drawing
Graph drawing is an area of mathematics and computer science combining methods from geometric graph theory and information visualization to derive two-dimensional depictions of graph (discrete mathematics), graphs arising from applications such ...
style in which curves in the plane are used to depict graph edges, a hypergraph's vertices are depicted as points, disks, or boxes, and its hyperedges are depicted as trees that have the vertices as their leaves. If the vertices are represented as points, the hyperedges may also be shown as smooth curves that connect sets of points, or as
simple closed curve
In mathematics, a curve (also called a curved line in older texts) is an object similar to a line, but that does not have to be straight.
Intuitively, a curve may be thought of as the trace left by a moving point. This is the definition that ...
s that enclose sets of points.
In another style of hypergraph visualization, the subdivision model of hypergraph drawing, the plane is subdivided into regions, each of which represents a single vertex of the hypergraph. The hyperedges of the hypergraph are represented by contiguous subsets of these regions, which may be indicated by coloring, by drawing outlines around them, or both. An order-''n''
Venn diagram
A Venn diagram is a widely used diagram style that shows the logical relation between set (mathematics), sets, popularized by John Venn (1834–1923) in the 1880s. The diagrams are used to teach elementary set theory, and to illustrate simple ...
, for instance, may be viewed as a subdivision drawing of a hypergraph with ''n'' hyperedges (the curves defining the diagram) and 2
''n'' − 1 vertices (represented by the regions into which these curves subdivide the plane). In contrast with the polynomial-time recognition of
planar graph
In graph theory, a planar graph is a graph (discrete mathematics), graph that can be graph embedding, embedded in the plane (geometry), plane, i.e., it can be drawn on the plane in such a way that its edges intersect only at their endpoints. ...
s, it is
NP-complete
In computational complexity theory, NP-complete problems are the hardest of the problems to which ''solutions'' can be verified ''quickly''.
Somewhat more precisely, a problem is NP-complete when:
# It is a decision problem, meaning that for any ...
to determine whether a hypergraph has a planar subdivision drawing, but the existence of a drawing of this type may be tested efficiently when the adjacency pattern of the regions is constrained to be a path, cycle, or tree.
An alternative representation of the hypergraph called PAOH
is shown in the figure on top of this article. Edges are vertical lines connecting vertices. Vertices are aligned on the left. The legend on the right shows the names of the edges. It has been designed for dynamic hypergraphs but can be used for simple hypergraphs as well.
Hypergraph coloring
Classic hypergraph coloring is assigning one of the colors from set
to every vertex of a hypergraph in such a way that each hyperedge contains at least two vertices of distinct colors. In other words, there must be no monochromatic hyperedge with cardinality at least 2. In this sense it is a direct generalization of graph coloring. The minimum number of used distinct colors over all colorings is called the chromatic number of a hypergraph.
Hypergraphs for which there exists a coloring using up to ''k'' colors are referred to as ''k-colorable''. The 2-colorable hypergraphs are exactly the bipartite ones.
There are many generalizations of classic hypergraph coloring. One of them is the so-called mixed hypergraph coloring, when monochromatic edges are allowed. Some mixed hypergraphs are uncolorable for any number of colors. A general criterion for uncolorability is unknown. When a mixed hypergraph is colorable, then the minimum and maximum number of used colors are called the lower and upper chromatic numbers respectively.
Properties of hypergraphs
A hypergraph can have various properties, such as:
* Empty - has no edges.
* Non-simple ''(or'' multiple'')'' - has loops (hyperedges with a single vertex) or repeated edges, which means there can be two or more edges containing the same set of vertices.
* Simple - has no loops and no repeated edges.
*
-regular - every vertex has degree
, i.e., contained in exactly
hyperedges.
*2-colorable - its vertices can be partitioned into two classes ''U'' and ''V'' in such a way that each hyperedge with cardinality at least 2 contains at least one vertex from both classes. An alternative term is
Property B
In mathematics, Property B is a certain set theory, set theoretic property. Formally, given a finite set ''X'', a collection ''C'' of subsets of ''X'' has Property B if we can partition ''X'' into two disjoint subsets ''Y'' and ''Z'' such that eve ...
.
** Two stronger properties are
bipartite and
balanced.
*
-uniform - each hyperedge contains precisely
vertices.
*
-partite - the vertices are partitioned into
parts, and each hyperedge contains precisely one vertex of each type.
** Every
-partite hypergraph (for
) is both
-uniform and bipartite (and 2-colorable).
* Reduced: no hyperedge is a strict subset of another hyperedge; equivalently, every hyperedge is maximal for inclusion. The reduction of a hypergraph is the reduced hypergraph obtained by removing every hyperedge which is included in another hyperedge.
* Downward-closed - every subset of an undirected hypergraph's edges is a hyperedge too. A downward-closed hypergraph is usually called an
abstract simplicial complex
In combinatorics, an abstract simplicial complex (ASC), often called an abstract complex or just a complex, is a family of sets that is closed under taking subsets, i.e., every subset of a set in the family is also in the family. It is a purely c ...
. It is generally not reduced, unless all hyperedges have cardinality 1.
** An abstract simplicial complex with the ''augmentation property'' is called a
matroid
In combinatorics, a matroid is a structure that abstracts and generalizes the notion of linear independence in vector spaces. There are many equivalent ways to define a matroid Axiomatic system, axiomatically, the most significant being in terms ...
.
* Laminar: for any two hyperedges, either they are disjoint, or one is included in the other. In other words, the set of hyperedges forms a
laminar set family.
Related hypergraphs
Because hypergraph links can have any cardinality, there are several notions of the concept of a subgraph, called ''subhypergraphs'', ''partial hypergraphs'' and ''section hypergraphs''.
Let
be the hypergraph consisting of vertices
:
and having ''edge set''
:
where
and
are the
index set
In mathematics, an index set is a set whose members label (or index) members of another set. For instance, if the elements of a set may be ''indexed'' or ''labeled'' by means of the elements of a set , then is an index set. The indexing consists ...
s of the vertices and edges respectively.
A subhypergraph is a hypergraph with some vertices removed. Formally, the subhypergraph
induced by
is defined as
:
An alternative term is the restriction of ''H'' to ''A''.
An extension of a subhypergraph is a hypergraph where each hyperedge of
which is partially contained in the subhypergraph
is fully contained in the extension
. Formally
:
with
and
.
The partial hypergraph is a hypergraph with some edges removed.
Given a subset
of the edge index set, the partial hypergraph generated by
is the hypergraph
:
Given a subset
, the section hypergraph is the partial hypergraph
:
The dual
of
is a hypergraph whose vertices and edges are interchanged, so that the vertices are given by
and whose edges are given by
where
:
When a notion of equality is properly defined, as done below, the operation of taking the dual of a hypergraph is an
involution
Involution may refer to: Mathematics
* Involution (mathematics), a function that is its own inverse
* Involution algebra, a *-algebra: a type of algebraic structure
* Involute, a construction in the differential geometry of curves
* Exponentiati ...
, i.e.,
:
A
connected graph
In mathematics and computer science, connectivity is one of the basic concepts of graph theory: it asks for the minimum number of elements (nodes or edges) that need to be removed to separate the remaining nodes into two or more isolated subgrap ...
''G'' with the same vertex set as a connected hypergraph ''H'' is a host graph for ''H'' if every hyperedge of ''H''
induces a connected subgraph in ''G''. For a disconnected hypergraph ''H'', ''G'' is a host graph if there is a bijection between the
connected components of ''G'' and of ''H'', such that each connected component ''G
''' of ''G'' is a host of the corresponding ''H
'''.
The 2-section (or clique graph, representing graph, primal graph, Gaifman graph) of a hypergraph is the graph with the same vertices of the hypergraph, and edges between all pairs of vertices contained in the same hyperedge.
Incidence matrix
Let
and
. Every hypergraph has an
incidence matrix
In mathematics, an incidence matrix is a logical matrix that shows the relationship between two classes of objects, usually called an incidence relation. If the first class is ''X'' and the second is ''Y'', the matrix has one row for each element o ...
.
For an undirected hypergraph,
where
:
The
transpose
In linear algebra, the transpose of a Matrix (mathematics), matrix is an operator which flips a matrix over its diagonal;
that is, it switches the row and column indices of the matrix by producing another matrix, often denoted by (among other ...
of the
incidence matrix defines a hypergraph
called the dual of
, where
is an ''m''-element set and
is an ''n''-element set of subsets of
. For
and
if and only if
In logic and related fields such as mathematics and philosophy, "if and only if" (often shortened as "iff") is paraphrased by the biconditional, a logical connective between statements. The biconditional is true in two cases, where either bo ...
.
For a directed hypergraph, the heads and tails of each hyperedge
are denoted by
and
respectively.
where
:
Incidence graph
A hypergraph ''H'' may be represented by a
bipartite graph
In the mathematics, mathematical field of graph theory, a bipartite graph (or bigraph) is a Graph (discrete mathematics), graph whose vertex (graph theory), vertices can be divided into two disjoint sets, disjoint and Independent set (graph theo ...
''BG'' as follows: the sets ''X'' and ''E'' are the parts of ''BG'', and (''x
1'', ''e
1'') are connected with an edge if and only if vertex ''x
1'' is contained in edge ''e
1'' in ''H''.
Conversely, any bipartite graph with fixed parts and no unconnected nodes in the second part represents some hypergraph in the manner described above. This bipartite graph is also called
incidence graph.
Adjacency matrix
A parallel for the adjacency matrix of a hypergraph can be drawn from the
adjacency matrix
In graph theory and computer science, an adjacency matrix is a square matrix used to represent a finite graph (discrete mathematics), graph. The elements of the matrix (mathematics), matrix indicate whether pairs of Vertex (graph theory), vertices ...
of a graph. In the case of a graph, the adjacency matrix is a square matrix which indicates whether pairs of vertices are
adjacent. Likewise, we can define the adjacency matrix
for a hypergraph in general where the hyperedges
have real weights
with
Cycles
In contrast with ordinary undirected graphs for which there is a single natural notion of
cycles
Cycle, cycles, or cyclic may refer to:
Anthropology and social sciences
* Cyclic history, a theory of history
* Cyclical theory, a theory of American political history associated with Arthur Schlesinger, Sr.
* Social cycle, various cycles in ...
and
acyclic graphs. For hypergraphs, there are multiple natural non-equivalent definitions of cycles which collapse to the ordinary notion of cycle when the graph case is considered.
Berge cycles
A first notion of cycle was introduced by
Claude Berge. A Berge cycle in a hypergraph is an alternating sequence of distinct vertices and edges
where
are both in
for each