变量模式匹配

H. Fernau, F. Manea, Robert Mercas, Markus L. Schmid
{"title":"变量模式匹配","authors":"H. Fernau, F. Manea, Robert Mercas, Markus L. Schmid","doi":"10.1145/3369935","DOIUrl":null,"url":null,"abstract":"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.","PeriodicalId":198744,"journal":{"name":"ACM Transactions on Computation Theory (TOCT)","volume":"60 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-02-11","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"3","resultStr":"{\"title\":\"Pattern Matching with Variables\",\"authors\":\"H. Fernau, F. Manea, Robert Mercas, Markus L. Schmid\",\"doi\":\"10.1145/3369935\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"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.\",\"PeriodicalId\":198744,\"journal\":{\"name\":\"ACM Transactions on Computation Theory (TOCT)\",\"volume\":\"60 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2020-02-11\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"3\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"ACM Transactions on Computation Theory (TOCT)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/3369935\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"ACM Transactions on Computation Theory (TOCT)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3369935","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 3

摘要

如果w可以通过用终结词统一替换一个模式的变量而得到,那么模式(即由变量和终结词组成的字符串)将匹配一个单词w。相应的匹配问题,即决定给定模式是否与给定单词匹配,通常是np完全的,但对于有限类型的模式,可以在多项式时间内解决。我们提出了一种有效的算法来解决具有有限数量重复变量的模式和具有结构限制变量顺序的模式的匹配问题。此外,我们证明了对于给定的数字k和单词w,决定w是否可以被分解成k个不同的因子是np完全的。作为这个困难结果的直接结果,匹配问题的内射版本(即,不同的变量被不同的单词取代)是np完全的,即使对于非常有限的模式类也是如此。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
Pattern Matching with Variables
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.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
A Polynomial Degree Bound on Equations for Non-rigid Matrices and Small Linear Circuits Optimal Distribution-Free Sample-Based Testing of Subsequence-Freeness with One-Sided Error Approximate Degree, Weight, and Indistinguishability The (Coarse) Fine-Grained Structure of NP-Hard SAT and CSP Problems Multiplicative Parameterization Above a Guarantee
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1