Skip to content

LineGraph ​

The graph whose vertices are the edges of g, joined when the original edges share an endpoint.

✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram LanguageLineGraph✓
LineGraph(g)one vertex per edge of g (numbered 1..EdgeCount(g), in EdgeList order), UNDIRECTED regardless of g's own edge directions.
Typed signatures
TypePackageApplies
(value) -> valuecombinatoricsalways

Domain: Collections

Details
  • EdgeCount(LineGraph(g)) = sum over v of C(VertexDegree(v), 2) for a simple g -- every pair of edges sharing vertex v contributes one line-graph edge.

Examples

Basic #
live ↗
InEdgeCount(LineGraph(CompleteGraph(3)))\mathrm{EdgeCount}(\mathrm{LineGraph}(\mathrm{CompleteGraph}(3)))Out33
About
Examples1
Checked againstWolfram Language 1 agreeSageMath 1 agree
CrosswalkWolfram Language

Implementation

mappedsagepackages/oracle/src/mappings.ts

See also: VertexDegree, AdjacencyGraph