Foundations

Simple Graphs vs Multigraphs Explained

Two allowances separate them: an edge from a vertex to itself, and a second edge between the same pair. This guide works through what each one changes, which standard bounds quietly stop holding, why the founding problem of the subject cannot be a simple graph, and when collapsing duplicates is safe.

16 Min Read Updated: September 2026 Beginner Level
Mohammed Islam Hadjoudj
Mohammed Islam Hadjoudj
Expert Operations Research Engineer

1. Three definitions, two allowances

Two things a set of unordered pairs cannot express: an edge that joins a vertex to itself, and two distinct edges joining the same pair. Whether you permit them gives three different objects, and the names are worth getting right because theorems are stated about specific ones.

The simple graph is the default in most of the literature, and its definition is the one from the guide to vertices and edges:

G = (V, E)      with   E ⊆ [V]²      each edge is a 2-element subset of V

Because E is a set of 2-element subsets, {v, v} is not admissible (it has one element) and the same pair cannot appear twice (a set holds each element once). Both restrictions are consequences of the notation rather than decisions someone made.

To lift them you need a different formalism. Bondy and Murty's Graph Theory gives edges an identity of their own and adds a function saying which pair each one joins:

G = (V, E, ψ)      with   ψ: E → unordered pairs of (not necessarily distinct) vertices

Now e1 and e2 can be different elements of E with ψ(e1) = ψ(e2) = {u, v}, which is a pair of parallel edges, and ψ(e) = {v, v} is a loop. Diestel reaches the same place with two maps sending each edge to its ends, and West with a relation associating each edge with its endpoints. The formalism differs; the content does not.

ObjectLoopsParallel edgesNeeds
Simple graphNoNoE ⊆ [V]²
MultigraphUsually noYesAn incidence function
PseudographYesYesAn incidence function
Three panels on the same four vertices. The first is a simple graph with four single edges and no loops. The second is a multigraph with a doubled edge between two of the vertices, labelled as needing an incidence function. The third is a pseudograph which adds a loop at one vertex, with a note that the loop contributes two to that vertex's degree.
The same four vertices under the three definitions. Each step to the right buys an allowance and costs a formalism.

Two warnings about the vocabulary itself, because they cause real confusion when reading papers:

2. Graph theory was founded on a multigraph

This is not a marginal case bolted on afterwards. The problem that started the subject is a multigraph, and it stops being the same problem if you simplify it.

Euler's 1736 paper on the bridges of Königsberg models four landmasses joined by seven bridges. Two bridges connect the north bank to the island, and two more connect the south bank to the island. Those are parallel edges, and no simple graph can hold them.

Two panels. On the left the Königsberg multigraph: four vertices, north bank, island, south bank and east island, joined by seven edges including two parallel pairs, with degrees 3, 5, 3 and 3, all four odd, and the verdict that no Eulerian trail exists. On the right the same structure with the parallel edges collapsed into single edges, giving five edges and degrees 2, 3, 2 and 3, only two of which are odd, and the verdict that an Eulerian trail does exist. A caption notes that simplifying the multigraph changes the answer to the founding question of graph theory.
Left, the real bridges: four odd-degree landmasses, so no walk crosses every bridge exactly once. Right, the same map with the parallel bridges merged: only two odd vertices, and the walk becomes possible.

Euler's criterion is about degree parity, and the parallel bridges are what push the degrees to where they are:

Königsberg multigraph      7 edges    degrees 3, 5, 3, 3    four odd  → no Eulerian trail
Underlying simple graph    5 edges    degrees 2, 3, 2, 3    two odd   → a trail exists

Delete the duplicates and the answer flips. The multiplicity is not decoration on the model, it is the model, and the historical detail in the history of graph theory is inseparable from the formalism. Anyone who loads the seven bridges into a data structure that silently deduplicates edges will conclude that Euler was wrong.

3. What a loop does to degree

Degree counts edge ends meeting a vertex, not edges. A loop has two ends and both of them land on the same vertex, so:

A loop at v contributes 2 to deg(v). Parallel edges each contribute 1, exactly as separate edges do.

