Detecting patterns in finite regular and context-free languages
Narad Rampersad, Jeffrey Shallit

TL;DR
This paper investigates the computational complexity of pattern matching problems in finite automata and context-free grammars, establishing NP-completeness and PSPACE-completeness results for various problem variants.
Contribution
It provides complexity classifications for pattern matching in finite automata and context-free grammars, including new NP-completeness and PSPACE-completeness results.
Findings
Pattern matching in finite automata is NP-complete.
Pattern matching in context-free grammars is PSPACE-complete.
Restricted pattern matching variants have different computational complexities.
Abstract
We consider variations on the following problem: given an NFA M and a pattern p, does there exist an x in L(M) such that p matches x? We consider the restricted problem where M only accepts a finite language. We also consider the variation where the pattern p is required only to match a factor of x. We show that both of these problems are NP-complete. We also consider the same problems for context-free grammars; in this case the problems become PSPACE-complete.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
Topicssemigroups and automata theory · Algorithms and Data Compression · Machine Learning and Algorithms
