Parallel Edges and Self-Loops

Some graph models permit more than one edge between a pair of vertices and edges whose two ends coincide.

Source
Anbloq
Language
English
Created
Updated
Chapters
4
Reading time
1 min
In this article4 chapters
  1. Choose the identities
  2. Model a self transition
  3. Preserve identities when endpoints repeat
  4. Pick algorithms with matching assumptions

Choose the identities

Two distinct train services connecting A to B can be parallel edges with separate times. Collapsing their endpoints into one pair loses those service identities. Stable record identifiers allow a graph to retain each service.

Model a self transition

An event that keeps a system in the same state can be represented by a self-loop. If path analysis treats only changes as edges, that loop may be omitted under the model's promise. State transition tables describe what the edge means.[1]

Preserve identities when endpoints repeat

Two different bus lines can connect stops U and V. A multigraph can model both with separate IDs. A loop from U to U may describe a local circuit and changes some degree and cycle calculations. Reducing edges to a set of endpoint pairs makes the parallel lines collapse. See counting degree.

e1 = U–V, line one
e2 = U–V, line two
e3 = U–U, loop
Undirected degree at U: 1 + 1 + 2 = 4

Pick algorithms with matching assumptions

A simple graph convention removes loops and parallel edges entirely. In a multigraph, a pair of parallel edges can form a cycle of length two under a common convention. Record edge IDs when traversal needs to distinguish those cases.

References

  1. Eric Lehman, F. Thomson Leighton and Albert R. Meyer, Mathematics for Computer Science ↩