Reopening Pandora's Box: Complexity Results of Shift-Addition/Subtraction Sequences
Nicolai Fiege, Théo Cantaloube, Martin Lange, Christine Solnon
Abstract
Multiplication by constants is a fundamental operation in digital hardware design, with applications in many different areas. Costly generic multipliers are commonly replaced by tailored sequences of shift and add/subtract operations, giving rise to the Single Constant, Multiple Constant and Constant Matrix Multiplication (SCM, MCM, CMM) problems, and their pipelined variants (PSCM, PMCM, PCMM) in which operation outputs are registered and leave the same pipeline stage. Exact synthesis approaches based on SAT, ILP or CP are routinely observed to scale exponentially, and the problems have long been treated as intractable. The exact complexity classification of the shift-add straight-line program formulation has remained open, though, and the results usually cited as evidence of NP-hardness concern different computational models or do not transfer by polynomial-time reduction. Here we close this gap for five problems: we show that CMM, MCM, PMCM, PCMM, and MCM with fixed topology are all NP-complete. NP-hardness of CMM and PCMM hold for targets over binary vectors with only three non-zero entries already, the remaining three hold for targets with three non-zero digits in Canonical Signed Digit representation. We also show that these restrictions are tight, because the fragment over two non-zeros is decidable in polynomial time. Hardness therefore does not stem from complexity of the individual targets but rather from the combinatorial structure of the target set and the interaction between the targets.
Create a lesson
Metadata
- Comments
- 50 pages, 14 figures, 3 tables. Extended version of "Optimising Constant Matrix Multiplication Circuits is NP-complete" (FMCAD 2026, doi:10.34727/2026/isbn.978-3-85448-093-8_21). Lean 4 formalisation: https://gitlab.uni-kassel.de/uk025743/leancmm. In v1, the NP-hardness of MCM (Sect. 9) is proven in Lean only; a human-readable proof will follow in v2
Related papers
Potentially planar degree sequences: characterization and complexity
Shared title terminologycs.CCZhe Zhang, Renwen Tian
Coefficient-space computation and arithmetic tensor complexity: Deterministic algorithms, integral descent, and smoothability
Shared title terminologycs.CCKarthik Sheshadri
Improved Bounds on Half-Duplex Communication Complexity
Shared title terminologycs.CCYuriy Dementiev, Artur Ignatiev, Anna Kogan et al.
Circuit complexity of \operatorname{CLIQUE} with a logarithmic negation budget
Shared title terminologycs.CCBruno Andrades
Asymptotic Spectral Geometry and the Complexity of Tensors
Shared title terminologycs.CCHuanyi Zhou
The Scratchpad Complexity of Autoregressive Multiplication with Hard Attention
Shared title terminologycs.CCKundan Baliga, Ryan Kim