Problem Reductions at Scale: Agentic Integration of Computationally Hard Problems
Organizations: HKUST (GZ) · Institute of Science Tokyo · RIKEN AIP
Abstract
Solving an NP-hard optimization problem often requires reformulating it for a specific solver -- quantum hardware, a commercial optimizer, or a domain heuristic. A tool for polynomial-time reductions between hard problems would let practitioners route any supported problem to any supported solver through a single interface. Building such a library at scale, however, has remained out of reach. We show that harness engineering, the practice of designing constraints, verification systems, and feedback loops that channel AI coding agents, can overcome this barrier. Our harness combines a no-code contribution route for domain experts, a multilayer verification stack ranging from type-level checks to agentic feature tests (AI agents role-playing as end users), and a fully automated implementation-review-integration pipeline. In about three months, we built a command-line tool backed by a library of 100+ problem types and 200+ reduction rules in over 170k lines of Rust. The result suggests that a well-engineered harness lets agents build well-tested software at a scale and pace beyond prior reduction-library efforts. Because the reduction graph composes transitively, a new solver registered for any single problem type instantly becomes available to every problem connected by a reduction path. The source code is available at https://github.com/CodingThrust/problem-reductions.
Figures & tables
| Configuration | Mean obj. | Min obj. | Best-match | Mean AI tokens | Mean solver time (s) |
|---|---|---|---|---|---|
| Bare AI | 12,306 | 9,966 | 7/10 | 37,379 | 37.1 |
| Bare AI + web | 10,014 | 0 | 8/10 | 41,504 | 26.1 |
| + pred | 12,603 | 12,187 | 10/10 | 70,523 | 12.9 |
| + pred + web | 12,603 | 12,187 | 10/10 | 80,592 | 6.5 |
Appendix figures & tables10 assets
Supplementary material from the paper’s appendix.
Appendix
| Work | Form | Scope |
|---|---|---|
| Karp [ 33 ] ; Garey and Johnson [ 20 ] ; Lucas [ 36 ] | Paper catalogue | Reduction sketches and Ising formulas; not executable |
| Karp DSL [ 61 ] | Executable per-rule | 25 reductions from a textbook; isolated rules, no reusable graph |
| REDNP [ 10 ] | Executable per-rule | DSL for student exercises; new problems bootstrap via reduction to SAT |
| PyQUBO [ 60 ] ; qubovert [ 31 ] ; QUBO.jl [ 56 ] ; D-Wave Ocean [ 11 ] | Executable library | Many problems to single endpoint (QUBO/Ising) |
| ProblemReductions.jl [ 19 , 35 ] | Executable graph | 18 types; inter-type reduction graph; manually maintained |
| This work | Executable graph | 190 types, 265 rules; composable inverse maps; AI-assisted maintenance |
| Wrapper | Class | Witness | Example |
|---|---|---|---|
| Max<W> | NP optimization | Yes | Max. Indep. Set |
| Min<W> | NP optimization | Yes | Min. Vertex Cover |
| Or | NP decision | Yes | -Satisfiability |
| Sum<W> | #P counting | No | -th Largest -Tuple |
| And | co-NP decision | No | (reserved) |
| Extremum<V> | NP optimization † | Yes | Integer Lin. Prog. |
| Problem | Hops | Application | |
|---|---|---|---|
| GraphPartitioning | 1 | VLSI partitioning | |
| 3-Satisfiability | 1 | Verification, planning | |
| Knapsack | 1 | Resource allocation | |
| TravelingSalesman | 1 | Logistics, PCB drilling | |
| KColoring | 1 | Register allocation | |
| Partition | 2 | Load balancing |
| Seed | Bare AI | Bare AI + web | + pred | + pred + web |
|---|---|---|---|---|
| 7 | SA | SA | SA | SA |
| 11 | SA | SA | SA | SA |
| 13 | CP-SAT | Tabu | SA | SA |
| 17 | MILP | SA | SA | SA |
| 19 | SA | SA | SA | SA |
| 23 | SA | SA | SA | SA |
| Bare AI | Bare AI + web | + pred | + pred + web | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Seed | Obj. | Time (s) | Obj. | Time (s) | Obj. | Time (s) | Obj. | Time (s) | Best of 4 |
| 7 | 12,962 | 13.0 | 12,962 | 25.3 | 12,962 | 1.3 | 12,962 | 1.2 | 12,962 |
| 11 | 12,641 | 6.5 | 12,641 | 6.4 | 12,641 | 15.3 | 12,641 | 11.9 | 12,641 |
| 13 | 12,552 | 75.0 | 0 | 90.0 | 12,944 | 6.1 | 12,944 | 11.7 | 12,944 |
| 17 | 9,966 | 83.0 | 12,326 | 3.2 | 12,326 | 2.9 | 12,326 | 1.2 | 12,326 |
| 19 | 12,915 | 12.5 | 12,915 | 3.0 | 12,915 | 14.7 | 12,915 | 5.9 | 12,915 |
| + pred | + pred + web | |||
|---|---|---|---|---|
| Seed | reads sweeps | time (s) | reads sweeps | time (s) |
| 7 | 1.3 | 1.2 | ||
| 11 | 15.3 | 11.9 | ||
| 13 | 6.1 | 11.7 | ||
| 17 | 2.9 | 1.2 | ||
| 19 | 14.7 | 5.9 | ||
Automated Software Engineering
Automated Software Engineering uses AI, search, and verification methods to automate tasks across the software development lifecycle.
See all 81 papers