Order-Preserving Squares in Strings
Pawe{\l} Gawrychowski, Samah Ghazawi, Gad M. Landau

TL;DR
This paper establishes tight bounds on the number of order-preserving squares in strings and provides an optimal algorithm to find all such squares efficiently.
Contribution
It improves the upper bound on the number of order-preserving squares and presents an optimal algorithm for their enumeration.
Findings
Upper bound of O(σn) on distinct order-preserving squares
Existence of strings with Ω(σn) such squares, matching the upper bound
An O(σn) time algorithm to list all order-preserving squares
Abstract
An order-preserving square in a string is a fragment of the form where and is order-isomorphic to . We show that a string of length over an alphabet of size contains order-preserving squares that are distinct as words. This improves the upper bound of by Kociumaka, Radoszewski, Rytter, and Wale\'n [TCS 2016]. Further, for every and we exhibit a string with order-preserving squares that are distinct as words, thus establishing that our upper bound is asymptotically tight. Finally, we design an 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.
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
TopicsAlgorithms and Data Compression · semigroups and automata theory · Natural Language Processing Techniques
