Skip to content

WheelGraph ​

The wheel graph on n vertices — a hub joined to every vertex of an (n-1)-cycle rim.

✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram LanguageWheelGraph✓
WheelGraph(n)vertex 1 is the hub; vertices 2..n form the rim cycle. Needs n >= 4.
SageMathenumeratio_graph(graphs.WheelGraph(n))
Typed signatures
TypePackageApplies
(integer) -> valuecombinatoricsalways

Domain: Collections

Details
  • EdgeCount = 2(n - 1): n - 1 spokes plus the n - 1 rim edges. Vertex numbering (which vertex is the hub) is kernel-unverified against a live Wolfram session.

Examples

Basic #
live ↗
InEdgeCount(WheelGraph(6))\mathrm{EdgeCount}(\mathrm{WheelGraph}(6))Out1010
Scope #

A hub joined to a 77-cycle

live ↗
InWheelGraph(8)\mathrm{WheelGraph}(8)OutGraph([1,2,3,4,5,6,7,8],[UndirectedEdge(1,2),UndirectedEdge(1,3),UndirectedEdge(1,4),UndirectedEdge(1,5),UndirectedEdge(1,6),UndirectedEdge(1,7),UndirectedEdge(1,8),UndirectedEdge(2,3),UndirectedEdge(3,4),UndirectedEdge(4,5),UndirectedEdge(5,6),UndirectedEdge(6,7),UndirectedEdge(7,8),UndirectedEdge(8,2)])\mathrm{Graph}(\bigl\lbrack1, 2, 3, 4, 5, 6, 7, 8\bigr\rbrack, \bigl\lbrack\mathrm{UndirectedEdge}(1, 2), \mathrm{UndirectedEdge}(1, 3), \mathrm{UndirectedEdge}(1, 4), \mathrm{UndirectedEdge}(1, 5), \mathrm{UndirectedEdge}(1, 6), \mathrm{UndirectedEdge}(1, 7), \mathrm{UndirectedEdge}(1, 8), \mathrm{UndirectedEdge}(2, 3), \mathrm{UndirectedEdge}(3, 4), \mathrm{UndirectedEdge}(4, 5), \mathrm{UndirectedEdge}(5, 6), \mathrm{UndirectedEdge}(6, 7), \mathrm{UndirectedEdge}(7, 8), \mathrm{UndirectedEdge}(8, 2)\bigr\rbrack)

A hub plus a 44-cycle rim

live ↗
InWheelGraph(5)\mathrm{WheelGraph}(5)OutGraph([1,2,3,4,5],[UndirectedEdge(1,2),UndirectedEdge(1,3),UndirectedEdge(1,4),UndirectedEdge(1,5),UndirectedEdge(2,3),UndirectedEdge(3,4),UndirectedEdge(4,5),UndirectedEdge(5,2)])\mathrm{Graph}(\bigl\lbrack1, 2, 3, 4, 5\bigr\rbrack, \bigl\lbrack\mathrm{UndirectedEdge}(1, 2), \mathrm{UndirectedEdge}(1, 3), \mathrm{UndirectedEdge}(1, 4), \mathrm{UndirectedEdge}(1, 5), \mathrm{UndirectedEdge}(2, 3), \mathrm{UndirectedEdge}(3, 4), \mathrm{UndirectedEdge}(4, 5), \mathrm{UndirectedEdge}(5, 2)\bigr\rbrack)

A hub joined to a 55-cycle

