New Perspectives on Semiring Applications to Dynamic Programming
Ambroise Baril, Miguel Couceiro, Victor Lagerkvist
TL;DR
The paper develops a general semiring framework to extend NP problems via semiring-Π constructs and introduces the Δ-product to combine semirings and count solutions of minimal cost. It demonstrates practical algorithmic applications by deriving fixed-parameter tractable algorithms for Semiring-Connected-Dominating-Set (parameterized by clique-width) and Semiring-CSP (parameterized by primal treewidth), while also handling counting and cost variants through the Δ-product. The approach unifies counting, optimization, and listing extensions under a single algebraic umbrella, without requiring idempotence, and shows how measures and join/union expressions drive efficient dynamic-programming-style solutions. These contributions broaden the applicability of algebraic methods to a wide range of NP problems and suggest rich avenues for future research in combinatorics and computational complexity.
Abstract
Semiring algebras have been shown to provide a suitable language to formalize many noteworthy combinatorial problems. For instance, the Shortest-Path problem can be seen as a special case of the Algebraic-Path problem when applied to the tropical semiring. The application of semirings typically makes it possible to solve extended problems without increasing the computational complexity. In this article we further exploit the idea of using semiring algebras to address and tackle several extensions of classical computational problems by dynamic programming. We consider a general approach which allows us to define a semiring extension of any problem with a reasonable notion of a certificate (e.g., an NP problem). This allows us to consider cost variants of these combinatorial problems, as well as their counting extensions where the goal is to determine how many solutions a given problem admits. The approach makes no particular assumptions (such as idempotence) on the semiring structure. We also propose a new associative algebraic operation on semirings, called $Δ$-product, which enables our dynamic programming algorithms to count the number of solutions of minimal costs. We illustrate the advantages of our framework on two well-known but computationally very different NP-hard problems, namely, Connected-Dominating-Set problems and finite-domain Constraint Satisfaction Problems (CSPs). In particular, we prove fixed parameter tractability (FPT) with respect to clique-width and tree-width of the input. This also allows us to count solutions of minimal cost, which is an overlooked problem in the literature.
