Source: MinimumGraphBandwidth
Target: ILP
Motivation: Enables exact solving of MinimumGraphBandwidth using mature ILP solvers. The minimax objective is naturally linearized via a bottleneck variable.
Reference:
Reduction Algorithm
Notation:
- Source: MinimumGraphBandwidth instance with graph G = (V, E), n =
num_vertices, m = num_edges
- Target: ILP instance with n² + 1 variables and 2n + 2m constraints
Variable mapping:
- Binary assignment variables: x_{i,p} ∈ {0, 1} for i ∈ V, p ∈ {0, ..., n−1}. x_{i,p} = 1 iff vertex i is assigned to position p. Variable index: i·n + p. Bounds: lower = 0, upper = 1.
- Bottleneck variable: B ∈ {0, ..., n−1} at index n². Bounds: lower = 0, upper = n − 1.
All variables use the ILP<i32> variant — the binary assignment variables are encoded as i32 with explicit [0, 1] bounds.
Constraint/objective transformation:
-
Row constraints (each vertex gets one position):
∀i ∈ V: Σ_{p=0}^{n−1} x_{i,p} = 1
-
Column constraints (each position holds one vertex):
∀p ∈ {0, ..., n−1}: Σ_{i=0}^{n−1} x_{i,p} = 1
-
Bandwidth constraints (∀(u,v) ∈ E):
Σ_p p·x_{u,p} − Σ_p p·x_{v,p} ≤ B
Σ_p p·x_{v,p} − Σ_p p·x_{u,p} ≤ B
Objective: Minimize B.
Solution extraction: From the ILP solution, read each x_{i,p} = 1 to reconstruct the vertex labeling f(i) = p. The optimal bandwidth is B.
Size Overhead
Symbols:
- n =
num_vertices of source graph G
- m =
num_edges of source graph G
| Target metric (code name) |
Polynomial (using getter names) |
num_vars |
num_vertices^2 + 1 |
num_constraints |
2 * num_vertices + 2 * num_edges |
Validation Method
- Cross-check with brute-force solver on small instances (n ≤ 8)
- Compare with known closed-form bandwidth values: path P_n: 1, cycle C_n: 2, grid P_r × P_c: min(r, c), star K_{1,n−1}: ⌊n/2⌋
Example
Source: P₂ × P₃ grid (2×3 grid, bandwidth = 2)
Graph:
0 — 1 — 2
| | |
3 — 4 — 5
Vertices: {0, 1, 2, 3, 4, 5}
Edges: {(0,1), (1,2), (0,3), (1,4), (2,5), (3,4), (4,5)}
Known optimal bandwidth: 2 (Chvátalová 1975: φ(P_m × P_n) = min(m, n))
Target ILP:
Variables (37 total, all i32):
x_{i,p} ∈ [0,1] for i,p ∈ {0..5} (36 variables, indices 0..35)
B ∈ [0,5] (1 variable, index 36)
Constraints (26 total):
Row (6): Σ_p x_{i,p} = 1 for each vertex i
Col (6): Σ_i x_{i,p} = 1 for each position p
Bw (14): Σ_p p·x_{u,p} − Σ_p p·x_{v,p} ≤ B (both directions, 7 edges)
Objective: Minimize B
Solution: B = 2. Optimal column-major assignment: f(0)=0, f(3)=1, f(1)=2, f(4)=3, f(2)=4, f(5)=5.
Verification: edge spans = {|0−2|, |2−4|, |0−1|, |2−3|, |4−5|, |1−3|, |3−5|} = {2, 2, 1, 1, 1, 2, 2}, max = 2 = B ✓
Suboptimal: Row-major f(0)=0, f(1)=1, f(2)=2, f(3)=3, f(4)=4, f(5)=5 gives B = 3 (edge (0,3) spans |0−3| = 3).
Overhead: n=6, m=7 → num_vars = 37, num_constraints = 26.
Source: MinimumGraphBandwidth
Target: ILP
Motivation: Enables exact solving of MinimumGraphBandwidth using mature ILP solvers. The minimax objective is naturally linearized via a bottleneck variable.
Reference:
Reduction Algorithm
Notation:
num_vertices, m =num_edgesVariable mapping:
All variables use the
ILP<i32>variant — the binary assignment variables are encoded as i32 with explicit [0, 1] bounds.Constraint/objective transformation:
Row constraints (each vertex gets one position):
∀i ∈ V: Σ_{p=0}^{n−1} x_{i,p} = 1
Column constraints (each position holds one vertex):
∀p ∈ {0, ..., n−1}: Σ_{i=0}^{n−1} x_{i,p} = 1
Bandwidth constraints (∀(u,v) ∈ E):
Σ_p p·x_{u,p} − Σ_p p·x_{v,p} ≤ B
Σ_p p·x_{v,p} − Σ_p p·x_{u,p} ≤ B
Objective: Minimize B.
Solution extraction: From the ILP solution, read each x_{i,p} = 1 to reconstruct the vertex labeling f(i) = p. The optimal bandwidth is B.
Size Overhead
Symbols:
num_verticesof source graph Gnum_edgesof source graph Gnum_varsnum_vertices^2 + 1num_constraints2 * num_vertices + 2 * num_edgesValidation Method
Example
Source: P₂ × P₃ grid (2×3 grid, bandwidth = 2)
Target ILP:
Solution: B = 2. Optimal column-major assignment: f(0)=0, f(3)=1, f(1)=2, f(4)=3, f(2)=4, f(5)=5.
Verification: edge spans = {|0−2|, |2−4|, |0−1|, |2−3|, |4−5|, |1−3|, |3−5|} = {2, 2, 1, 1, 1, 2, 2}, max = 2 = B ✓
Suboptimal: Row-major f(0)=0, f(1)=1, f(2)=2, f(3)=3, f(4)=4, f(5)=5 gives B = 3 (edge (0,3) spans |0−3| = 3).
Overhead: n=6, m=7 → num_vars = 37, num_constraints = 26.