Source: BinPacking (3-Partition special case: capacity = A, constraint A/4 < aᵢ < A/2)
Target: MinimumGraphBandwidth
Motivation: Landmark reduction establishing NP-completeness of graph bandwidth even for trees with maximum degree 3. This is one of the strongest hardness results in graph layout theory — the problem remains hard on the simplest possible tree structure. The reduction also demonstrates strong NP-completeness: hardness persists even when all input numbers are polynomially bounded.
Reference:
Reduction Algorithm
Source problem
A 3-Partition instance: integers a₁, ..., a₃ₙ with A/4 < aᵢ < A/2 and Σaᵢ = nA. The question: can these be partitioned into n triples, each summing to A? (The size constraint forces exactly 3 items per triple.)
In this codebase, 3-Partition is a special case of BinPacking with capacity = A.
Parameters
Given the source instance, define:
- k = smallest power of 2 ≥ 6nA + 9n − 5 (the bandwidth bound)
- d = k/2
- mⱼ = 6dn · aⱼ (tentacle size encoding integer aⱼ)
- c = 12dnA (channel capacity constant)
The "Siphonophore" construction
The constructed graph G is a tree with max degree 3, built from five components. The name comes from Garey et al.: "The free trees we shall construct bear more resemblance to pelagic hydrozoa of the order Siphonophora than to actual trees."
1. Stem — A path of 4dn + 6d + 1 vertices. Every d-th vertex is a boundary vertex. The 2n + 4 boundary vertices are labeled:
b₀, h₁, b₁, p₁, b₂, f₁, b₃, ..., pₙ, b₂ₙ, fₙ, b₂ₙ₊₁, h₂, b₂ₙ₊₂, h₃, b₂ₙ₊₃
2. Heads (H₁, H₂, H₃) — Three subtrees, each with 2dk − 1 vertices, attached at h₁, h₂, h₃. Each head is a recursively constructed binary-tree-like structure where every vertex is within distance d of its center. Heads act as rigid anchors: in any bandwidth-≤-k layout, H₁ occupies the leftmost positions and H₃ the rightmost, pinning all other components to the interior.
3. Polyps (Pᵢ, Fᵢ) — Between the heads, n P-polyps and n F-polyps fill the interior. Each starts as a full head, then has vertices removed to create channels — parallel slots through which tentacles pass. Polyp sizes:
- Fᵢ: 2dk − 1 − 6di vertices (channels admit filaments only)
- Pᵢ: 2dk − 1 − c − 18di + 12d vertices (channels admit nematocysts)
4. Tentacles — Each integer aⱼ becomes a tentacle attached at H₂:
- Filament: a path of 4dn vertices
- Nematocysts: 2mⱼ = 12dn · aⱼ vertices at the end
Tentacle length is proportional to aⱼ, encoding the integer as a geometric "ruler."
5. Calibration — Total vertices = (2n + 3)(2dk) + 1. This count is exact, making the layout maximally tight: every position must be used, forcing the stem to stretch to its maximum (adjacent stem vertices exactly k positions apart).
Correctness
The key lemma (proved by induction in Section 8 of the paper): each P-polyp region absorbs the nematocysts of exactly 3 tentacles, and their sizes must sum to c = 12dnA. This forces a valid 3-Partition.
Equivalence: 3-Partition has a solution ⟺ optimal bandwidth of G = k.
Solution extraction: The three tentacles whose nematocysts land in region P'ᵢ identify triple Tᵢ.
Size Overhead
| Target metric |
Formula |
num_vertices |
(2n + 3) · 2dk + 1, where n = num_items/3, A = capacity, k = next power of 2 ≥ 6nA + 9n − 5, d = k/2 |
num_edges |
num_vertices − 1 (tree) |
Polynomial in n and A. Concrete sizes:
| n |
A |
k |
num_vertices |
| 1 |
6 |
64 |
20,481 |
| 1 |
10 |
128 |
131,073 |
| 2 |
10 |
256 |
458,753 |
Validation Method
The construction produces instances too large for brute-force solving (20K+ vertices at minimum). Use property-based tests:
- Vertex count:
num_vertices == (2n + 3) * 2 * d * k + 1
- Tree:
num_edges == num_vertices − 1 and graph is connected
- Max degree ≤ 3 for all vertices
- Head sizes: each head has exactly 2dk − 1 vertices
- Tentacle sizes: tentacle j has 4dn + 12dn · aⱼ vertices
- Consistency: sum of all component sizes equals total vertex count
Bandwidth equivalence relies on the published proof (Garey et al. 1978, Section 8, pp. 489–493).
Example
Source: n = 1, A = 6, integers (2, 2, 2). Partition: T₁ = {1, 2, 3}, sum = 6 ✓
Parameters: k = 64, d = 32, m₁ = m₂ = m₃ = 384
Constructed tree:
| Component |
Count |
Size each |
Total |
| Stem |
1 |
321 |
321 |
| Heads |
3 |
4,095 |
12,285 |
| P-polyps |
1 |
(per formula) |
— |
| F-polyps |
1 |
(per formula) |
— |
| Tentacles |
3 |
896 |
2,688 |
| Total |
|
|
20,481 |
Optimal bandwidth = 64 ⟺ 3-Partition solvable ⟺ YES ✓
Property checks: vertices = 20,481 ✓, edges = 20,480 ✓, max degree = 3 ✓
Source: BinPacking (3-Partition special case: capacity = A, constraint A/4 < aᵢ < A/2)
Target: MinimumGraphBandwidth
Motivation: Landmark reduction establishing NP-completeness of graph bandwidth even for trees with maximum degree 3. This is one of the strongest hardness results in graph layout theory — the problem remains hard on the simplest possible tree structure. The reduction also demonstrates strong NP-completeness: hardness persists even when all input numbers are polynomially bounded.
Reference:
Reduction Algorithm
Source problem
A 3-Partition instance: integers a₁, ..., a₃ₙ with A/4 < aᵢ < A/2 and Σaᵢ = nA. The question: can these be partitioned into n triples, each summing to A? (The size constraint forces exactly 3 items per triple.)
In this codebase, 3-Partition is a special case of BinPacking with capacity = A.
Parameters
Given the source instance, define:
The "Siphonophore" construction
The constructed graph G is a tree with max degree 3, built from five components. The name comes from Garey et al.: "The free trees we shall construct bear more resemblance to pelagic hydrozoa of the order Siphonophora than to actual trees."
1. Stem — A path of 4dn + 6d + 1 vertices. Every d-th vertex is a boundary vertex. The 2n + 4 boundary vertices are labeled:
2. Heads (H₁, H₂, H₃) — Three subtrees, each with 2dk − 1 vertices, attached at h₁, h₂, h₃. Each head is a recursively constructed binary-tree-like structure where every vertex is within distance d of its center. Heads act as rigid anchors: in any bandwidth-≤-k layout, H₁ occupies the leftmost positions and H₃ the rightmost, pinning all other components to the interior.
3. Polyps (Pᵢ, Fᵢ) — Between the heads, n P-polyps and n F-polyps fill the interior. Each starts as a full head, then has vertices removed to create channels — parallel slots through which tentacles pass. Polyp sizes:
4. Tentacles — Each integer aⱼ becomes a tentacle attached at H₂:
Tentacle length is proportional to aⱼ, encoding the integer as a geometric "ruler."
5. Calibration — Total vertices = (2n + 3)(2dk) + 1. This count is exact, making the layout maximally tight: every position must be used, forcing the stem to stretch to its maximum (adjacent stem vertices exactly k positions apart).
Correctness
The key lemma (proved by induction in Section 8 of the paper): each P-polyp region absorbs the nematocysts of exactly 3 tentacles, and their sizes must sum to c = 12dnA. This forces a valid 3-Partition.
Equivalence: 3-Partition has a solution ⟺ optimal bandwidth of G = k.
Solution extraction: The three tentacles whose nematocysts land in region P'ᵢ identify triple Tᵢ.
Size Overhead
num_verticesnum_items/3, A =capacity, k = next power of 2 ≥ 6nA + 9n − 5, d = k/2num_edgesnum_vertices− 1 (tree)Polynomial in n and A. Concrete sizes:
Validation Method
The construction produces instances too large for brute-force solving (20K+ vertices at minimum). Use property-based tests:
num_vertices == (2n + 3) * 2 * d * k + 1num_edges == num_vertices − 1and graph is connectedBandwidth equivalence relies on the published proof (Garey et al. 1978, Section 8, pp. 489–493).
Example
Source: n = 1, A = 6, integers (2, 2, 2). Partition: T₁ = {1, 2, 3}, sum = 6 ✓
Parameters: k = 64, d = 32, m₁ = m₂ = m₃ = 384
Constructed tree:
Optimal bandwidth = 64 ⟺ 3-Partition solvable ⟺ YES ✓
Property checks: vertices = 20,481 ✓, edges = 20,480 ✓, max degree = 3 ✓