That convention is forced, not chosen. The handshaking lemma counts the pairs (vertex, edge end at it) two ways, and every edge including a loop has exactly two ends, so ∑ deg(v) = 2m holds for pseudographs unchanged. Give a loop degree 1 and the oldest theorem in the subject breaks immediately.

Some consequences worth having in mind:

4. What multiplicity changes, and what it cannot

The useful question is not "is my graph simple" but "does the property I am computing depend on multiplicity". The answers split cleanly, and the split is not obvious.

Two vertices u and v joined by a single edge on the left and by two parallel edges on the right. A table beneath compares them: both are connected, both are bipartite, both have chromatic number 2, but the minimum cut rises from 1 to 2, the number of spanning trees rises from 1 to 2, and the girth falls from infinity to 2.
The smallest possible experiment. Doubling one edge leaves connectivity and colouring alone, and changes the min cut, the spanning tree count and the girth.
PropertyParallel edgesLoopsWhy
Connectivity, componentsNo effectNo effectReachability only needs one edge between a pair
PlanarityNo effectNo effectA multigraph is planar exactly when its underlying simple graph is
BipartitenessNo effectDestroys itA loop is an odd closed walk of length 1
Proper vertex colouringNo effectMakes it impossibleParallel edges impose the same constraint twice; a loop demands a vertex differ from itself
Degree, handshakingEach counts 1Counts 2Edge ends, not edges
Girth (shortest cycle)Drops to 2Drops to 1Two parallel edges form a cycle of length 2
Edge connectivity, min cutChangesNo effectEvery parallel copy must be cut too
Number of spanning treesChangesNo effectEach parallel copy gives a distinct tree
Maximum flowChangesNo effectParallel capacities add
Eulerian trail or circuitChangesAdds 2 to a degreeParity of degrees is the whole criterion

Three of those rows deserve their reasoning spelled out.

Colouring ignores parallel edges but dies on loops. A proper colouring requires the ends of every edge to get different colours. A second copy of {u, v} repeats a constraint that is already there, so the set of proper colourings, and therefore the chromatic number and the chromatic polynomial, are exactly those of the underlying simple graph. A loop demands c(v) ≠ c(v), which nothing satisfies, so a pseudograph with a loop has no proper colouring at all and its chromatic polynomial is identically zero. This is why graph colouring is almost always stated for loopless graphs.

Spanning tree counts do depend on multiplicity. Two vertices joined by a single edge have one spanning tree; joined by two parallel edges they have two, because choosing either edge gives a different tree. Kirchhoff's matrix-tree theorem of 1847 counts them from the Laplacian, and it is stated for multigraphs precisely because the multiplicities enter the matrix as off-diagonal counts. Electrical networks, which is where Kirchhoff met the problem, routinely have components in parallel.

Cuts and flows depend on multiplicity. The minimum number of edges whose removal disconnects u from v is 1 when a single edge joins them and 2 when two do. Since max flow equals min cut, the same holds for flow: k parallel unit-capacity edges carry k units. This is exactly why a multigraph with unit capacities is the natural unweighted model of a flow network.

5. Every simple-graph bound stops holding

A large fraction of the standard results carry an unstated simplicity assumption, and they do not degrade gracefully without it. They fail outright.

Standard resultSimple graphMultigraph
Maximum number of edgesm ≤ n(n-1)/2Unbounded: parallel copies may repeat freely
Sparse or dense classificationm = O(n) vs Θ(n²)Meaningless without a multiplicity bound
Adjacency matrix is 0/1YesNo: entries are counts
Degree equals neighbourhood sizedeg(v) = |N(v)|Fails; degree can exceed the number of neighbours
Euler's formula for planar graphsn - m + f = 2Still holds, since it counts faces not simplicity
Planar edge boundm ≤ 3n - 6 for n ≥ 3Fails: parallel edges bound faces of length 2
Handshaking lemma∑ deg(v) = 2mStill holds, with loops counted twice

