TY - GEN
T1 - Out-Of-Order Membership in Regular Languages
AU - Amarilli, Antoine
AU - Labbe, Sebastien
AU - Paperman, Charles
N1 - Publisher Copyright:
© Antoine Amarilli, Sebastien Labbe, and Charles Paperman.
PY - 2026/7/1
Y1 - 2026/7/1
N2 - We introduce the task of out-of-order membership to a formal language L, where the letters of a word w are revealed one by one in an arbitrary order. The length |w| is known in advance, but the content of w is streamed as pairs (i, w[i]), received exactly once for each position i, in arbitrary order. We study efficient algorithms for this task when L is regular, seeking tight complexity bounds as a function of |w| for a fixed target language. Most of our results apply to an algebraically defined variant dubbed out-of-order evaluation: this problem is defined for a fixed finite monoid or semigroup S, and our goal is to compute the ordered product of the streamed elements of w. We show that, for any fixed regular language or finite semigroup, both problems can be solved in constant time per streamed symbol and in linear space. However, the precise space complexity strongly depends on the algebraic structure of the target language or evaluation semigroup. Our main contributions are therefore to show (deterministic) space complexity characterizations, which we do for out-of-order evaluation of monoids and semigroups. For monoids, we establish a trichotomy: the space complexity is either Θ(1), Θ(log n), or Θ(n), where n = |w|. More specifically, the problem admits a constant-space solution for commutative monoids, while all non-commutative monoids require Ω(log n) space. We further identify a class of monoids admitting an O(log n)-space algorithm, and show that all remaining monoids require Ω(n) space. For general semigroups, the situation is more intricate. We characterize a class of semigroups admitting constant-space algorithms for out-of-order evaluation, and show that semigroups outside this class require at least Ω(log n) space. At the same time, we exhibit semigroups for which specialized techniques yield intermediate bounds such as an O(√n)-space algorithm, suggesting that the landscape may be richer and less well-behaved than for the monoid setting.
AB - We introduce the task of out-of-order membership to a formal language L, where the letters of a word w are revealed one by one in an arbitrary order. The length |w| is known in advance, but the content of w is streamed as pairs (i, w[i]), received exactly once for each position i, in arbitrary order. We study efficient algorithms for this task when L is regular, seeking tight complexity bounds as a function of |w| for a fixed target language. Most of our results apply to an algebraically defined variant dubbed out-of-order evaluation: this problem is defined for a fixed finite monoid or semigroup S, and our goal is to compute the ordered product of the streamed elements of w. We show that, for any fixed regular language or finite semigroup, both problems can be solved in constant time per streamed symbol and in linear space. However, the precise space complexity strongly depends on the algebraic structure of the target language or evaluation semigroup. Our main contributions are therefore to show (deterministic) space complexity characterizations, which we do for out-of-order evaluation of monoids and semigroups. For monoids, we establish a trichotomy: the space complexity is either Θ(1), Θ(log n), or Θ(n), where n = |w|. More specifically, the problem admits a constant-space solution for commutative monoids, while all non-commutative monoids require Ω(log n) space. We further identify a class of monoids admitting an O(log n)-space algorithm, and show that all remaining monoids require Ω(n) space. For general semigroups, the situation is more intricate. We characterize a class of semigroups admitting constant-space algorithms for out-of-order evaluation, and show that semigroups outside this class require at least Ω(log n) space. At the same time, we exhibit semigroups for which specialized techniques yield intermediate bounds such as an O(√n)-space algorithm, suggesting that the landscape may be richer and less well-behaved than for the monoid setting.
KW - Algebra
KW - Automata
KW - Complexity
UR - https://www.scopus.com/pages/publications/105044575437
U2 - 10.4230/LIPIcs.ICALP.2026.161
DO - 10.4230/LIPIcs.ICALP.2026.161
M3 - Conference contribution
AN - SCOPUS:105044575437
T3 - Leibniz International Proceedings in Informatics, LIPIcs
BT - 53rd International Colloquium on Automata, Languages, and Programming, ICALP 2026
A2 - Bhattacharya, Sayan
A2 - Nanongkai, Danupon
A2 - Benedikt, Michael
A2 - Puppis, Gabriele
PB - Schloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing
T2 - 53rd International Colloquium on Automata, Languages, and Programming, ICALP 2026
Y2 - 7 July 2026 through 10 July 2026
ER -