Skip to content

Commit 06d7f27

Browse files
isPANNclaude
andauthored
fix: remove 8 unsound reductions, fix 8 buggy rules (#1006) (#1052)
* Remove unsound reductions from the paper: SubsetSum to CapacityAssignment and Partition to ShortestWeightConstrainedPath. Also, delete related files for ExactCoverBy3Sets to MinimumWeightSolutionToLinearEquations and HamiltonianPath to ConsecutiveOnesSubmatrix. Update overhead calculations in various reduction implementations to reflect changes in problem structure. * fix overhead formulas per Codex review - sat_circuitsat: account for extra assignments/variables from unused SAT vars - sat_coloring: OR-gadget adds 11 edges (not 10), plus base triangle constant - circuit_spinglass: 4× spin and 6× interaction multipliers for gate arity Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * use asymptotic overhead formulas, drop constant factors Overhead expressions describe scaling (O(·)), not exact sizes. Revert constant-factor adjustments and keep only the two genuinely wrong asymptotic formulas: - CircuitSAT → SpinGlass: O(A) → O(A·V) (gate arity scales with variables) - SpinGlass → MaxCut edges: O(m) → O(m+n) (ancilla edges are O(n)) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e38b1b5 commit 06d7f27

26 files changed

Lines changed: 61 additions & 2664 deletions

docs/paper/reductions.typ

Lines changed: 8 additions & 254 deletions
Large diffs are not rendered by default.

src/rules/circuit_spinglass.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,8 +414,8 @@ where
414414

415415
#[reduction(
416416
overhead = {
417-
num_spins = "num_assignments",
418-
num_interactions = "num_assignments",
417+
num_spins = "num_assignments * num_variables",
418+
num_interactions = "num_assignments * num_variables",
419419
}
420420
)]
421421
impl ReduceTo<SpinGlass<SimpleGraph, i32>> for CircuitSAT {

src/rules/exactcoverby3sets_minimumweightsolutiontolinearequations.rs

Lines changed: 0 additions & 78 deletions
This file was deleted.

src/rules/hamiltonianpath_consecutiveonessubmatrix.rs

Lines changed: 0 additions & 181 deletions
This file was deleted.

src/rules/maximumindependentset_triangular.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ impl ReductionResult for ReductionISSimpleToTriangular {
2828
}
2929

3030
fn extract_solution(&self, target_solution: &[usize]) -> Vec<usize> {
31-
self.mapping_result.map_config_back(target_solution)
31+
self.mapping_result.map_config_back_via_centers(target_solution)
3232
}
3333
}
3434

src/rules/minimumvertexcover_ensemblecomputation.rs

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,20 @@ impl ReductionResult for ReductionVCToEC {
4242
/// - z_i = {a₀} ∪ {v} — vertex v is in the cover
4343
/// - z_j = {u} ∪ z_k — edge {u, v_r} is covered by v_r
4444
///
45-
/// We collect all vertices that appear as singleton operands (index < |V|).
46-
/// In a minimum-length witness, exactly the cover vertices appear this way.
45+
/// We collect all vertices that appear as singleton operands (index < |V|)
46+
/// in the meaningful steps only (before all required subsets are covered).
47+
/// Padding steps beyond the coverage point are ignored.
4748
fn extract_solution(&self, target_solution: &[usize]) -> Vec<usize> {
48-
let budget = self.target.budget();
49+
use crate::traits::Problem;
50+
use crate::types::Min;
51+
52+
let meaningful_steps = match self.target.evaluate(target_solution) {
53+
Min(Some(n)) => n,
54+
_ => return vec![0; self.num_vertices],
55+
};
4956
let mut cover = vec![0usize; self.num_vertices];
5057

51-
for step in 0..budget {
58+
for step in 0..meaningful_steps {
5259
let left = target_solution[2 * step];
5360
let right = target_solution[2 * step + 1];
5461

@@ -121,7 +128,8 @@ pub(crate) fn canonical_rule_example_specs() -> Vec<crate::example_db::specs::Ru
121128
1, 3, // step 1: {1} ∪ z₀
122129
2, 1, // step 2: padding
123130
];
124-
// Extraction picks up vertices 0 (step 0) and 1 (steps 1 and 2).
131+
// Extraction picks up vertices 0 (step 0) and 1 (step 1) from the
132+
// 2 meaningful steps. Step 2 is padding and is ignored.
125133
// Cover {0,1} is valid (though not minimum — the optimal witness
126134
// is found by BruteForce, giving cover {0} or {1}).
127135
let source_config = vec![1, 1];

0 commit comments

Comments
 (0)