The Big-O Problem for Labelled Markov Chains and Weighted Automata

Dmitry Chistikov, Stefan Kiefer, Andrzej S. Murawski, David Purser

Abstract

Given two weighted automata, we consider the problem of whether one is big-O of the other, i.e., if the weight of every finite word in the first is not greater than some constant multiple of the weight in the second. We show that the problem is undecidable, even for the instantiation of weighted automata as labelled Markov chains. Moreover, even when it is known that one weighted automaton is big-O of another, the problem of finding or approximating the associated constant is also undecidable. Our positive results show that the big-O problem is polynomial-time solvable for unambiguous automata, coNP-complete for unlabelled weighted automata (i.e., when the alphabet is a single character) and decidable, subject to Schanuel's conjecture, when the language is bounded (i.e., a subset of $w_1^*\dots w_m^*$ for some finite words $w_1,\dots,w_m$) or when the automaton has finite ambiguity. On labelled Markov chains, the problem can be restated as a ratio total variation distance, which, instead of finding the maximum difference between the probabilities of any two events, finds the maximum ratio between the probabilities of any two events. The problem is related to $\varepsilon$-differential privacy, for which the optimal constant of the big-O notation is exactly $\exp(\varepsilon)$.

Introduction: Defining the Big-O Problem

In formal methods, weighted automata (WA) model systems where transitions carry costs, probabilities, or rewards. While the equivalence problem (determining if two automata assign identical weights to all words) is solvable for rational numbers, the containment problem (is weight $A \le$ weight $B$?) is notoriously undecidable.

This paper investigates a natural relaxation: the Big-O problem. Formally, given two weighted automata $A$ and $B$, does there exist a constant $c > 0$ such that for every word $w$, the weight assigned by $A$ is at most $c$ times the weight assigned by $B$? This question is central to verifying system properties where absolute equality is too strict, but bounded growth is required.

Connection to Differential Privacy

The Big-O problem has direct applications in differential privacy. When a system is modeled as a labelled Markov chain, the "Big-O" constant $c$ corresponds to $\exp(\varepsilon)$, where $\varepsilon$ is the privacy parameter. Verifying if a system satisfies $\varepsilon$-differential privacy is equivalent to solving the Big-O problem. The authors introduce the concept of ratio total variation distance, which measures the maximum ratio between event probabilities rather than the standard maximum difference, providing a more sensitive metric for privacy leaks in small-probability events.

The Complexity Landscape

The research establishes a clear boundary between decidable and undecidable instances of the problem:

  • General Case: The Big-O problem is undecidable for non-negative weighted automata and labelled Markov chains. Furthermore, even if $A = O(B)$ is known, approximating the optimal constant $c$ is also undecidable.
  • Unambiguous Automata: If every word has at most one accepting path, the problem is solvable in polynomial time using a product construction and modified Bellman-Ford algorithms on the logarithms of weights.
  • Unary Automata: For a single-letter alphabet, the problem is coNP-complete, analyzed via the spectral radius of transition matrices.
  • Bounded and Finitely Ambiguous Languages: The problem is decidable, though this result is conditional on the truth of Schanuel’s conjecture in transcendental number theory. This dependency arises because comparing growth rates requires comparing logarithms of algebraic numbers.

Key Insights: Reductions and Equivalence

A significant theoretical contribution is the proof that the Big-O problem and the Big-$\Theta$ problem (where $A = O(B)$ and $B = O(A)$) are computationally equivalent. This equivalence allows researchers to use tools from one problem to solve the other.

Reductions between Big-O and Big-Theta problems for weighted automata.

The figures above illustrate the structural reductions used to establish these relationships. By mapping states and transition probabilities (such as the $0.5$ and $1.0$ values shown), the authors demonstrate how a Big-O instance can be transformed into a Big-$\Theta$ instance and vice versa.

Methodological Approaches

The authors utilize a diverse toolkit to tackle these problems:

  1. Spectral Analysis: Used for unary automata to characterize asymptotic growth via matrix eigenvalues.
  2. Logic and Number Theory: For bounded languages, the problem is translated into the first-order theory of the reals with exponentials (Th($\mathbb{R}_{exp}$)).
  3. Graph Algorithms: Cycle detection in product automata helps identify ratios that "blow up" to infinity, which would violate the Big-O condition.

Conclusion and Future Work

While the general Big-O problem is undecidable, the identification of tractable subclasses like unambiguous automata provides a path forward for practical verification. The reliance on Schanuel's conjecture highlights a deep link between formal language theory and fundamental constants in mathematics. Future research may explore polynomial ambiguity (where the number of paths grows polynomially) or extend these results to infinite sequences ($\omega$-languages).

Summary updated

Abstract

Given two weighted automata, we consider the problem of whether one is big-O of the other, i.e., if the weight of every finite word in the first is not greater than some constant multiple of the weight in the second. We show that the problem is undecidable, even for the instantiation of weighted automata as labelled Markov chains. Moreover, even when it is known that one weighted automaton is big-O of another, the problem of finding or approximating the associated constant is also undecidable. Our positive results show that the big-O problem is polynomial-time solvable for unambiguous automata, coNP-complete for unlabelled weighted automata (i.e., when the alphabet is a single character) and decidable, subject to Schanuel's conjecture, when the language is bounded (i.e., a subset of $w_1^*\dots w_m^*$ for some finite words $w_1,\dots,w_m$) or when the automaton has finite ambiguity. On labelled Markov chains, the problem can be restated as a ratio total variation distance, which, instead of finding the maximum difference between the probabilities of any two events, finds the maximum ratio between the probabilities of any two events. The problem is related to $\varepsilon$-differential privacy, for which the optimal constant of the big-O notation is exactly $\exp(\varepsilon)$.
BibTeX
@article{chistikov2022big,
  author = {Dmitry Chistikov and Stefan Kiefer and Andrzej S. Murawski and David Purser},
  title = {{The Big-O Problem for Labelled Markov Chains and Weighted Automata}},
  journal = {Log. Methods Comput. Sci.},
  year = {2022},
  doi = {10.46298/lmcs-18(1:40)2022},
}

Loading related content...

Figure