# Computing Optimal Repairs for Functional Dependencies

arXiv: https://arxiv.org/abs/1712.07705 · HTML: https://mlsanity.com/paper/1712.07705/

## Key facts

- Cited by 5 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 20 Dec 2017.

## Built on by (most cited first, 5 of 5)

- [OTClean: Data Cleaning for Conditional Independence Violations using Optimal Transport](https://mlsanity.com/paper/2403.02372/) (2024)
- [Certifiable Robustness for Nearest Neighbor Classifiers](https://mlsanity.com/paper/2201.04770/) (2022)
- [Data Obsolescence Detection in the Light of Newly Acquired Valid Observations](https://mlsanity.com/paper/2101.07067/) (2021)
- [Stress-Testing Causal Claims via Cardinality Repairs](https://mlsanity.com/paper/2512.02491/) (2025)
- [Inconsistent Databases and Argumentation Frameworks with Collective Attacks](https://mlsanity.com/paper/2605.03954/) (2026)

## Abstract (arXiv)

We investigate the complexity of computing an optimal repair of an inconsistent database, in the case where integrity constraints are Functional Dependencies (FDs). We focus on two types of repairs: an optimal subset repair (optimal S-repair) that is obtained by a minimum number of tuple deletions, and an optimal update repair (optimal U-repair) that is obtained by a minimum number of value (cell) updates. For computing an optimal S-repair, we present a polynomial-time algorithm that succeeds on certain sets of FDs and fails on others. We prove the following about the algorithm. When it succeeds, it can also incorporate weighted tuples and duplicate tuples. When it fails, the problem is NP-hard, and in fact, APX-complete (hence, cannot be approximated better than some constant). Thus, we establish a dichotomy in the complexity of computing an optimal S-repair. We present general analysis techniques for the complexity of computing an optimal U-repair, some based on the dichotomy for S-repairs. We also draw a connection to a past dichotomy in the complexity of finding a "most probable database" that satisfies a set of FDs with a single attribute on the left hand side; the case of general FDs was left open, and we show how our dichotomy provides the missing generalization and thereby settles the open problem.