live ↗
InWheelGraph(6)\mathrm{WheelGraph}(6)OutGraph([1,2,3,4,5,6],[UndirectedEdge(1,2),UndirectedEdge(1,3),UndirectedEdge(1,4),UndirectedEdge(1,5),UndirectedEdge(1,6),UndirectedEdge(2,3),UndirectedEdge(3,4),UndirectedEdge(4,5),UndirectedEdge(5,6),UndirectedEdge(6,2)])\mathrm{Graph}(\bigl\lbrack1, 2, 3, 4, 5, 6\bigr\rbrack, \bigl\lbrack\mathrm{UndirectedEdge}(1, 2), \mathrm{UndirectedEdge}(1, 3), \mathrm{UndirectedEdge}(1, 4), \mathrm{UndirectedEdge}(1, 5), \mathrm{UndirectedEdge}(1, 6), \mathrm{UndirectedEdge}(2, 3), \mathrm{UndirectedEdge}(3, 4), \mathrm{UndirectedEdge}(4, 5), \mathrm{UndirectedEdge}(5, 6), \mathrm{UndirectedEdge}(6, 2)\bigr\rbrack)
Applications #

The hub reaches everything in one step; rim vertices need two

live ↗
InMap(_1⁡↦VertexEccentricity(WheelGraph(6),_1⁡),VertexList(WheelGraph(6)))\mathrm{Map}(\operatorname{\_1}↦\mathrm{VertexEccentricity}(\mathrm{WheelGraph}(6), \operatorname{\_1}), \mathrm{VertexList}(\mathrm{WheelGraph}(6)))Out[1,2,2,2,2,2]\bigl\lbrack1, 2, 2, 2, 2, 2\bigr\rbrack
Properties #

A hub with a triangle rim makes the complete graph on four vertices

live ↗
InWheelGraph(4)\mathrm{WheelGraph}(4)OutGraph([1,2,3,4],[UndirectedEdge(1,2),UndirectedEdge(1,3),UndirectedEdge(1,4),UndirectedEdge(2,3),UndirectedEdge(3,4),UndirectedEdge(4,2)])\mathrm{Graph}(\bigl\lbrack1, 2, 3, 4\bigr\rbrack, \bigl\lbrack\mathrm{UndirectedEdge}(1, 2), \mathrm{UndirectedEdge}(1, 3), \mathrm{UndirectedEdge}(1, 4), \mathrm{UndirectedEdge}(2, 3), \mathrm{UndirectedEdge}(3, 4), \mathrm{UndirectedEdge}(4, 2)\bigr\rbrack)

The wheel on 44 vertices coincides with K4K_4

live ↗
In[WheelGraph(4),CompleteGraph(4)]\bigl\lbrack\mathrm{WheelGraph}(4), \mathrm{CompleteGraph}(4)\bigr\rbrackOut[Graph([1,2,3,4],[UndirectedEdge(1,2),UndirectedEdge(1,3),UndirectedEdge(1,4),UndirectedEdge(2,3),UndirectedEdge(3,4),UndirectedEdge(4,2)]),Graph([1,2,3,4],[UndirectedEdge(1,2),UndirectedEdge(1,3),UndirectedEdge(1,4),UndirectedEdge(2,3),UndirectedEdge(2,4),UndirectedEdge(3,4)])]\bigl\lbrack\mathrm{Graph}(\bigl\lbrack1, 2, 3, 4\bigr\rbrack, \bigl\lbrack\mathrm{UndirectedEdge}(1, 2), \mathrm{UndirectedEdge}(1, 3), \mathrm{UndirectedEdge}(1, 4), \mathrm{UndirectedEdge}(2, 3), \mathrm{UndirectedEdge}(3, 4), \mathrm{UndirectedEdge}(4, 2)\bigr\rbrack), \mathrm{Graph}(\bigl\lbrack1, 2, 3, 4\bigr\rbrack, \bigl\lbrack\mathrm{UndirectedEdge}(1, 2), \mathrm{UndirectedEdge}(1, 3), \mathrm{UndirectedEdge}(1, 4), \mathrm{UndirectedEdge}(2, 3), \mathrm{UndirectedEdge}(2, 4), \mathrm{UndirectedEdge}(3, 4)\bigr\rbrack)\bigr\rbrack
About
Examples7
Checked againstWolfram Language 7 agreeSageMath 1 agree5 differ
CrosswalkWolfram LanguageSageMath

Implementation

mappedsagepackages/oracle/src/mappings.ts

See also: CycleGraph, StarGraph