Order-Preserving Squares in Strings

Paweł Gawrychowski, Samah Ghazawi, G. M. Landau
{"title":"Order-Preserving Squares in Strings","authors":"Paweł Gawrychowski, Samah Ghazawi, G. M. Landau","doi":"10.48550/arXiv.2302.00724","DOIUrl":null,"url":null,"abstract":"An order-preserving square in a string is a fragment of the form $uv$ where $u\\neq v$ and $u$ is order-isomorphic to $v$. We show that a string $w$ of length $n$ over an alphabet of size $\\sigma$ contains $\\mathcal{O}(\\sigma n)$ order-preserving squares that are distinct as words. This improves the upper bound of $\\mathcal{O}(\\sigma^{2}n)$ by Kociumaka, Radoszewski, Rytter, and Wale\\'n [TCS 2016]. Further, for every $\\sigma$ and $n$ we exhibit a string with $\\Omega(\\sigma n)$ order-preserving squares that are distinct as words, thus establishing that our upper bound is asymptotically tight. Finally, we design an $\\mathcal{O}(\\sigma n)$ time algorithm that outputs all order-preserving squares that occur in a given string and are distinct as words. By our lower bound, this is optimal in the worst case.","PeriodicalId":236737,"journal":{"name":"Annual Symposium on Combinatorial Pattern Matching","volume":"7 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2023-02-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Annual Symposium on Combinatorial Pattern Matching","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.48550/arXiv.2302.00724","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

An order-preserving square in a string is a fragment of the form $uv$ where $u\neq v$ and $u$ is order-isomorphic to $v$. We show that a string $w$ of length $n$ over an alphabet of size $\sigma$ contains $\mathcal{O}(\sigma n)$ order-preserving squares that are distinct as words. This improves the upper bound of $\mathcal{O}(\sigma^{2}n)$ by Kociumaka, Radoszewski, Rytter, and Wale\'n [TCS 2016]. Further, for every $\sigma$ and $n$ we exhibit a string with $\Omega(\sigma n)$ order-preserving squares that are distinct as words, thus establishing that our upper bound is asymptotically tight. Finally, we design an $\mathcal{O}(\sigma n)$ time algorithm that outputs all order-preserving squares that occur in a given string and are distinct as words. By our lower bound, this is optimal in the worst case.
字符串中的保序平方
字符串中的保序方形是$uv$形式的片段,其中$u\neq v$和$u$与$v$是序同构的。我们展示了长度为$n$的字符串$w$在大小为$\sigma$的字母表上包含$\mathcal{O}(\sigma n)$个保持顺序的不同于单词的正方形。这改进了Kociumaka、Radoszewski、Rytter和waleski [TCS 2016]提出的$\mathcal{O}(\sigma^{2}n)$的上界。此外,对于每个$\sigma$和$n$,我们展示了一个具有$\Omega(\sigma n)$保持顺序的平方的字符串,这些平方与单词不同,从而建立了我们的上界是渐近紧密的。最后,我们设计了一个$\mathcal{O}(\sigma n)$ time算法,该算法输出在给定字符串中出现的所有保持顺序的正方形,并且作为单词是不同的。根据下界,这在最坏情况下是最优的。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
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学术文献互助群
群 号:481959085
Book学术官方微信