Abstract
This paper investigates the parameterized complexity of Answer-Set Programming (ASP) extended with weight constraints. While bounded treewidth often guarantees tractability for NP-hard problems, the authors demonstrate that for ASP with weight constraints, low treewidth alone is insufficient. By introducing "constraint-width" as an additional parameter, they establish conditions for linear-time tractability and propose a novel single-exponential dynamic programming algorithm for programs with cardinality constraints.
Introduction
Answer-Set Programming (ASP) is a prominent declarative paradigm used to solve complex combinatorial search problems. To enhance its modeling capabilities, ASP is often extended with weight constraints, allowing for the expression of requirements such as "the total cost of selected items must fall within a specific range." However, the inclusion of these constraints increases the computational burden, as standard ASP is already NP-hard.
A common approach to achieving tractability in graph-based problems is to exploit "tree-like" structures, measured by a parameter called treewidth. If a problem has a small treewidth, it can often be solved in time linear to the input size. This paper asks a critical question: Is bounded treewidth sufficient to make ASP with weight constraints tractable?
The Treewidth Limitation
The authors prove a surprising result: bounded treewidth is not enough. Through a reduction from the Partition problem, they show that the consistency problem for weight constraint programs remains NP-complete even when the treewidth is as low as 1 (representing a simple tree or line structure). This occurs because large weights within a single node can encapsulate a "Knapsack-style" problem, hiding exponential complexity within a structurally simple graph.
Methodology and Structural Decomposition
To address this, the researchers utilize parameterized complexity and Monadic Second Order (MSO) logic. They identify that tractability requires bounding not just the treewidth, but also the constraint-width—the magnitude of the numerical values used in the weights.
The core of their algorithmic contribution is a dynamic programming (DP) approach. As shown in the figure above, the program is first represented as a primal graph ($G_{Ex}$), which is then decomposed into a tree structure ($\mathcal{T}_{Ex}$). The DP algorithm traverses this tree, using "bags" of atoms to track partial stable models. For Cardinality Constraints (where all weights are 1), they develop a single-exponential algorithm that avoids the double-exponential blow-up common in previous ASP solvers.
Key Insights
- Constraint-Width is Essential: Linear-time efficiency ($O(n)$) is only guaranteed when both treewidth ($w$) and constraint-width ($k$) are fixed constants.
- Encoding Matters: The complexity class of the problem shifts fundamentally depending on whether weights are encoded in unary or binary.
- W[1]-Hardness: Even for simple cardinality constraints, the problem is shown to be W[1]-hard, suggesting that the treewidth must remain in the exponent of the program size, making the authors' $O(f(w) \cdot n^{2w})$ result likely optimal.
Conclusion and Future Directions
This research refines our understanding of the boundary between tractability and NP-hardness in ASP. While the results are primarily theoretical, they provide a roadmap for more efficient solver implementations. The authors intend to integrate these algorithms into the SHARP framework, a tool designed for tree-decomposition-based reasoning. Future work may extend these findings to include disjunctive rules or probabilistic reasoning, where weights represent costs or likelihoods in uncertain environments.
Summary updated