The two rows that survive are worth noticing as much as the ones that fail. The handshaking lemma and Euler's polyhedral formula are both proved by counting incidences, and counting arguments do not care whether two edges happen to join the same pair. The bounds that fail are the ones proved by choosing distinct pairs of vertices, which is precisely the step a multigraph invalidates.

The practical version of this section: when you look up a bound, check whether its proof counts incidences or counts pairs. The first kind travels to multigraphs, the second does not.

6. Storage: where the adjacency matrix runs out

The three standard representations degrade very differently, and the differences decide which one you use.

The adjacency matrix stops being a 0/1 matrix. The natural extension holds the number of edges joining each pair, so entry (u, v) becomes a count, and a loop conventionally puts 2 on the diagonal so that row sums still give degrees. It works, but it has a fatal limitation for real data: a count cannot carry per-edge information. If your three parallel flights each have a different price, a matrix of counts has nowhere to put them.

simple       A[u][v] ∈ {0, 1}
multigraph   A[u][v] = number of edges joining u and v
pseudograph  A[v][v] = 2 × (number of loops at v)      so that row sums are degrees

The adjacency list keeps duplicates. The list for u simply contains v as many times as there are edges joining them. Traversal code is unchanged, and BFS or DFS will consider the same neighbour repeatedly, which is harmless when the visited check is on vertices.

The edge list becomes the natural format. This is the representation that actually fits the mathematics: each edge is a record with its own identity, so parallel edges are simply distinct records, and per-edge attributes have somewhere to live. That is the incidence-function definition of section 1 expressed as a data structure.

One design point follows, and it is the single most useful thing to take from this section:

In a multigraph, edges need identities. A pair of endpoints no longer identifies an edge, so anything that refers to an edge, whether a matching, a spanning tree, a flow or a deletion, must refer to an edge ID and not to (u, v).

Almost every multigraph bug traces back to that one sentence. Storing a spanning tree as a set of vertex pairs, or a visited-edge set keyed on (u, v), quietly conflates parallel edges and produces answers that are wrong in ways no type checker will catch.

7. Which algorithms care

Most traversal-shaped algorithms are indifferent to multiplicity, because they mark vertices. The ones that mark or select edges need attention.

AlgorithmOn a multigraphWhat to watch
BFS and DFSWork unchangedThey visit a duplicated neighbour twice and skip it; the visited set is on vertices
DijkstraWorks unchangedRelaxation naturally keeps the cheapest of several parallel edges
Kruskal, PrimWork unchangedThe cycle test rejects the redundant copies automatically
Eulerian trail or circuitNeeds the multigraphEvery edge must be traversed once, so parallel edges are separate obligations; mark edge IDs, not pairs
Chinese postmanNeeds the multigraphThe algorithm's whole method is to duplicate edges, creating parallel copies deliberately
Max flowWorks, and multiplicity mattersParallel capacities add; keep them separate or sum them explicitly
Karger's min cutProduces multigraphsContracting an edge merges vertices and creates parallel edges; deduplicating them destroys correctness
MatchingCare neededParallel edges give alternative choices for the same pair; loops are never in a matching
Vertex colouringIgnore parallel edgesSimplify first; a loop means no colouring exists

The Karger row is the one that surprises people, and it is worth stating in full because it inverts the usual instinct. Karger's randomised minimum cut algorithm repeatedly contracts a uniformly random edge, merging its two endpoints into one vertex. Contraction turns two edges that pointed at the two merged vertices into two parallel edges pointing at the new one, and the algorithm's probability analysis depends on keeping every copy, because the chance of contracting an edge is proportional to how many copies there are. Simplify the intermediate graph and the algorithm stops being correct. The same is true of the contraction step in Borůvka's spanning tree algorithm.

8. When a multigraph is not optional

Multigraphs are not a curiosity to be normalised away. They are the honest model whenever two entities can be related more than once and the individual relations matter:

9. Simplifying, and what it costs

Turning a multigraph into a simple graph is often the right move, and it is only safe if you know which of the properties in section 4 you are about to change. There are three standard ways, and they answer different questions:

