Order-Preserving Squares in Strings
Data Structures and Algorithms
2023-02-03 v1 Formal Languages and Automata Theory
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.
Keywords
Cite
@article{arxiv.2302.00724,
title = {Order-Preserving Squares in Strings},
author = {Paweł Gawrychowski and Samah Ghazawi and Gad M. Landau},
journal= {arXiv preprint arXiv:2302.00724},
year = {2023}
}