liveBook · Manning

Multigraph

As explained in Optimization Algorithms: AI techniques for design, planning, and control problems

A multigraph is a graph that can contain multiple parallel edges between the same pair of vertices.

A multigraph is a graph in which multiple parallel edges can connect the same pair of vertices. This models distinct relationships that share endpoints, such as several roads between two locations, alternative capacities in resource allocation, or multiple social relationships. section 3.1

Three parallel roads

A NetworkX MultiGraph adds the edge tuple (0, 1) three times, representing three separate connections between vertices 0 and 1; repeated connections also join vertices 3 and 4.

How Optimization Algorithms: AI techniques for design, planning, and control problems covers it

How deep it goes
Defines parallel edges and demonstrates NetworkX construction and visualization without developing multigraph algorithms.
Examples
Uses repeated NetworkX edges, three parallel connections between nodes 0 and 1, and two between nodes 3 and 4.
What it assumes
Assumes familiarity with vertices, edges, and graph representations while defining the multigraph distinction explicitly.
What you can do after
Build it from scratch with NetworkX by creating a MultiGraph, adding nodes and repeated edges, and rendering the result.
How it connects
Connects multigraphs with graphs, vertices, edges, traffic routing, resource allocation, and social networks.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Optimization Algorithms: AI techniques for design, planning, and control problems. The section links point to the parts of the book it draws on.