Introduction
In formal language theory and logic over finite words, first-order logic ($FO[<]$) serves as a fundamental benchmark for expressivity. However, for practical applications like model checking, researchers often focus on the two-variable fragment, $FO^2[<]$. While $FO^2[<]$ is more computationally tractable and closely linked to unary temporal logic, it suffers from a significant expressivity gap: it cannot define "betweenness." Specifically, it cannot express that a certain letter appears between two positions $x$ and $y$, a property that requires a third variable in standard $FO[<]$. This paper investigates $FO^2[<, Bet]$, an extension of two-variable logic that explicitly includes a betweenness predicate.
Defining the Logic and its Equivalents
The authors define $FO^2[<, Bet]$ by adding a binary predicate $a(x, y)$ which holds if the letter $a$ occurs at some position $z$ such that $x < z < y$. A key theoretical insight of the paper is the equivalence between qualitative and quantitative betweenness. Theorem 1 demonstrates that $FO^2[<, Bet]$ is expressively equivalent to $FO^2[<, Th]$ (Threshold Logic), which allows for counting the occurrences of letters between two positions. Furthermore, these logics are shown to be equivalent to several newly introduced temporal logics, such as $BThTL$ (Between Threshold Temporal Logic), which utilize modified "Future" and "Past" operators.
Computational Complexity and the Hierarchy
Adding the power of betweenness to $FO^2$ comes at a significant computational cost. While satisfiability for standard $FO^2[<]$ is $NEXPTIME$-complete (and drops to $NP$ for bounded alphabets), the satisfiability problem for $FO^2[<, Bet]$ jumps to $EXPSPACE$-complete. This complexity is established by reducing the "Exponential Corridor Tiling" problem to the logic's satisfiability.
As shown in the table above, $FO^2[<, Bet]$ sits in a unique position within the hierarchy of formal logics. It is strictly more powerful than $FO^2[<]$—capable of defining the successor relation and representing $r$-bit counters—yet remains strictly weaker than full $FO[<]$. For example, the language $(a(ab)^*b)^*$ is expressible in $FO[<]$ but cannot be captured by $FO^2[<, Bet]$.
Algebraic Characterization
To further understand the boundaries of this logic, the authors employ the algebraic theory of finite semigroups. They identify a specific variety of finite monoids, denoted as $\mathbf{M_eDA}$, which provides a necessary condition for a language to be expressible in $FO^2[<, Bet]$. For two-letter alphabets, the authors prove that membership in $\mathbf{M_eDA}$ is both necessary and sufficient. This algebraic "fingerprint" allows for a more structural analysis of the languages defined by these logics.
Conclusion and Future Directions
The study of $FO^2[<, Bet]$ successfully bridges a known gap in the expressivity of two-variable logics. While the paper provides a complete picture for two-letter alphabets, including bounds on quantifier alternation depth, several open questions remain. The most prominent is whether the algebraic characterization $\mathbf{M_eDA}$ is sufficient for all finite alphabets. Additionally, the relationship between these logics and circuit complexity classes offers a promising avenue for future research.
Summary updated