近似笛卡尔树模式匹配

IF 1 4区 计算机科学 Q3 COMPUTER SCIENCE, THEORY & METHODS
Sungmin Kim, Yo-Sub Han
{"title":"近似笛卡尔树模式匹配","authors":"Sungmin Kim,&nbsp;Yo-Sub Han","doi":"10.1016/j.tcs.2025.115506","DOIUrl":null,"url":null,"abstract":"<div><div>The Cartesian tree of a string is a binary tree, which is useful in capturing minimalities within strings. We study the approximate pattern matching problem for two Cartesian trees of two strings. We design a polynomial-time algorithm that computes the minimum edit cost when a given string is edited to match the Cartesian tree of the other string. We also design a linear-time algorithm that computes the (max,min)-convolution between two sorted arrays, which we use to speed up the algorithm computing the edit cost. Then, we adapt the algorithm that computes the edit cost to the approximate pattern matching problem, where we find all substrings of a given text that match a given Cartesian tree pattern within a given number of edit operations. We also consider variant problems such as the approximate Cartesian matching under Hamming distance, and present polynomial-time algorithms for the considered problems.</div></div>","PeriodicalId":49438,"journal":{"name":"Theoretical Computer Science","volume":"1056 ","pages":"Article 115506"},"PeriodicalIF":1.0000,"publicationDate":"2025-08-11","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Approximate Cartesian tree pattern matching\",\"authors\":\"Sungmin Kim,&nbsp;Yo-Sub Han\",\"doi\":\"10.1016/j.tcs.2025.115506\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<div><div>The Cartesian tree of a string is a binary tree, which is useful in capturing minimalities within strings. We study the approximate pattern matching problem for two Cartesian trees of two strings. We design a polynomial-time algorithm that computes the minimum edit cost when a given string is edited to match the Cartesian tree of the other string. We also design a linear-time algorithm that computes the (max,min)-convolution between two sorted arrays, which we use to speed up the algorithm computing the edit cost. Then, we adapt the algorithm that computes the edit cost to the approximate pattern matching problem, where we find all substrings of a given text that match a given Cartesian tree pattern within a given number of edit operations. We also consider variant problems such as the approximate Cartesian matching under Hamming distance, and present polynomial-time algorithms for the considered problems.</div></div>\",\"PeriodicalId\":49438,\"journal\":{\"name\":\"Theoretical Computer Science\",\"volume\":\"1056 \",\"pages\":\"Article 115506\"},\"PeriodicalIF\":1.0000,\"publicationDate\":\"2025-08-11\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Theoretical Computer Science\",\"FirstCategoryId\":\"94\",\"ListUrlMain\":\"https://www.sciencedirect.com/science/article/pii/S030439752500444X\",\"RegionNum\":4,\"RegionCategory\":\"计算机科学\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q3\",\"JCRName\":\"COMPUTER SCIENCE, THEORY & METHODS\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Theoretical Computer Science","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S030439752500444X","RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, THEORY & METHODS","Score":null,"Total":0}
引用次数: 0

摘要

字符串的笛卡尔树是一个二叉树,它在捕获字符串中的最小值时很有用。研究了两串笛卡尔树的近似模式匹配问题。我们设计了一个多项式时间算法,计算当一个给定字符串被编辑以匹配另一个字符串的笛卡尔树时的最小编辑成本。我们还设计了一个线性时间算法来计算两个排序数组之间的(max,min)卷积,我们使用它来加快算法计算编辑成本。然后,我们将计算编辑成本的算法调整为近似模式匹配问题,在该问题中,我们在给定数量的编辑操作中找到与给定笛卡尔树模式匹配的给定文本的所有子字符串。我们还考虑了汉明距离下的近似笛卡儿匹配等变型问题,并给出了求解这些问题的多项式时间算法。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Approximate Cartesian tree pattern matching
The Cartesian tree of a string is a binary tree, which is useful in capturing minimalities within strings. We study the approximate pattern matching problem for two Cartesian trees of two strings. We design a polynomial-time algorithm that computes the minimum edit cost when a given string is edited to match the Cartesian tree of the other string. We also design a linear-time algorithm that computes the (max,min)-convolution between two sorted arrays, which we use to speed up the algorithm computing the edit cost. Then, we adapt the algorithm that computes the edit cost to the approximate pattern matching problem, where we find all substrings of a given text that match a given Cartesian tree pattern within a given number of edit operations. We also consider variant problems such as the approximate Cartesian matching under Hamming distance, and present polynomial-time algorithms for the considered problems.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
Theoretical Computer Science
Theoretical Computer Science 工程技术-计算机:理论方法
CiteScore
2.60
自引率
18.20%
发文量
471
审稿时长
12.6 months
期刊介绍: Theoretical Computer Science is mathematical and abstract in spirit, but it derives its motivation from practical and everyday computation. Its aim is to understand the nature of computation and, as a consequence of this understanding, provide more efficient methodologies. All papers introducing or studying mathematical, logic and formal concepts and methods are welcome, provided that their motivation is clearly drawn from the field of computing.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信