Introduction
In formal language theory and the verification of concurrent systems, the concept of downward closures plays a pivotal role. The downward closure of a language $L$, denoted $L\downarrow$, consists of all subwords that can be formed by deleting characters from words in $L$. This property is particularly valuable in verification tasks, such as checking safety properties in asynchronous programs, because many such tasks are "downward closure invariant." This means a complex component can be substituted with a simpler one if their downward closures are identical.
However, the computational complexity of comparing downward closures is a significant bottleneck. For regular languages represented by Non-deterministic Finite Automata (NFAs), the problem is coNP-complete. For Context-Free Languages (CFLs) represented by Context-Free Grammars (CFGs), it reaches the daunting level of coNEXP-completeness. This paper investigates directedness as a structural property that can dramatically simplify these comparisons.
The Problem of Directedness
A language is defined as directed if any two words within it share a common scattered superword that is also part of the language. In the context of partial orders, a directed language behaves like a single "ideal." If a language possesses this property, its downward closure becomes significantly easier to represent and compare.
The authors address two primary questions:
- What is the computational complexity of determining if a given language (NFA or CFG) is directed?
- Does the directedness property provide a meaningful "complexity shortcut" for downward closure equivalence (DCE) problems?
Methodology
The research utilizes several advanced techniques from automata theory and circuit complexity to analyze directedness:
The Weighting Technique
The "secret sauce" of the paper is a weighting function for ideals. To determine if a language $L$ is directed, the authors seek a single "candidate ideal" that could potentially contain all of $L$. By introducing a weighting function, they ensure that an ideal containing the entire language must have the maximal weight, turning a search problem into a deterministic calculation.
Ideal Automata and Transducers
For regular languages, the authors transform an NFA into a partially ordered NFA, and subsequently into an "ideal automaton." They employ transducers to ensure these representations are "reduced"—meaning they are unique and non-redundant—which is essential for the weighting function to remain strictly monotonic.
Matrix Powering and Straight-Line Programs (SLPs)
For NFAs, matrix powering over a max-plus semiring is used to identify the maximum weight path (the candidate ideal) within the parallel complexity class $AC^1$. For CFGs, where the candidate ideal might be exponentially long, the authors utilize Straight-Line Programs (SLPs) to represent these strings in a compressed, manageable format within PSPACE.
Key Insights
The most significant finding is the "complexity lever" provided by directedness. If two CFGs are known to be directed, checking their downward closure equivalence drops from coNEXP-complete to P-complete. This represents a massive reduction in computational overhead.
Furthermore, the "Unique Candidate" strategy allows algorithms to deterministically identify the only ideal that could represent the language's downward closure. This approach also links directedness to the Joint Embedding Property (JEP) in Constraint Satisfaction Problems (CSPs), suggesting broader applications in infinite-structure CSP research.
Results
The paper establishes the following complexity bounds:
- Regular Languages (NFAs): Deciding directedness is in $AC^1$ (polynomial time). For fixed alphabets, the problem is NL-complete.
- Context-Free Languages (CFGs): Deciding directedness is PSPACE-complete.
- Downward Closure Equivalence (DCE):
- Directed NFAs: Decidable in $AC^1$ (or NL for fixed alphabets).
- Directed CFGs: Decidable in P-complete.
- Counting Ideals: Determining the number of maximal ideals in the decomposition of an NFA’s downward closure is #P-complete.
Conclusion and Future Work
While directedness offers a powerful shortcut for language comparison, several questions remain. The exact complexity of directedness for NFAs with variable alphabets is still open (currently between NL and $AC^1$). Additionally, the PSPACE results for CFGs are tied to the "compressed subword problem," a long-standing open question in the field. Future research may explore whether directedness can simplify other notoriously difficult problems, such as language refinement or inclusion testing in complex systems.
Summary updated