MethodKeepsLosesRight for
Collapse parallel edges to one, drop loopsConnectivity, planarity, and the chromatic number, though note that dropping a loop turns an uncolourable graph into a colourable oneCuts, flows, spanning tree counts, Eulerian structureStructural questions
Collapse and sum the weightsTotal capacity, so max flow and min cut surviveIndividual edge attributesFlow and cut problems
Collapse and take the minimum weightShortest path distancesThe alternatives, so cuts and flows breakRouting

Note that the second and third rules are incompatible: summing is right for capacities and wrong for distances, taking the minimum is right for distances and wrong for capacities. Which one applies depends on how weights combine along a path, which is the subject of the companion guide on weighted vs unweighted graphs. Choosing the wrong collapse silently answers a different question, and the graph will look perfectly reasonable afterwards.

A fourth option is often better than any of them: keep the multigraph and let the algorithm handle it. BFS, DFS, Dijkstra, Kruskal and Prim all run correctly on multigraphs as they stand, so simplification frequently buys nothing and costs information.

10. Directed multigraphs

Everything above transfers to directed graphs, with one extra distinction worth naming. In a digraph, the arcs (u, v) and (v, u) are already different objects, which is not multiplicity but direction: that pair is a digon, and an ordinary digraph is already allowed to contain one without any extension to its definition. Plenty of digraphs contain none at all: a DAG never does. Multiplicity in the directed setting means two or more arcs with the same tail and the same head, which again needs an incidence-style definition, as in Bang-Jensen and Gutin's Digraphs.

The practical consequences carry over directly: in-degree and out-degree count arcs rather than distinct neighbours, a directed loop adds 1 to both, and Eulerian conditions on a directed multigraph still compare in-degree with out-degree at every vertex.

11. Common mistakes

12. Glossary

TermMeaning
Simple graphNo loops, no parallel edges; E ⊆ [V]²
MultigraphParallel edges allowed; loops allowed or not depending on the author
PseudographBoth loops and parallel edges allowed
Parallel edgesTwo or more distinct edges with the same pair of ends; also called multi-edges
MultiplicityThe number of edges joining a given pair of vertices
LoopAn edge whose two ends are the same vertex; contributes 2 to its degree
Incidence function ψMaps each edge to the pair of vertices it joins, giving edges their own identity
Underlying simple graphWhat remains after collapsing parallel edges and deleting loops
Loopless graphParallel edges permitted, loops not
GirthLength of the shortest cycle; 2 with parallel edges, 1 with a loop

13. Frequently asked questions

What is the difference between a simple graph and a multigraph?

A simple graph allows at most one edge between any pair of vertices and no edge from a vertex to itself, because its edge set is a set of 2-element subsets of the vertex set. A multigraph permits several distinct edges joining the same pair, which requires a different definition in which edges have their own identity and an incidence function says which pair each one joins. A pseudograph permits loops as well.

Is the Königsberg bridge problem a multigraph?

Yes, and necessarily so. Two bridges join the north bank to the island and two more join the south bank to the island, so the model has parallel edges and cannot be a simple graph. It matters: the seven-bridge multigraph has degrees 3, 5, 3 and 3, all four odd, so no Eulerian trail exists, which was Euler's answer in 1736. Collapse the parallel bridges and the degrees become 2, 3, 2 and 3, only two of which are odd, so a trail would exist. Simplifying changes the answer.

Does a loop count once or twice in the degree?

Twice. Degree counts the edge ends meeting a vertex, and a loop has two ends, both attached to the same vertex. The convention is forced rather than chosen: the handshaking lemma says the degrees sum to twice the number of edges, and its proof counts each edge's two ends, so giving a loop degree 1 would break it. A vertex carrying only a loop has degree 2 and is not isolated.

Do parallel edges change the chromatic number?

No. A proper colouring requires the two ends of each edge to differ, and a duplicate edge merely repeats a constraint that already exists, so the proper colourings of a multigraph are exactly those of its underlying simple graph, and the chromatic number and chromatic polynomial are unchanged. A loop is different: it would require a vertex to differ in colour from itself, so a graph with a loop has no proper colouring at all.

