Introduction
In the field of theoretical computer science and formal language theory, the subword ordering (also known as the scattered subword or subsequence ordering) is a fundamental relation. A word $u$ is considered a subword of $v$ if $u$ can be obtained by deleting zero or more letters from $v$. For example, "apple" is a subword of "ampples". This ordering is central to string algorithms, formal verification, and the study of well-quasi-orderings.
While the first-order (FO) logic of subwords has been studied for decades, researchers have long sought to characterize the exact expressive power of its fragments. This paper, published in Logical Methods in Computer Science, provides a definitive answer regarding the existential fragment ($\Sigma_1$) of this logic, establishing its equivalence to the class of recursively enumerable relations.
The Expressive Power of the $\Sigma_1$ Fragment
The existential fragment of a logic consists of formulas that use only existential quantifiers ($\exists$) and no universal quantifiers ($\forall$). It was previously established that even this restricted fragment is undecidable over the subword ordering—meaning there is no general algorithm to determine the truth of a $\Sigma_1$ formula. However, undecidability does not provide a full picture of expressiveness. The question remained: exactly which sets of strings can be defined using these formulas?
The authors prove that for any alphabet $A$ with at least three letters ($|A| \ge 3$), a relation is definable in the existential fragment with constants if and only if it is recursively enumerable (RE). This means the logic is as powerful as a Turing machine; it can describe any set of strings that a computer can list.
A Constructive Proof Strategy
The core of the paper is a sophisticated six-step construction that builds complex logical relations from the simple subword ordering. The proof demonstrates how to define increasingly powerful structures:
- Kleene Stars: The authors show how to define the set $X^*$ (all concatenations of strings from a finite set $X$) for words of equal length.
- Blockwise Transductions: They define transformations that operate on fixed-length blocks of text, allowing for local manipulations of strings.
- Rational Transductions: By encoding the "run" of a finite-state transducer as a string, the authors use the logic to verify the validity of that run. This allows the logic to define any relation recognizable by a finite-state transducer.
- The Generator Language: They define a specific non-regular language $G = \{a^n b^n \mid n \ge 0\}^*$, which serves as a bridge to higher complexity.
- Constructing RE Relations: Utilizing a classic result by Hartmanis and Hopcroft (1970), the authors show that any RE language can be constructed from the language $G$ using rational transductions and intersections.
- Alphabet Projection: Finally, they use projections to show that the ability to define RE relations over three letters allows for the definition of RE relations over any alphabet.
A key technical insight in this construction is the use of global embeddings to enforce local properties. Existential logic typically struggles to express universal constraints (e.g., "every block must follow this rule"). The authors bypass this by constructing very long "template" words. If a word embeds into these templates in a specific way, it is forced to possess the desired local properties.
The Arithmetical Hierarchy
The implications of this result extend beyond the existential fragment. By proving that the $\Sigma_1$ fragment corresponds to the first level of the arithmetical hierarchy ($\Sigma^0_1$), the authors establish a complete correspondence for the entire logic. They show that the $\Sigma_i$ fragment of the subword logic (formulas with $i-1$ quantifier alternations) corresponds exactly to the $i$-th level of the arithmetical hierarchy ($\Sigma^0_i$). This provides a comprehensive "map" of the logic's power: to determine if a relation is definable with a certain number of quantifiers, one only needs to check its complexity in standard recursion theory.
Limitations and Open Questions
Despite the completeness of these results for alphabets of size three or greater, two significant questions remain:
- The Binary Case: The current proof relies on a third letter to act as a "separator" or "marker" to synchronize embeddings. Whether the existential fragment over a binary alphabet ($|A|=2$) can define all RE relations remains a major open problem in the field.
- Pure Existential Logic: The results above assume the use of constants (specific fixed words) within the formulas. The authors note that the "pure" existential logic (without constants) is less expressive and cannot define all RE relations. The exact boundary of what pure $\Sigma_1$ logic can define is still unknown.
Conclusion
This work settles a long-standing question regarding the expressive power of subword logic. By showing that existential formulas with constants can define any recursively enumerable relation, the authors have demonstrated that the subword ordering is a remarkably powerful primitive, capable of encoding the full complexity of computation.
Summary updated