|
269 | 269 | "SpinGlass": [Spin Glass], |
270 | 270 | "QUBO": [QUBO], |
271 | 271 | "ILP": [Integer Linear Programming], |
| 272 | + "DecisionILP": [Binary Decision Integer Linear Programming], |
272 | 273 | "IntegerKnapsack": [Integer Knapsack], |
273 | 274 | "Knapsack": [Knapsack], |
274 | 275 | "PartiallyOrderedKnapsack": [Partially Ordered Knapsack], |
@@ -5100,6 +5101,30 @@ In all graph problems below, $G = (V, E)$ denotes an undirected graph with $|V| |
5100 | 5101 | ] |
5101 | 5102 | } |
5102 | 5103 |
|
| 5104 | +#problem-def("DecisionILP")[ |
| 5105 | + Given a binary integer linear program with integer coefficients, a minimization |
| 5106 | + or maximization sense, and an integer bound $b$, find $x in {0,1}^n$ satisfying |
| 5107 | + all constraints and $c^top x <= b$ for minimization, or $c^top x >= b$ for maximization. |
| 5108 | +][ |
| 5109 | + This is the objective-threshold form of binary ILP. Binary adders translate its |
| 5110 | + pseudo-Boolean constraints to SAT @een2006. Exhaustive enumeration takes |
| 5111 | + $O^*(2^n)$ time; this is the registered reference bound, not a claim of a tight |
| 5112 | + best-known SAT solving bound. The registered SAT reduction answers a fixed |
| 5113 | + objective-threshold query; no reverse ILP-to-DecisionILP edge is registered. |
| 5114 | + |
| 5115 | + *Example.* #let x = load-model-example("DecisionILP") |
| 5116 | + Select exactly one of #x.instance.inner.variables.len() variables and minimize |
| 5117 | + the objective with coefficients |
| 5118 | + #x.instance.inner.objective.map(t => str(t.at(1))).join(", "). |
| 5119 | + At bound #x.instance.bound, the witness |
| 5120 | + $(#fmt-values(x.optimal_config))$ has objective #x.instance.bound and meets the bound. |
| 5121 | + #pred-commands( |
| 5122 | + "pred create --example " + problem-spec(x) + " -o x.json", |
| 5123 | + "pred solve x.json", |
| 5124 | + "pred evaluate x.json --config " + cli-config(x.optimal_config), |
| 5125 | + ) |
| 5126 | +] |
| 5127 | + |
5103 | 5128 | #{ |
5104 | 5129 | let x = load-model-example("QuadraticAssignment") |
5105 | 5130 | let C = x.instance.cost_matrix |
@@ -12603,6 +12628,78 @@ _Solution extraction and bounds._ Decode a string permutation, concatenate with |
12603 | 12628 |
|
12604 | 12629 | // Removed: SubsetSum → CapacityAssignment (unsound reduction, #1006) |
12605 | 12630 |
|
| 12631 | +#let decision-ilp-sat = load-example("DecisionILP", "Satisfiability") |
| 12632 | +#reduction-rule("DecisionILP", "Satisfiability", example: true, |
| 12633 | + example-caption: [Binary ILP threshold query encoded with adders and CNF gates.], |
| 12634 | + extra: [ |
| 12635 | + #pred-commands( |
| 12636 | + "pred create --example " + rule-spec(decision-ilp-sat) + " -o x.json", |
| 12637 | + "pred path " + problem-spec(decision-ilp-sat.source) + " " + problem-spec(decision-ilp-sat.target) + " --limit 1 -o paths.json", |
| 12638 | + "jq '.paths[0]' paths.json > route.json", |
| 12639 | + "pred reduce x.json --via route.json -o bundle.json", |
| 12640 | + "pred solve bundle.json --solver ilp", |
| 12641 | + ) |
| 12642 | + *Example.* The source selects exactly one of |
| 12643 | + #decision-ilp-sat.source.instance.inner.variables.len() variables, with objective |
| 12644 | + coefficients #decision-ilp-sat.source.instance.inner.objective.map(t => str(t.at(1))).join(", ") |
| 12645 | + and minimization bound #decision-ilp-sat.source.instance.bound. |
| 12646 | + The CNF has #decision-ilp-sat.target.instance.num_vars variables and |
| 12647 | + #decision-ilp-sat.target.instance.clauses.len() clauses. Its canonical witness |
| 12648 | + projects to $(#fmt-values(decision-ilp-sat.solutions.at(0).source_config))$; |
| 12649 | + both the selected-variable sum and the objective equal the bound. |
| 12650 | + Lowering the bound to zero makes the instance infeasible: exactly one variable |
| 12651 | + must be selected, and every objective coefficient is at least one. |
| 12652 | + ], |
| 12653 | +)[ |
| 12654 | + Binary decision ILP reduces to CNF satisfiability by binary addition and |
| 12655 | + Tseitin gate equivalences, following the adder-based pseudo-Boolean encoding |
| 12656 | + approach @een2006. The encoding preserves the objective threshold and both |
| 12657 | + optimization senses; it does not turn an arbitrary feasible assignment into an optimum. |
| 12658 | +][ |
| 12659 | + _Construction._ Let $n$ be the number of binary variables and $m$ the number of |
| 12660 | + constraints. Append the objective comparison as one additional row. Reserve |
| 12661 | + the first $n$ SAT variables for the source assignment and one false constant $f$. |
| 12662 | + For a row $sum_i a_i x_i diamond b$, replace each negative term by |
| 12663 | + $a_i x_i = (-a_i)(1-x_i)+a_i$. The normalized weights are $w_i=abs(a_i)$, |
| 12664 | + literals are $x_i$ or $not x_i$, and the threshold is |
| 12665 | + $B=b-sum_(i:a_i<0) a_i$. Set $T=sum_i w_i$. |
| 12666 | + Rows constant over $[0,T]$ emit either no clauses or an empty clause. |
| 12667 | + |
| 12668 | + Otherwise, sum the weighted literals using $W$ bits, where $W$ is the binary |
| 12669 | + length of $T$. Starting from zero, add each weighted literal with ripple |
| 12670 | + full-adders: for input bits $a,b$ and carry $d$, compute |
| 12671 | + $p=a xor b$, output $p xor d$, and carry $(a and b) or (p and d)$. |
| 12672 | + Every partial sum is at most $T<2^W$, so the last carry can be discarded. |
| 12673 | + Use equivalence clauses for each AND, OR, and XOR gate; constants may be folded. |
| 12674 | + Equality asserts each sum bit. For a less-than-or-equal comparison, start |
| 12675 | + $q="true"$ and scan from least to most significant bit: set |
| 12676 | + $q=(not s_j or q)$ when $B_j=1$, and $q=(not s_j and q)$ when $B_j=0$. |
| 12677 | + Assert the final $q$. Greater-than-or-equal complements both $W$-bit operands |
| 12678 | + before applying the same comparator. |
| 12679 | + |
| 12680 | + _Correctness._ ($arrow.r.double$) A feasible source assignment meeting the bound |
| 12681 | + satisfies every normalized comparison by the signed-term identity. Extend it |
| 12682 | + with the deterministic gate outputs. Induction over adders gives exact sums; |
| 12683 | + at each comparator bit, a more significant unequal bit decides the comparison, |
| 12684 | + while equal bits retain the previous result. Every asserted output is therefore true. |
| 12685 | + ($arrow.l.double$) A satisfying CNF assignment obeys every gate equivalence and |
| 12686 | + the false-constant clause, forcing the computed sums and comparisons. The output |
| 12687 | + assertions imply every source row and its objective bound after reversing normalization. |
| 12688 | + |
| 12689 | + _Solution extraction._ Validate the full SAT witness, then convert its first |
| 12690 | + $n$ bits to integers zero or one. Completed Boolean values map identically. |
| 12691 | + |
| 12692 | + _Arithmetic and overhead._ Before encoding, checked sums of positive and negative |
| 12693 | + coefficients must each fit signed 64-bit arithmetic, including the objective row. |
| 12694 | + Otherwise the reduction returns a typed overflow error: some binary assignments |
| 12695 | + would overflow the source evaluator. Normalization uses arbitrary-precision integers. |
| 12696 | + On the accepted domain $T<=2^64-1$, hence $W<=64$. Each row uses at most $5 n W$ |
| 12697 | + adder gates, $W$ comparator gates, and $W+1$ assertion clauses; every gate uses |
| 12698 | + at most four clauses of at most three literals. Including the constant gives |
| 12699 | + $V<=n+1+64(m+1)(5n+1)$ variables, |
| 12700 | + $C<=1+(m+1)(1280n+321)$ clauses, and at most $3C$ literal occurrences. |
| 12701 | +] |
| 12702 | + |
12606 | 12703 | #reduction-rule("ILP", "QUBO")[ |
12607 | 12704 | Binary ILP constraints are encoded by squared integer residuals with binary slack variables, following the penalty construction discussed by Lucas @lucas2014[Section 3]. The rule retains the omitted constant and uses a certified energy interval to recover the original objective direction or report infeasibility. No assumption that the ILP is feasible is needed. |
12608 | 12705 | ][ |
|
0 commit comments