{{Short description|Graph with multiple edges between two vertices}} {{About|the mathematical concept}} {{Redirect-distinguish|Pseudograph|Pseudepigraph}} thumb|right|A multigraph with multiple edges (red) and several loops (blue). Not all authors allow multigraphs to have loops. In mathematics, and more specifically in graph theory, a '''multigraph''' is a graph which is permitted to have multiple edges (also called ''parallel edges''<ref>For example, see Balakrishnan 1997, p. 1 or Chartrand and Zhang 2012, p. 26.</ref>), 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.
==Undirected multigraph (edges without own identity)==
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''.
==Undirected multigraph (edges with own identity)==
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'' → <nowiki>{</nowiki>{''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,<ref>For example, see Bollobás 2002, p. 7 or Diestel 2010, p. 28.</ref> while others call these '''pseudographs''', reserving the term multigraph for the case with no loops.<ref>For example, see Wilson 2002, p. 6 or Chartrand and Zhang 2012, pp. 26-27.</ref>
==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'' := (''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.
==Directed multigraph (edges with own identity)==
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'', *<math>s : A \rightarrow V</math>, assigning to each edge its source node, *<math>t : A \rightarrow V</math>, assigning to each edge its target node.
This notion might be used to model the possible flight connections offered by an airline. In this case the multigraph would be a directed graph with pairs of directed parallel edges connecting cities to show that it is possible to fly both ''to'' and ''from'' these locations.
In category theory a small category can be defined as a multidigraph (with edges having their own identity) 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 <math>G=(\Sigma_V, \Sigma_A, V, A, s, t, \ell_V, \ell_A)</math> where *<math>V</math> is a set of vertices and <math>A</math> is a set of arcs. *<math>\Sigma_V</math> and <math>\Sigma_A</math> are finite alphabets of the available vertex and arc labels, *<math>s\colon A\rightarrow\ V</math> and <math>t\colon A\rightarrow\ V</math> are two maps indicating the ''source'' and ''target'' vertex of an arc, *<math>\ell_V\colon V\rightarrow\Sigma_V</math> and <math>\ell_A\colon A\rightarrow\Sigma_A</math> are two maps describing the labeling of the vertices and arcs.
''Definition 2'': A labeled multidigraph is a labeled graph with multiple ''labeled'' arcs, i.e. arcs with the same end vertices and the same arc label (note that this notion of a labeled graph is different from the notion given by the article graph labeling).
==See also==
* Multidimensional network * Glossary of graph theory terms * Graph theory
==Notes==
{{Reflist}}
==References==
*{{Cite book | first1 = V. K. | last1 = Balakrishnan | title = Graph Theory | publisher = McGraw-Hill | year = 1997 | isbn = 0-07-005489-4 }} *{{Cite book | first1 = Béla | last1 = Bollobás | authorlink1 = Béla Bollobás | title = Modern Graph Theory | series = Graduate Texts in Mathematics | volume = 184 | publisher = Springer | year = 2002 | isbn = 0-387-98488-7 }} *{{Cite book | first1 = Gary | last1 = Chartrand | authorlink1 = Gary Chartrand | first2 = Ping | last2 = Zhang | author2-link = Ping Zhang (graph theorist) | title = A First Course in Graph Theory | publisher = Dover | year = 2012 | isbn = 978-0-486-48368-9 }} *{{Cite book | first1 = Reinhard | last1 = Diestel | title = Graph Theory | series = Graduate Texts in Mathematics | volume = 173 | publisher = Springer | edition = 4th | year = 2010 | isbn = 978-3-642-14278-9 }} *{{Cite book | first1 = Jonathan L. | last1 = Gross | first2 = Jay | last2 = Yellen | title = Graph Theory and Its Applications | publisher = CRC Press | year = 1998 | isbn = 0-8493-3982-0 }} *{{Cite book | editor1-first = Jonathan L. | editor1-last = Gross | editor2-first = Jay | editor2-last = Yellen | title = Handbook of Graph Theory | publisher = CRC | year = 2003 | isbn = 1-58488-090-2 }} *{{Cite book | first1 = Frank | last1 = Harary | authorlink1 = Frank Harary | title = Graph Theory | publisher = Addison Wesley | year = 1995 | isbn = 0-201-41033-8 }} *{{Cite journal | first1 = Svante | last1 = Janson | authorlink1 = Svante Janson | first2 = Donald E. | last2 = Knuth | authorlink2 = Donald Knuth | first3 = Tomasz | last3 = Luczak | first4 = Boris | last4 = Pittel | title = The birth of the giant component | journal = Random Structures and Algorithms | volume = 4 | year = 1993 | issue = 3 | pages = 231–358 | issn = 1042-9832 | mr = 1220220 | doi = 10.1002/rsa.3240040303 | arxiv = math/9310236 | bibcode = 1993math.....10236J | s2cid = 206454812 }} *{{Cite book | first1 = Robert A. | last1 = Wilson | author-link1 = Robert A. Wilson (mathematician) | title = Graphs, Colourings and the Four-Colour Theorem | publisher = Oxford Science Publ. | year = 2002 | isbn = 0-19-851062-4 | url = https://books.google.com/books?id=iq0sSnIxJioC&dq=pseudograph&pg=PA6 }} *{{Cite book | first1 = Daniel | last1 = Zwillinger | title = CRC Standard Mathematical Tables and Formulae | publisher = Chapman & Hall/CRC | edition = 31st | year = 2002 | isbn = 1-58488-291-3 }}
==External links== * {{DADS|Multigraph|multigraph}}
Category:Extensions and generalizations of graphs