In mathematics, and more specifically in graph theory, a multigraph is a graph which is permitted to have multiple edges (also called parallel edges), that is, edges that have the same end nodes. Thus two vertices may be connected by more than one edge.
There are 2 distinct notions of multiple edges:
Edges without own identity: The identity of an edge is defined solely by the two nodes it connects. In this case, the term "multiple edges" means that the same edge can occur several times between these two nodes.
Edges with own identity: Edges are primitive entities just like nodes. When multiple edges connect two nodes, these are different edges.
A multigraph is different from a hypergraph, which is a graph in which an edge can connect any number of nodes, not just two.
For some authors, the terms pseudograph and multigraph are synonymous. For others, a pseudograph is a multigraph that is permitted to have loops.
A multigraph G is an ordered pair G := (V, E) with
V a set of vertices or nodes,
E a multiset of unordered pairs of vertices, called edges or lines.
A multigraph G is an ordered triple G := (V, E, r) with
V a set of vertices or nodes,
E a set of edges or lines,
r : E → {{x,y} : x, y ∈ V}, assigning to each edge an unordered pair of endpoint nodes.
Some authors allow multigraphs to have loops, that is, an edge that connects a vertex to itself, while others call these pseudographs, reserving the term multigraph for the case with no loops.
A multidigraph is a directed graph which is permitted to have multiple arcs, i.e., arcs with the same source and target nodes. A multidigraph G is an ordered pair G := (V, A) with
V a set of vertices or nodes,
A a multiset of ordered pairs of vertices called directed edges, arcs or arrows.
A mixed multigraph G := (V, E, A) may be defined in the same way as a mixed graph.
A multidigraph or quiver G is an ordered 4-tuple G := (V, A, s, t) with
V a set of vertices or nodes,
A a set of edges or lines,
assigning to each edge its source node,
assigning to each edge its target node.