Pattern Matching with Variables: Efficient Algorithms and Complexity Results

ACM Transactions on Computation Theory (TOCT)(2020)

引用 5|浏览30
暂无评分
摘要
A pattern ɑ (i.e., a string of variables and terminals) matches a word w, if w can be obtained by uniformly replacing the variables of ɑ by terminal words. The respective matching problem, i.e., deciding whether or not a given pattern matches a given word, is generally NP-complete, but can be solved in polynomial-time for restricted classes of patterns. We present efficient algorithms for the matching problem with respect to patterns with a bounded number of repeated variables and patterns with a structural restriction on the order of variables. Furthermore, we show that it is NP-complete to decide, for a given number k and a word w, whether w can be factorised into k distinct factors. As an immediate consequence of this hardness result, the injective version (i.e., different variables are replaced by different words) of the matching problem is NP-complete even for very restricted classes of patterns.
更多
查看译文
关键词
Combinatorial pattern matching,NP-complete string problems,combinatorics on words,patterns with variables
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要