GraphTheory
LineGraph
construct line graph of graph
Calling Sequence
Parameters
Description
Examples
LineGraph(G)
G
-
undirected graph
The LineGraph command creates the line graph L⁡G of a given graph G. The vertices of L⁡G are the edges of G and two vertices are connected by an edge if the corresponding edges in G are adjacent.
with⁡GraphTheory:
K4≔CompleteGraph⁡4
K4≔Graph 1: an undirected unweighted graph with 4 vertices and 6 edge(s)
DrawGraph⁡K4
L≔LineGraph⁡K4
L≔Graph 2: an undirected unweighted graph with 6 vertices and 12 edge(s)
DrawGraph⁡L
Vertices⁡L
1-2,1-3,1-4,2-3,2-4,3-4
Edges⁡GraphComplement⁡L
1-2,3-4,1-3,2-4,1-4,2-3
See Also
DrawGraph
Edges
GraphComplement
Vertices
Download Help Document
What kind of issue would you like to report? (Optional)