Graph Card

Author

Eric W. Weisstein
May 24, 2026

This notebook downloaded from https://mathworld.wolfram.com/notebooks/GraphTheory/GraphCard.nb.

For more information, see Eric's MathWorld entry https://mathworld.wolfram.com/GraphCard.html.

©2026 Wolfram Research, Inc. except for portions noted otherwise

Figure

edges = {1 <-> 2, 2 <-> 3, 3 <-> 4, 4 <-> 5, 2 <-> 5};

g0 = Graph[
  edges,
  VertexLabels -> "Name",
  GraphLayout -> "SpringElectricalEmbedding"
];

coords = AssociationThread[
  VertexList[g0],
  GraphEmbedding[g0]
];

fixedGraph[graph_] := Graph[
  VertexList[graph],
  EdgeList[graph],
  VertexLabels -> "Name",
  VertexCoordinates -> Normal @ KeyTake[coords, VertexList[graph]],
  ImagePadding -> 20,
  ImageSize -> 220
];

g = fixedGraph[g0];
card = fixedGraph[VertexDelete[g0, 3]];

GraphicsRow[
  {
    HighlightGraph[g, {3, IncidenceList[g0, 3]}],
    card
  },
  Spacings -> Scaled[.15],
  ImageSize -> 500
]