Multigraph
In mathematics, and more specifically in graph theory, a multigraph is a graph which is permitted to have multiple edges, that is, graph theory#Basics|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.
For some authors, the terms pseudograph and multigraph are synonymous. For others, a pseudograph is a multigraph that is permitted to have loops.
Undirected multigraph (edges without own identity)
A multigraph G is an ordered pair G := withUndirected multigraph (edges with own identity)
A multigraph G is an ordered triple G := with- V a set of vertices or nodes,
- E a set of edges or lines,
- r : E →
, assigning to each edge an unordered pair of endpoint nodes.
Directed multigraph (edges without own identity)
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 := with- V a set of vertices or nodes,
- A a multiset of ordered pairs of vertices called directed edges, arcs or arrows.
Directed multigraph (edges with own identity)
A multidigraph or quiver G is an ordered 4-tuple G := 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.
In category theory a small category can be defined as a multidigraph equipped with an associative composition law and a distinguished self-loop at each vertex serving as the left and right identity for composition. For this reason, in category theory the term graph is standardly taken to mean "multidigraph", and the underlying multidigraph of a category is called its underlying digraph.
Labeling
Multigraphs and multidigraphs also support the notion of graph labeling, in a similar way. However there is no unity in terminology in this case.The definitions of labeled multigraphs and labeled multidigraphs are similar, and we define only the latter ones here.
Definition 1: A labeled multidigraph is a labeled graph with labeled arcs.
Formally: A labeled multidigraph G is a multigraph with labeled vertices and arcs. Formally it is an 8-tuple where
- is a set of vertices and is a set of arcs.
- and are finite alphabets of the available vertex and arc labels,
- and are two maps indicating the source and target vertex of an arc,
- and are two maps describing the labeling of the vertices and arcs.