Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
8e43381
feat: add PartitionIntoCliques to MinimumCoveringByCliques rule
GiggleLiu Apr 8, 2026
9f0d05f
feat: add 3SAT to RegisterSufficiency reduction (Sethi Reduction I)
GiggleLiu Apr 8, 2026
1679683
feat: add DecisionMinimumVertexCover to HamiltonianCircuit reduction
GiggleLiu Apr 8, 2026
e4479b0
feat: add DecisionMinimumDominatingSet to MinMaxMulticenter
GiggleLiu Apr 8, 2026
b96ed41
feat: add DecisionMinimumDominatingSet to MinimumSumMulticenter
GiggleLiu Apr 8, 2026
b242bfe
style: fix rustfmt formatting
GiggleLiu Apr 8, 2026
d80ed33
Add KColoring to Clustering reduction
GiggleLiu Apr 9, 2026
fc285f1
Add ExactCoverBy3Sets to MinimumAxiomSet reduction
GiggleLiu Apr 9, 2026
a1b7117
Fix MaximumLikelihoodRanking constructor validation
GiggleLiu Apr 9, 2026
33a3f29
fix: allow negative entries in MaximumLikelihoodRanking (c=0 skew-sym…
GiggleLiu Apr 9, 2026
9b2adc5
feat: add x3c to fault detection test set reduction
GiggleLiu Apr 9, 2026
73f7ecf
feat: add MinimumFeedbackArcSet to MaximumLikelihoodRanking reduction
GiggleLiu Apr 9, 2026
e98b6fe
feat: add fvs to unlimited-register codegen rule
GiggleLiu Apr 9, 2026
c828d9e
feat: add mvc to minimum weight and/or graph reduction
GiggleLiu Apr 9, 2026
904ffcb
Add 3-SAT to quadratic diophantine equations reduction
GiggleLiu Apr 9, 2026
05ebfc9
test: pin max2sat maxcut affine relation
GiggleLiu Apr 9, 2026
cbd9f19
fix: resolve clippy warnings and test assertion after new reductions
GiggleLiu Apr 10, 2026
dd714ee
fix: add B&B solver for RegisterSufficiency, avoid slow ILP in tests
GiggleLiu Apr 10, 2026
ac6ff0a
feat: add Clustering→ILP and MinimumFaultDetectionTestSet→ILP reductions
GiggleLiu Apr 10, 2026
9811f67
fix: structural review fixes — overheads, paper entries, test speedup
GiggleLiu Apr 10, 2026
06b4c1a
fix: speed up BMF→ILP closed-loop test (36s → 0.01s)
GiggleLiu Apr 10, 2026
38e377d
fix: model_specs_are_optimal stuck on DecisionMVC→HC→QA→ILP chain
GiggleLiu Apr 10, 2026
7d55e3d
feat: add witness edge for Decision<P> → P, enabling cheaper ILP paths
GiggleLiu Apr 10, 2026
9838da0
fix: paper build errors — cast QDE strings to int, fix missing optima…
GiggleLiu Apr 10, 2026
9fa0c6c
test: add coverage for find_paths_up_to_mode_bounded
GiggleLiu Apr 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ impl ReduceTo<Target> for Source { ... }
- Expression strings are parsed at compile time by a Pratt parser in the proc macro crate
- Variable names are validated against actual getter methods on the source type — typos cause compile errors
- Each problem type provides inherent getter methods (e.g., `num_vertices()`, `num_edges()`) that the overhead expressions reference
- **Overhead expressions describe scaling (asymptotic upper bounds), not exact sizes.** To determine the actual target problem size for a specific instance, read the `reduce_to()` construction code and count the actual variables/constraints/vertices built.
- `ReductionOverhead` stores `Vec<(&'static str, Expr)>` — field name to symbolic expression mappings
- `ReductionEntry` has both symbolic (`overhead_fn`) and compiled (`overhead_eval_fn`) evaluation — the compiled version calls getters directly
- `VariantEntry` has both a complexity string and compiled `complexity_eval_fn` — same pattern
Expand Down Expand Up @@ -212,6 +213,8 @@ Reduction graph nodes use variant key-value pairs from `Problem::variant()`:

## Testing Requirements

**No single test should take more than 5 seconds.** If a test requires solving a large instance (e.g., ILP with thousands of variables), use a smaller test instance or a faster solver. Tests that exceed 5s block CI and must be refactored.

**Reference implementations — read these first:**
- **Reduction test:** `src/unit_tests/rules/minimumvertexcover_maximumindependentset.rs` — closed-loop pattern
- **Model test:** `src/unit_tests/models/graph/maximum_independent_set.rs` — evaluation, serialization
Expand Down
535 changes: 526 additions & 9 deletions docs/paper/reductions.typ

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions docs/paper/references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,17 @@ @article{brucker1977
doi = {10.1016/S0167-5060(08)70743-X}
}

@incollection{brucker1978clustering,
author = {Peter Brucker},
title = {On the Complexity of Clustering Problems},
booktitle = {Optimization and Operations Research},
series = {Lecture Notes in Economics and Mathematical Systems},
volume = {157},
pages = {45--54},
publisher = {Springer},
year = {1978}
}

@article{lawler1977,
author = {Eugene L. Lawler},
title = {A pseudopolynomial algorithm for sequencing jobs to minimize total tardiness},
Expand Down Expand Up @@ -242,6 +253,28 @@ @book{garey1979
year = {1979}
}

@article{orlin1977,
author = {James B. Orlin},
title = {Contentment in Graph Theory: Covering Graphs with Cliques},
journal = {Indagationes Mathematicae (Proceedings)},
volume = {80},
number = {5},
pages = {406--424},
year = {1977},
doi = {10.1016/1385-7258(77)90055-5}
}

@article{kouStockmeyerWong1978,
author = {Lawrence T. Kou and Larry J. Stockmeyer and C. K. Wong},
title = {Covering Edges by Cliques with Regard to Keyword Conflicts and Intersection Graphs},
journal = {Communications of the ACM},
volume = {21},
number = {2},
pages = {135--139},
year = {1978},
doi = {10.1145/359340.359346}
}

@article{galilMegiddo1977,
author = {Zvi Galil and Nimrod Megiddo},
title = {Cyclic Ordering is NP-Complete},
Expand Down
16 changes: 12 additions & 4 deletions problemreductions-cli/tests/cli_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7642,7 +7642,15 @@ fn test_show_ksat_works() {
fn test_path_all_max_paths_truncates() {
// With --max-paths 3, should limit to 3 paths and indicate truncation
let output = pred()
.args(["path", "MIS", "QUBO", "--all", "--max-paths", "3", "--json"])
.args([
"path",
"KSat",
"QUBO",
"--all",
"--max-paths",
"3",
"--json",
])
.output()
.unwrap();
assert!(
Expand All @@ -7661,17 +7669,17 @@ fn test_path_all_max_paths_truncates() {
paths.len()
);
assert_eq!(envelope["max_paths"], 3);
// MIS -> QUBO has many paths, so truncation is expected
// KSat -> QUBO has many paths, so truncation is expected
assert_eq!(
envelope["truncated"], true,
"should be truncated since MIS->QUBO has many paths"
"should be truncated since KSat->QUBO has many paths"
);
}

#[test]
fn test_path_all_max_paths_text_truncation_note() {
let output = pred()
.args(["path", "MIS", "QUBO", "--all", "--max-paths", "2"])
.args(["path", "KSat", "QUBO", "--all", "--max-paths", "2"])
.output()
.unwrap();
assert!(output.status.success());
Expand Down
Loading
Loading