English

Subsequence Matching and Analysis Problems for Formal Languages

Formal Languages and Automata Theory 2024-10-11 v1 Data Structures and Algorithms

Abstract

In this paper, we study a series of algorithmic problems related to the subsequences occurring in the strings of a given language, under the assumption that this language is succinctly represented by a grammar generating it, or an automaton accepting it. In particular, we focus on the following problems: Given a string ww and a language LL, does there exist a word of LL which has ww as subsequence? Do all words of LL have ww as a subsequence? Given an integer kk alongside LL, does there exist a word of LL which has all strings of length kk, over the alphabet of LL, as subsequences? Do all words of LL have all strings of length kk as subsequences? For the last two problems, efficient algorithms were already presented in [Adamson et al., ISAAC 2023] for the case when LL is a regular language, and efficient solutions can be easily obtained for the first two problems. We extend that work as follows: we give sufficient conditions on the class of input-languages, under which these problems are decidable; we provide efficient algorithms for all these problems in the case when the input language is context-free; we show that all problems are undecidable for context-sensitive languages. Finally, we provide a series of initial results related to a class of languages that strictly includes the regular languages and is strictly included in the class of context-sensitive languages, but is incomparable to the of class context-free languages; these results deviate significantly from those reported for language-classes from the Chomsky hierarchy.

Keywords

Cite

@article{arxiv.2410.07992,
  title  = {Subsequence Matching and Analysis Problems for Formal Languages},
  author = {Szilárd Zsolt Fazekas and Tore Koß and Florin Manea and Robert Mercaş and Timo Specht},
  journal= {arXiv preprint arXiv:2410.07992},
  year   = {2024}
}

Comments

Abstract to be published in the proceedings of ISAAC 2024

R2 v1 2026-06-28T19:16:21.463Z