Can I just simplify a multigraph before running an algorithm?

Only for properties that do not depend on multiplicity. Connectivity, planarity and colouring survive simplification. Minimum cuts, maximum flows, spanning tree counts, girth and Eulerian trails do not. If you must collapse weighted parallel edges, sum the weights for capacities and take the minimum for distances, and note that those two rules are incompatible. Often the better answer is not to simplify at all, since BFS, DFS, Dijkstra, Kruskal and Prim all run correctly on multigraphs unchanged.

How do I store a multigraph in code?

Give every edge an identity. An edge list of records, each with its own ID, endpoints and attributes, is the direct expression of the incidence-function definition and the format that scales to per-edge data. An adjacency list works too, holding a neighbour once per parallel edge. An adjacency matrix can only hold counts, so it cannot carry per-edge attributes, and a matrix of booleans silently deletes multiplicity. Whatever you choose, never key a set of visited or selected edges on the endpoint pair.

14. References

The definitions, theorems and attributions above come from these sources, listed in chronological order.

  1. Euler, L. (1736). "Solutio problematis ad geometriam situs pertinentis." Commentarii Academiae Scientiarum Petropolitanae 8 (published 1741), 128 to 140. The Königsberg bridges, modelled as a multigraph.
  2. Kirchhoff, G. (1847). "Über die Auflösung der Gleichungen, auf welche man bei der Untersuchung der linearen Vertheilung galvanischer Ströme geführt wird." Annalen der Physik 148(12), 497 to 508. The matrix-tree theorem, developed on electrical networks with parallel components.
  3. Harary, F. (1969). Graph Theory. Reading, Massachusetts: Addison-Wesley. Distinguishes graphs, multigraphs and pseudographs.
  4. Karger, D. R. (1993). "Global Min-cuts in RNC, and Other Ramifications of a Simple Min-cut Algorithm." Proceedings of the 4th Annual ACM-SIAM Symposium on Discrete Algorithms, 21 to 30. The contraction algorithm that creates parallel edges as it runs.
  5. Karger, D. R. and Stein, C. (1996). "A New Approach to the Minimum Cut Problem." Journal of the ACM 43(4), 601 to 640.
  6. Bollobás, B. (1998). Modern Graph Theory. Graduate Texts in Mathematics 184. New York: Springer.
  7. West, D. B. (2001). Introduction to Graph Theory, 2nd edition. Upper Saddle River: Prentice Hall. Defines a graph by a vertex set, an edge set and an endpoint relation, which admits loops and parallel edges.
  8. Bondy, J. A. and Murty, U. S. R. (2008). Graph Theory. Graduate Texts in Mathematics 244. London: Springer. Source of the incidence-function definition in section 1.
  9. Bang-Jensen, J. and Gutin, G. (2009). Digraphs: Theory, Algorithms and Applications, 2nd edition. London: Springer. Directed multigraphs.
  10. Cormen, T. H., Leiserson, C. E., Rivest, R. L. and Stein, C. (2009). Introduction to Algorithms, 3rd edition. Cambridge, Massachusetts: MIT Press.
  11. Wilson, R. J. (2010). Introduction to Graph Theory, 5th edition. Harlow: Prentice Hall. Develops multigraphs alongside simple graphs from the first chapter.
  12. Chartrand, G., Lesniak, L. and Zhang, P. (2015). Graphs & Digraphs, 6th edition. Boca Raton: CRC Press.
  13. Diestel, R. (2017). Graph Theory, 5th edition. Graduate Texts in Mathematics 173. Berlin: Springer. Source of the simple-graph definition and of the multigraph formulation with two end maps.

Build the seven bridges yourself

Lay out the four landmasses, add the two parallel bridges to the island, and check the degrees. Then delete one duplicate and watch the parity change.

Open the visualizer

Cross Every Bridge Once

Lay out the four landmasses, add the two parallel bridges to the island, and check the degrees. Then delete one duplicate and watch the parity flip from impossible to possible.

Launch the Eulerian Path Visualizer