The Complexity of Resilience Problems via Valued Constraint Satisfaction Problems

Manuel Bodirsky, Zaneta Semanisinová, Carsten Lutz · DOI

Abstract

Determining the resilience of a database query—the minimum number of tuple deletions required to change a query's result—is a fundamental problem in data management. This paper establishes a profound theoretical link between database theory and the algebraic study of optimization problems. By framing resilience as a Valued Constraint Satisfaction Problem (VCSP) over infinite domains, the authors provide a new framework for complexity analysis, yielding new dichotomies for unions of conjunctive queries (UCQs) and graph queries (2RPQs) under bag semantics.

Introduction

In data management, resilience serves as a critical metric for data quality, error cleaning, and responsibility. It quantifies the robustness of a query result: if a query returns "true" on a database, how many facts (tuples) must be removed to make it "false"? While this problem has been studied extensively, a general "dichotomy"—a rule stating that every query is either solvable in polynomial time (P) or is NP-complete—has remained elusive, particularly under bag semantics.

In bag semantics, common in SQL databases, the same fact can appear multiple times. This adds a layer of complexity compared to set semantics, where facts are unique. Prior to this work, the complexity of many common queries under bag semantics remained unknown. This paper bridges the gap by leveraging the algebraic tools of Valued Constraint Satisfaction Problems (VCSPs).

Bridging Databases and VCSPs

The core innovation of this research is the mapping of database resilience to the framework of VCSPs. VCSPs are a general class of optimization problems where values are assigned to variables to minimize a total cost function. The authors identify that the multiplicities inherent in bag databases correspond precisely to the "costs" in a VCSP, allowing data deletion to be treated as a cost-minimization problem.

Infinite Domain VCSPs and Symmetry

Most VCSP research is restricted to finite sets. However, database queries often operate over potentially infinite domains. To address this, the authors extend VCSP theory to countably infinite domains by utilizing oligomorphic permutation groups. These structures, despite being infinite, possess sufficient symmetry to be analyzed with tools typically reserved for finite domains. By assuming database automorphisms form an oligomorphic group, the researchers can apply powerful algebraic techniques to determine complexity.

Fractional Polymorphisms

A key technical contribution is the application of fractional polymorphisms to infinite domains. Using measure theory and Lebesgue integrals, the authors define these mathematical "averaging" operations. In the context of VCSPs, the existence of certain fractional polymorphisms signals whether an optimization problem can be solved efficiently, for instance, via linear programming relaxations.

Key Results and Dichotomies

The paper utilizes several query classes as benchmarks for its theoretical framework, including incidence-acyclic UCQs (queries with tree-like structures) and Two-way Regular Path Queries (2RPQs), which are fundamental to graph databases.

Complexity Dichotomies

The researchers establish a complete P vs. NP-complete dichotomy for both incidence-acyclic UCQs and 2RPQs under bag semantics. This provides a definitive boundary for which queries in these classes can be computed efficiently.

Solving the Triangle Query

The framework successfully determines the complexity of the "triangle query" variant (Example 8.27). This specific conjunctive query had been highlighted in previous literature as a significant open problem that standard database techniques could not resolve. The algebraic approach proves that this query's resilience is NP-hard, settling the long-standing question.

The Resilience Conjecture

Beyond specific query classes, the authors propose a general Resilience Conjecture (Conjecture 8.26). They suggest that their algebraic conditions—specifically the existence of certain fractional polymorphisms—exactly capture the boundary between tractability and NP-hardness for all unions of conjunctive queries. This provides a roadmap for future research into the full landscape of database resilience.

Conclusion and Future Work

While this paper provides a robust framework for bag semantics, several avenues for future research remain. The "converse" problem—whether every tractable resilience problem must possess a specific fractional polymorphism in the infinite case—remains unproven. Additionally, while bag semantics are well-handled by cost functions, set semantics require a different algebraic approach that is not yet fully integrated into this VCSP framework. Nevertheless, by linking universal algebra with database theory, this work provides the most comprehensive toolset to date for understanding the computational limits of data resilience.

Summary updated

BibTeX
@inproceedings{bodirsky2024complexity,
  author = {Manuel Bodirsky and Zaneta Semanisinová and Carsten Lutz},
  title = {{The Complexity of Resilience Problems via Valued Constraint Satisfaction Problems}},
  booktitle = {LICS},
  year = {2024},
  doi = {10.1145/3661814.3662071},
}
Figure