State Complexity of Pattern Matching in Regular Languages
Abstract
In a simple pattern matching problem one has a pattern and a text , which are words over a finite alphabet . One may ask whether occurs in , and if so, where? More generally, we may have a set of patterns and a set of texts, where and are regular languages. We are interested whether any word of begins with a word of , ends with a word of , has a word of as a factor, or has a word of as a subsequence. Thus we are interested in the languages , , , and , where is the shuffle operation. The state complexity of a regular language is the number of states in the minimal deterministic finite automaton recognizing . We derive the following upper bounds on the state complexities of our pattern-matching languages, where , and : ; ; ; and . We prove that these bounds are tight, and that to meet them, the alphabet must have at least two letters in the first three cases, and at least letters in the last case. We also consider the special case where is a single word , and obtain the following tight upper bounds: ; ; ; and . For unary languages, we have a tight upper bound of in all eight of the aforementioned cases.
Cite
@article{arxiv.1806.04645,
title = {State Complexity of Pattern Matching in Regular Languages},
author = {Janusz A. Brzozowski and Sylvie Davies and Abhishek Madan},
journal= {arXiv preprint arXiv:1806.04645},
year = {2018}
}
Comments
30 pages, 17 figures