HararyGraph
The minimum-edge k-connected graph on n vertices (Harary, 1962).
✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram Language
HararyGraph!HararyGraph(k, n)EdgeCount = ceil(k n / 2), minimum vertex degree >= k.SageMath
enumeratio_graph(graphs.HararyGraph(k, n))Typed signatures
| Type | Package | Applies |
|---|---|---|
(integer, integer) -> value | combinatorics | always |
Details
- k even: the circulant CirculantGraph(n, {1, …, k/2}). k odd, n even: that circulant plus the n/2 diametrically-opposite edges. k odd, n odd: that circulant plus vertex 1 joined to BOTH floor(n/2)+1 and ceil(n/2)+1 (1 alone ends up with degree k + 1 -- the one vertex n*k being odd forces to take the remainder), plus i <-> i + ceil(n/2) (1-based) giving everyone else their kth edge.
- Kernel-verified against Wolfram 15 for the odd/odd case: HararyGraph(3, 7) gives exactly the 7-cycle plus {1-4, 1-5, 2-6, 3-7}. The even-k and (odd-k, even-n) cases follow the standard, unambiguous Harary construction and were not separately kernel-checked.
Examples
Scope #
A 3-connected Harary graph on five vertices, with the fewest edges that connectivity allows
live ↗InOut
Applications #
Every vertex of this 4-connected graph on six vertices sits within distance 2 of all others
live ↗InOut
About
| Examples | 4 |
|---|---|
| Checked against | Wolfram Language 3 agree1 differSageMath 1 agree1 differ |
| Crosswalk | Wolfram LanguageSageMath |
Implementation
mapped
sagepackages/oracle/src/mappings.ts See also: CirculantGraph, IsConnectedGraph